skills/formal-verify/SKILL.md
Continuous formal verification of architectural constraints and code quality. Use when asked to verify, audit, or validate codebase integrity. Runs automatically via hooks on every edit (structural) and pre-commit (full). Catches ownership violations, boundary crossings, state machine bugs, and code smells that grep ratchets miss. Triggers: "verify", "formal verify", "check architecture", "audit code quality", "run verification", "/verify", "/verify --bootstrap", "/verify --grade".
npx skillsauth add petekp/agent-skills formal-verifyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when architectural intent matters more than "it compiles."
This skill runs a three-layer verification loop:
The layers are intentionally tiered:
/verify: all three layersBootstrap a target project with:
/verify --bootstrap
Bootstrap runs four phases:
.verifier//verify
Runs all layers in verbose mode and prints a unified report./verify --bootstrap
Installs dependencies, creates .verifier/, and scaffolds the first rule set./verify --evolve
Checks for drift between architectural docs and existing verification specs./verify --grade
Runs Layer 3 only and reports the current elegance grade.The runner extracts facts from Rust and Swift source files, then checks
structural.yaml rules such as:
Structural checks are the default PostToolUse hook because they are the fastest.
Behavioral verification covers state transitions and protocol contracts:
Use this layer at slice checkpoints, before risky merges, and whenever a change touches coordination logic or cross-language contracts.
Elegance auditing scores code for:
It produces a grade and line-level deductions so the agent can clean up code, not just make it technically correct.
When a violation is found, tailor the output to the audience:
If the agent fails to resolve the same violation three times, stop the fix loop and escalate with:
Bootstrap creates and maintains:
.verifier/
├── structural.yaml
├── elegance.yaml
├── specs/
├── facts/
└── reports/
structural.yaml stores declarative Layer 1 ruleselegance.yaml stores thresholds and grade policyspecs/ stores Z3Py and TLA+ behavioral specsfacts/ caches extracted AST factsreports/ stores the most recent verification outputsfacts/ and reports/ should be gitignored in the target project.
/verify before claiming a migration is complete./verify --grade when the code is correct but still feels rough.SKILL.md focused on orchestration; pull detailed mechanics from the
references below.@references/layer1-structural.md
Fact extraction, Z3 encoding, reachability, and incremental invalidation.@references/layer2-behavioral.md
When to use TLA+/Apalache versus Z3Py, plus spec execution contracts.@references/layer3-elegance.md
Metric families, grading, thresholds, and the Layer 3 sub-module layout.@references/constraint-yaml-spec.md
Structural rule schema, selectors, assertions, and fact pattern operators.@references/bootstrap-process.md
The install, discover, interview, validate bootstrap workflow.@references/agent-feedback-loop.md
Hook integration, violation injection, retries, and escalation policy.@references/spec-authoring-guide.md
Translating plain-English architectural intent into formal specs.development
Compile a plain-language task into a concise, auditable Codex or Claude Code `/goal`, or explain why a normal prompt fits better. Use when the user asks to draft, formulate, rewrite, tighten, or create a goal for multi-step work that needs a durable objective, transcript-visible proof, constraints, bounded stop conditions, host-aware operation, and risk-based review depth.
tools
Expert Unix and macOS systems engineer for shell scripting, system administration, command-line tools, launchd, Homebrew, networking, and low-level system tasks. Use when the user asks about Unix commands, shell scripts, macOS system configuration, process management, or troubleshooting system issues.
testing
Apply professional typography principles to create readable, hierarchical, and aesthetically refined interfaces. Use when setting type scales, choosing fonts, adjusting spacing, designing text-heavy layouts, implementing dark mode typography, or when asked about readability, font pairing, line height, measure, typographic hierarchy, variable fonts, font loading, or OpenType features.
development
Create visual parameter tuning panels for iterative adjustment of animations, layouts, colors, typography, physics, or any numeric/visual values. Use when the user asks to "create a tuning panel", "add parameter controls", "build a debug panel", "tweak parameters visually", "fine-tune values", "dial in the settings", or "adjust parameters interactively". Also triggers on mentions of "leva", "dat.GUI", or "tweakpane".