python-verbs-success

Defines verb and derivation constructs for behavior on Pydantic models in Python.

Updated Jul 15, 2026
One-click install
npx skills add https://github.com/kyzobuild/kyzo-python --skill python-verbs-success-kyzobuild
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-verbs-success
Source: https://github.com/kyzobuild/kyzo-python/tree/main/cursor/skills/python-verbs-success
Command: npx skills add https://github.com/kyzobuild/kyzo-python --skill python-verbs-success-kyzobuild

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python domain models often accumulate ad-hoc methods: fetch-and-return wrappers, multi-step construction chains, stored copies of derivable facts, and free functions computing from model fields. This Skill enforces a closed set of two behavior constructs — the verb (state transition on the consistency model) and the derivation (pure computed fact on a frozen value) — so every method has exactly one legal form. ## Core Features & Use Cases - Verb construct: Defines state-transition methods with at most one construction statement, optional foreign-reply capture, state-field assignment, and emission of the constructed fact through a client field. - Derivation construct: Defines pure functions of a frozen model's fields as @property, @cached_property, or @computed_field, with a closed computation algebra (arithmetic, folds, extrema, selection, case-table lookup). - Query models: Answers questions with inputs via frozen composite models whose derivation returns a constructed union such as PriceFound | PriceMissing. - Use Case: When writing a trading domain model, use this Skill to decide whether exposure belongs as a @cached_property derivation on Fill, and to write book() as a verb that constructs Position in one statement and publishes it. ## Quick Start Ask the AI to write a state-transition method or computed property on your Pydantic model following the verb and derivation rules.

Frequently Asked Questions about python-verbs-success

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a state transition method on a Pydantic model?▼

Write a verb on the consistency model whose body contains at most one construction statement, with constituent values constructed inside that call. It may capture a foreign reply first, assign the constructed fact to a state field, and emit it through a client field.

When should I use @property vs @cached_property in Python?▼

Use @property to recompute a cheap fact on each read and @cached_property to compute a costly, recursive, or repeatedly-read fact once. Both must be pure functions of the frozen model's fields; the choice is cost, never meaning.

What is @computed_field used for in Pydantic?▼

@computed_field placed above @cached_property writes the derived fact into every serialization of the model. Use it exactly when the derived fact is part of a contract's serialized shape, since it is the only decorator of the three that changes meaning.

Can a derivation take parameters or read external state?▼

No. A derivation takes only self and reads only the model's own frozen fields. A question with an input becomes a frozen query model holding the input and queried value, and anything depending on the clock, clients, or randomness is a field, not a derivation.

Why is storing a derivable field on a model forbidden?▼

A stored copy of a derivable fact keeps one meaning in two structures that must be maintained in agreement by hand. If a pure function of the model's fields yields the value, it belongs as a derivation and is never also stored.