# Maintain formal verification skill

> Maintain formal verification skill is an open-source agent skill for security. Re-syncs formal verification models and properties with code changes and flags real bugs. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/michael-denyer/pstack-claude/tree/main/plugins/pstack/skills/maintain-formal-verification-skill
- **Repository:** https://github.com/michael-denyer/pstack-claude
- **GitHub stars:** 5,057
- **License:** MIT
- **Skill name:** maintain-formal-verification-skill
- **Collection:** https://github.com/michael-denyer/pstack-claude
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill keeps a project's formal verification aligned with its code after changes that skipped the verification, such as merges, refactors, or edits made without rechecking. It works on an existing formal verification skill, typically one generated by a companion create command, and treats any project-local skill that runs a model checker, prover, or code-level verifier against named code.

The workflow finds each check and records its property, covered code, bounds, assumptions, and last confirmed commit. It reruns the check before changing anything, then reviews every commit touching covered code and classifies each change as having no effect, requiring a model or harness update, reflecting an intentional change in promises, or possibly breaking a promise. Failures are replayed step by step against the real code to separate stale verification from genuine bugs. Edits are limited to verification files, and product code is not changed during a run.

The skill expects access to the repository history and the ability to run the project's verification tooling. Its platform notes reference Codex, GitHub Copilot, Muse and Antigravity mappings alongside Claude Code.

## When your agent uses it

> Bring a project's formal verification back in line with the code after the code changes: find the commits that touched verified code, update the model, harness, or properties to describe the code as it is now, rerun, and say whether each failure is drift in the verification or a bug in the code. Use for /maintain-formal-verification-skill, "is the model still true to the code", or after merges and refactors that touched verified code without rechecking it.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/michael-denyer/pstack-claude/tree/HEAD/plugins/pstack/skills/maintain-formal-verification-skill)
- [License: MIT](https://github.com/michael-denyer/pstack-claude/tree/HEAD/plugins/pstack/skills/maintain-formal-verification-skill)

## Features

- **Finds covered code changes:** Diffs the code a check covers since its last confirmed commit, including renamed or moved functions.
- **Classifies each change:** Sorts changes into no effect, outdated verification, intended promise change, or possible broken promise.
- **Updates models and harnesses:** Revises the model, harness, or properties to match current code while keeping bounds unless they must change.
- **Separates drift from bugs:** Replays counterexamples against real code to tell stale verification apart from defects in the product.
- **Checks the check still fails:** After updating, breaks the new code on purpose to confirm the verification can still catch the problem.
- **Reports outcomes per check:** Gives in sync, updated, bug, or blocked status for each check with commits read and changes made.

## Good for

- Check whether a formal model still matches the code after a large refactor
- Update a model checker harness after merged changes touched verified functions
- Find out whether a failing proof reflects a real bug or stale verification
- Re-run formal properties after edits made without the verification skill

## Install

### Claude Code

This skill ships in the `pstack` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add michael-denyer/pstack-claude
/plugin install pstack@pstack-claude
```

Or copy only this skill to `~/.claude/skills/maintain-formal-verification-skill`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/maintain-formal-verification-skill &&
cp -R "$tmp/plugins/pstack/skills/maintain-formal-verification-skill" ~/.claude/skills/maintain-formal-verification-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/maintain-formal-verification-skill` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/maintain-formal-verification-skill` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/maintain-formal-verification-skill &&
cp -R "$tmp/plugins/pstack/skills/maintain-formal-verification-skill" ~/.agents/skills/maintain-formal-verification-skill &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/maintain-formal-verification-skill` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/maintain-formal-verification-skill` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/maintain-formal-verification-skill &&
cp -R "$tmp/plugins/pstack/skills/maintain-formal-verification-skill" ~/.cursor/skills/maintain-formal-verification-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/maintain-formal-verification-skill` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/michael-denyer/pstack-claude.git --path plugins/pstack/skills/maintain-formal-verification-skill
```

Or copy the folder to `~/.gemini/skills/maintain-formal-verification-skill` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/maintain-formal-verification-skill`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/maintain-formal-verification-skill &&
cp -R "$tmp/plugins/pstack/skills/maintain-formal-verification-skill" ~/.copilot/skills/maintain-formal-verification-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/maintain-formal-verification-skill` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git
```

Then copy `pstack-claude/plugins/pstack/skills/maintain-formal-verification-skill` into your agent's skills folder as `maintain-formal-verification-skill`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Maintain formal verification skill need to run?

It needs an existing project-local formal verification skill that runs a model checker, prover, or verifier against named code. If none exists, it points to /create-formal-verification-skill.

### Does Maintain formal verification skill change product code?

No. Edits are limited to verification files such as models, harnesses, properties, and the verification skill itself, unless the user asks otherwise.

### When does Maintain formal verification skill trigger?

It is invoked with /maintain-formal-verification-skill, when asking whether the model is still true to the code, or after merges and refactors that touched verified code.

### What happens when a property fails on current code?

It is not weakened. The failure is replayed against the code and reported as a bug if every step can occur in the code.

### How do I install Maintain formal verification skill in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/maintain-formal-verification-skill to use it in all your projects, or to .claude/skills/maintain-formal-verification-skill in one project. Or install the pstack plugin, which includes it: /plugin marketplace add michael-denyer/pstack-claude, then /plugin install pstack@pstack-claude.

### Does Maintain formal verification skill run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Maintain formal verification skill?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Maintain formal verification skill?

The closest alternatives to Maintain formal verification skill are Create formal verification skill, Maintain verification skill, Principle prove it works, Create verification skill and Project review.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Create formal verification skill](https://ai-powered.com/skills/create-formal-verification-skill): Create formal verification skill is an open-source agent skill for developer tools.
- [Maintain verification skill](https://ai-powered.com/skills/maintain-verification-skill): Maintain verification skill is an open-source agent skill for developer tools.
- [Principle prove it works](https://ai-powered.com/skills/principle-prove-it-works): Principle prove it works is an open-source agent skill for developer tools.
- [Create verification skill](https://ai-powered.com/skills/create-verification-skill): Create verification skill is an open-source agent skill for developer tools.
- [Project review](https://ai-powered.com/skills/project-review): Project review is an open-source agent skill for developer tools.
- [Principle sequence verifiable units](https://ai-powered.com/skills/principle-sequence-verifiable-units): Principle sequence verifiable units is an open-source agent skill for developer tools.
- [Correct](https://ai-powered.com/skills/correct): Correct is an open-source agent skill for developer tools.
- [Verify](https://ai-powered.com/skills/verify-humanive): Verify is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/maintain-formal-verification-skill
