create-formal-verification-skill
Skill4 starsChanged 15 days agoMITView on GitHub
Find the guarantee in a repo where a bug would hurt users most and tests are weakest, verify it with a fitting formal tool, and leave a proven project-local verify skill that reruns the check. Triggers: /create-formal-verification-skill, "prove this invariant", or a request to model-check a race.
27 other projects use a version of this.
Adopted by
Most recently taken up by
- Yeachan-Heo/oh-my-claude-sisyphustheir own version, first seen Nov 8, 2026
- bolasblack/claude-skillstheir own version, first seen Nov 8, 2026
- painhardcore/pstacktheir own version, first seen Nov 8, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Nov 8, 2026
- endqwerty/endstacktheir own version, first seen Nov 8, 2026
- tristanphvn/keeltheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ketchup-video, show-me and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 10 projects that use this
AnasX7Skillshow-me
Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
Also in 4 projects that use this
SentrySkilldeslop
Strip AI-generated noise from the diff before pushing — extra comments a human wouldn't write, defensive try/catch in trusted code paths, casts to any, inline imports in Python, and other style inconsistencies with the surrounding file. Use this immediately before commit so the diff stays clean.
Also in 3 projects that use this
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- backnotprop/pstack★ 3.8ksame name
- UniClipboard/UniClipboard★ 2ksame name
- jtaroreh/agystack★ 128same name
- Dimon94/dverity★ 107same name
- Dimon94/skills★ 107same name
- dsebban/skills★ 71same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- creedants/pstack-t3★ 18same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- catch-upSkill
- catch-up-videoSkill
- correctSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-treat-input-as-untrustedSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- security-reviewSkill
- setup-endostackSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tarique-helpSkill
- tarique-modeSkill
- tddSkill
- teachSkill
- technical-writingSkill
- threat-modelSkill
- try-endostackSkill
- typescript-best-practicesSkill
- unslopSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Read the code first, and put questions to the user only where the code leaves a gap.
- Distinctive: line 23
Use the cheapest tool that can answer it:
- Distinctive: line 30
Prefer tools the project's developers could install and run themselves.
- Distinctive: line 36
Findings reported, never hidden: If today's code violates the property, report the counterexample in the code's vocabulary.
- Very specific: line 44
Create a project-local skill in the project skills directory your agent reads (see docs/agents/<agent>.md), named for the verified area …
- Distinctive: line 49
run the check (the exact command).
- Distinctive: line 51
update the verification for an intended behavior change (edit the model to match the code first, change the property only with evidence the …
- Distinctive: line 63
When the generated skill fails to catch the planted break, or one of its steps will not run, repair the skill or the check.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
create-formal-verification-skill
An example-based test exercises only the cases someone wrote down. A formal check exhausts a stated scope, which may be all interleavings of a model, all inputs below a size bound, or the entire input space. Apply one where that gap matters, then leave a skill that later agents rerun each time they edit the covered code.
Assume the user cannot read TLA+ or any proof language. Report everything using the names and concepts of the code itself, so they can judge the outcome and decide what to do without learning the tool.
Good targets: concurrency, retries, state machines, parsers, permission checks, and unsafe memory access, anywhere tests feel thin. If the area already has a generated verify skill, use the maintain-formal-verification-skill skill (../maintain-formal-verification-skill/SKILL.md) instead.
1. Choose what to verify
Read the code first, and put questions to the user only where the code leaves a gap. When the user pointed at a particular area or defect, begin with it.
The best candidate is a guarantee the code makes, whose failure hurts users, and whose failing case tests rarely reach. Pick the highest-value candidate in the codebase, not the easiest to formalize. Security guarantees often rank highest: "a revoked token is never accepted after revocation commits", "a payout is never sent twice for one invoice", "a path from user input never resolves outside the upload root".
2. Match the tool to the question
Use the cheapest tool that can answer it:
- Ordering questions (can these events interleave badly?): a model checker on a small model of the design. Default to TLA+ with TLC, whatever language the code is in.
- Whole-input questions about real code (memory safety, overflow, data-structure invariants): a verifier that runs on source, such as Kani for Rust, CBMC for C, or Dafny where the code is written in it.
- No source-level verifier for the language: say so plainly, then run property-based tests with generated inputs against the actual code (Hypothesis, fast-check, QuickCheck, jqwik). Do not hand-write a model of the function instead.
- Must hold for unbounded sizes, where no finite bound is enough: a proof assistant (Lean, Coq, Isabelle) may be needed. Say what it costs before you start.
Prefer tools the project's developers could install and run themselves. Explain your choice to the user. Pin the tool version, and verify checksums when you download a toolchain.
3. Standards for the check
- Traceable. A reviewer can follow each element of the model or proof to a specific place in the code. A step the model handles atomically must also be atomic in the implementation. Name things with the repo's identifiers.
- Shown able to fail. For each property, make a deliberately broken copy of the guarded code (remove a guard, swap two steps) and watch the check reject it. A check never seen failing proves nothing.
- Findings reported, never hidden. If today's code violates the property, report the counterexample in the code's vocabulary. Never weaken the property or bend the model to get a pass. Product code stays untouched unless the user requests a change.
- Scope stated. Say what was verified, the bounds and assumptions, and what was left out. A pass speaks only for what was modeled, within its bounds.
- Understandable to someone who never runs the tool. One plain sentence gives the property, and a second gives what goes wrong if it breaks. A counterexample appears as a brief numbered sequence of steps described with the code's names.
- Cheap to rerun. One command, a pinned tool version, and a runtime short enough that agents will run it every time related code changes.
- Tied to history. For each check, list the files and functions it covers and the commit at which someone last confirmed the check matches them (the sync commit). A later agent compares that commit with HEAD to see whether covered code has moved.
4. Write the verify skill
Create a project-local skill in the project skills directory your agent reads (see docs/agents/<agent>.md), named for the verified area (for example verify-token-revocation). Its frontmatter must identify the verified area and describe when to invoke the skill, because agents only find skills through frontmatter.
On its own, the generated skill must let a later agent:
- decide whether a change touches verified code (the coverage list);
- run the check (the exact command);
- tell a real defect from a modeling mistake (walk the counterexample through the code; if a step is impossible in the code, the model is wrong);
- update the verification for an intended behavior change (edit the model to match the code first, change the property only with evidence the contract changed).
Embed the coverage list and the sync commit. Instruct later agents to advance the sync commit only once they have confirmed that the verification still agrees with the code at that newer commit. Use the repo's real commands, paths, and terms. Leave no placeholders.
5. TLA+ results go through statechart
When the check is TLA+, the generated skill sends every result through the statechart skill. That skill turns each violated invariant into its shortest path of states in plain words and, when everything passes, draws the state diagram. Refer to it only by name ("run the statechart skill on the spec"). Its commands, flags and paths change between versions and machines, so none of them belong in what you generate, whether skill text or script.
6. Prove the generated skill
Act as a future agent. Make a throwaway edit to real code that breaks the property, then follow the generated skill from the top. It must catch the break. Revert the edit and confirm the check returns to its earlier state (green, or red only for findings you will report).
When the generated skill fails to catch the planted break, or one of its steps will not run, repair the skill or the check. Never adjust the throwaway edit to make it detectable. A verify skill that has not passed this test is a draft.
7. Report
Tell the user:
- the guarantee verified, as one plain sentence, and the harm if it breaks;
- the tool and why you chose it;
- the bounds and assumptions;
- any findings, as numbered steps in code terms;
- the rerun command;
- coverage gaps.
Suggest one more candidate only if a closely related one came up. Mention that maintain-formal-verification-skill resynchronizes the check after changes that skipped it.
Done when
One property is verified and shown able to fail, the generated skill caught a deliberate violation in one run-through, and the coverage list and sync commit are recorded in it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

