create-formal-verification-skill
Ce qu’il fait
Permet à l'assistant de construire une compétence réutilisable qui utilise la vérification formelle pour contrôler une propriété du code là où les bogues coûtent le plus cher. Elle s'adresse aux équipes qui ont une logique délicate, comme les nouvelles tentatives, les conditions de concurrence ou les analyseurs.
Quand l’utiliser
- ✓Quand une condition de concurrence, une logique de nouvelles tentatives ou une machine à états demande plus que des tests.
- ✓Quand vous voulez prouver qu'un invariant tient dans tous les cas d'un périmètre donné.
- ✓Quand un bogue dans une zone clé serait coûteux et que les tests atteignent rarement ce cas.
Lien du skill
https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/create-formal-verification-skill/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Vérifie par modèle la condition de concurrence de notre file de tâches et crée une compétence que l'équipe pourra relancer sur les futures modifications.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'assistant choisit la cible la plus utile de votre code, sélectionne un outil de vérification adapté, contrôle une propriété, puis rédige une compétence de projet qui indique aux futurs agents comment la revérifier.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Create a formal verification skill
In Claude Code, read the Claude Code adapter once per session before you follow this skill. It maps the Cursor names in pstack skills to Claude Code.
A test checks the cases that someone thought to write. Formal verification checks every case in a stated scope: every order of steps in a model, every input up to a bound, or every input. This skill finds the part of the repo where that matters most, verifies one property of it, and leaves a project-local skill that lets the next agent check a change against that property. Write that skill for an agent who reads it cold, mid-change, and has never seen your work. The user must be able to trust the result and act on it without learning the verification language.
Choose the target from the code
Answer from the codebase, and ask the user only what you cannot observe. If the user named an area or a bug, start there.
A good target is a promise the code makes, where a break harms users and tests rarely reach the case that breaks it. Choose the strongest such target in the repo, not the one that is easiest to verify.
Let the question choose the tool
Pick the tool that answers the question at the lowest cost: a model checker, a proof assistant, an SMT-backed verifier, or another tool. Whether events can happen in a bad order usually suits a model checker over a small model of the design, and TLA+ is the default for that in any language. Whether the code itself behaves for every input, as with memory safety, overflow, or a data-structure invariant, usually suits a verifier that runs on the code. If no verifier runs on this language, say so, and test the real code with generated inputs, not a hand model of the function. A property that must hold at every size, where a bound is not enough, can need a proof. Prefer a tool that the repo's developers can install and run, and tell the user why you chose it.
What makes it good
- True to the code. Every part of the model or proof points to code that a reviewer can open. What the verification treats as one indivisible step is one indivisible step in the code. Names come from this repo.
- Able to fail. A check that you have never seen fail proves nothing. Show each property failing on a broken variant of the code it guards, such as a removed check or a reordered step.
- Findings stay findings. When the current code breaks the property, report it with the counterexample in the code's terms. Do not weaken the property or the model until it passes, and do not change product code unless the user asks.
- Honest about scope. Say what is verified, under which bounds and assumptions, and what is left out. A pass covers the model or the bound, not the whole system.
- Readable without the tool. State the property and the harm in one plain sentence each. Tell a counterexample as a short sequence of steps in the code's words.
- Cheap to rerun. One command, a reproducible tool version, and a run short enough that the next agent will use it on every relevant change.
- Kept in step with the code. Record which files and functions each check covers, and the commit at which you last confirmed that the verification describes them. When the covered code changes after that commit, the next agent can see that the verification needs another look.
Generate the verify skill
Write a project-local skill with frontmatter that names the area and says when to use it. Without frontmatter, the skill never registers. From the skill alone, the next agent must be able to tell whether a change touches the verified code, run the check, tell a real bug from a modeling error, and update the verification when a change is intended. Put the coverage record and the sync commit in the skill, and tell the next agent to move the sync commit forward only after it confirms that the verification describes the code at the new commit. Use this repo's real commands, paths, and nouns, and leave no placeholders.
If the check is a TLA+ model, tell the next agent to read every result with the pstack /statechart skill. It shows each invariant violation the checker finds as its shortest path in plain words. When the check passes, /statechart draws a chart of how the system moves between states. Refer to /statechart by name. Its commands, options, and file paths change between releases and machines, so copy none of them into the generated ski
Questions fréquentes
L'équipe doit-elle apprendre le langage de vérification ?
Non. La compétence est rédigée pour que l'équipe puisse faire confiance au résultat et agir dessus sans apprendre l'outil.
Comment la cible est-elle choisie ?
À partir du code : la promesse la plus forte là où une rupture nuit aux utilisateurs et où les tests atteignent rarement la défaillance.
Quel outil est utilisé ?
Celui qui répond à la question au coût le plus bas, comme un vérificateur de modèles ou un assistant de preuve.
Détails
Description originale de l’auteur
Generate a project-local skill that formally verifies the code where a bug costs the most and tests reach the least, in any language, with whichever verification tool fits. Use for /create-formal-verification-skill, \"model-check this race\", \"prove this invariant\", or when concurrency, retries, state machines, parsers, or unsafe code need more than tests.
repo: cursor/plugins
Popularité
- Étoiles GitHub
- 15k
- Position au classement
- #10960
- Licence
- —
- Mis à jour
- 31/10/2026
Commentaires
- …
Autres skills de ce dépôt
advisor
15kPermet à votre agent de consulter un second modèle plus puissant à des moments clés, par exemple avant une grande décision ou face à une erreur bloquante, si vous l'activez.
check-agent-compatibility
15kVérifie si des agents de code IA peuvent démarrer, valider et documenter un dépôt, puis renvoie un score de compatibilité unique avec les principaux problèmes.
cli-for-agents
15kApprend à votre agent à concevoir ou revoir des outils en ligne de commande pour que les agents IA puissent les exécuter sans invites, avec une aide claire et des exemples.
continual-learning
15kMaintient vos notes AGENTS.md à jour en confiant la revue des anciennes conversations à un agent de mise à jour de mémoire dédié.
Skills similaires
test-driven-development
311kApprend à votre agent à écrire d'abord un test qui échoue, à le voir échouer, puis à écrire le code minimal qui le fait réussir, avant de construire toute fonctionnalité ou correction.
verification-before-completion
311kApprend à votre agent à lancer de véritables contrôles et à lire leurs résultats avant d'affirmer qu'une tâche, une correction ou une compilation est terminée ou réussie.
migrate-to-shoehorn
310kRemplace les conversions de type risquées dans vos fichiers de test par la bibliothèque shoehorn, afin que les tests utilisent des données partielles et passent les contrôles de types.