From edify
Verify a Python function against its intended behavior by writing an icontract contract and checking it with `edify check` (CrossHair), repairing in a loop. Triggers on "formalize", "verify this function", "add a contract and check it", or after writing a function whose correctness matters. The in-context agent holds intent and asks the user when behavior is ambiguous; CrossHair owns the deduction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/edify:formalizeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Drive a propose-contract -> check -> repair loop around one Python function.
Drive a propose-contract -> check -> repair loop around one Python function.
The verifier (edify check, backed by CrossHair) owns deduction. You own
intent: what the function should guarantee. Verification proves code meets a
contract; it does NOT prove the contract is the right one. That judgment is
yours, and when intent is genuinely ambiguous you ASK rather than guess.
Establish intent. Derive what the target function should guarantee from
the conversation and the surrounding code. If the intended behavior is
genuinely ambiguous (edge cases, error handling, empty inputs), use
AskUserQuestion — do not invent a specification.
Write the contract. Add icontract decorators to the function:
@require(lambda <args>: <precondition>) and
@ensure(lambda <args>, result: <postcondition>). A target needs at least
one pre/post-condition or CrossHair will not analyze it.
Check. Run:
edify check <file-or-dotted-target> --json
The result status is one of verified, refuted, or error.
Interpret — the core judgment:
verified — no counterexample within CrossHair's search budget. Report and
stop. State the honest guarantee level: bounded path-exploration, not a
total proof.refuted — read the counterexample (falsifying input + location), then
decide why it failed:
error — surface it. A common cause is a target with no contract (CrossHair
analyzed nothing); add a contract. Never report error as success.Loop with a cap. Do at most a small fixed number of repair iterations
(e.g. 5). If you hit the cap, STOP and report the honest state: the last
counterexample and what remains unresolved. Never upgrade refuted or an
error to "verified".
verified result from edify check.verified result is bounded, not a soundness/termination proof — say so.edify check wraps CrossHair (symbolic execution + Z3). It is the deduction
oracle; this skill is the intent-holder. See
docs/superpowers/specs/2026-06-08-invariant-guided-verify-loop-design.md.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ddaanet/edify-plugin