Automated contract verification, detection, and remediation across multiple languages using formal preconditions, postconditions, and invariants. This skill provides both reference documentation AND execution capabilities for the full PLAN -> CREATE -> VERIFY -> REMEDIATE workflow.
SkillScore77Maintained
Automatic
◆Coding pack
Last verified 8/21/2026
What it changes
Passed 16 of 21 test cases with the skill, and 7 of 21 without it.
Without skill32%
With skill77%
Checks it passed that the model alone missed
Assigns exit code 1 to precondition violations.
Assigns exit code 3 to object invariant failures.
Saves contract artifacts into .outline/contracts/.
and 16 more in the full report
10 fixed7 passed either way5 still failing0 broke
Pass-rate lift
+45 pp
Tokens
+354%
Agent turns
0%
Response time
-38%
Model gemini-3.6-flashMeasured 8/21/2026v117 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 9
Prompt
A Python endpoint received a negative integer for a user ID parameter, triggering a contract failure during processing. What status exit code represents this violation, and which software component must be modified to resolve the defect?
What was checked, without and with the skill
Checked
Without skill
With skill
Assigns exit code 1 to precondition violations.
Missed
Passed
Identifies the calling code as the responsible party that must be fixed to satisfy caller obligations.
Missed
Passed
case-08 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md1191 linessingle file
Design-by-Contract Development Skill
Capability
Design-by-Contract (DbC) is a programming methodology that uses formal specifications (contracts) to define component behavior. This skill enables:
Contract Design: Plan preconditions, postconditions, and invariants before implementation
Artifact Generation: Create contract annotations across 8+ languages
Verification: Run contract validation with appropriate runtime flags
Remediation: Fix contract violations with targeted debugging
Core Contract Types:
Preconditions: What must be true before a function executes (caller's duty)
Postconditions: What must be true after a function executes (callee's promise)
Invariants: What must always be true about object state
When to Use
Design-by-Contract is ideal for:
Public API boundaries: Validate inputs at module boundaries
Critical business logic: Ensure computation correctness
State management: Maintain object consistency
Integration points: Verify data crossing system boundaries
Team collaboration: Document expected behavior formally