К основному содержанию
скилл CX Codex

maintain-formal-verification-skill — скилл для Claude Code

Сверяет формальную верификацию с изменившимся кодом: обновляет модель или свойства, повторно запускает проверки и разбирает сбои. Пригодится после слияний и рефакторинга.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add backnotprop/pstack --skill maintain-formal-verification-skill -a claude-code
Открыть на GitHub

Что делает maintain-formal-verification-skill

Скилл находит проверки формальной верификации и выясняет, какой код, свойства и допущения они описывают. Он просматривает изменения с последней синхронизации, обновляет модель или тестовый стенд, а затем запускает проверку заново. Результат помогает отличить устаревшее описание от ошибки в самом коде.

При успешной проверке скилл предлагает нарушить защищаемое свойство и проверить, что верификация это обнаружит. При сбое он разбирает контрпример по шагам и сопоставляет его с поведением программы. Изменять можно только модели, стенды, файлы свойств и сам скилл; продуктовый код скилл не правит, если пользователь отдельно этого не попросил. Сбой на актуальном коде нельзя скрывать ослаблением свойства.

Какие задачи решает

  • найти проверки, которые перестали соответствовать изменённому коду
  • обновить модель или тестовый стенд после рефакторинга
  • разобрать контрпример и отличить дрейф проверки от ошибки в коде
  • проверить, что обновлённая верификация по-прежнему ловит нарушение свойства

Примеры запросов агенту

  • Запусти /maintain-formal-verification-skill и проверь, соответствует ли модель текущему коду.
  • После слияния обнови формальные проверки для затронутого кода и сообщи, что именно изменилось.
  • Разбери сбои проверки: покажи шаги контрпримера и отдели ошибку в модели от бага в коде.

Как установить maintain-formal-verification-skill

1Через Skills CLI (Vercel)

npx skills add backnotprop/pstack --skill maintain-formal-verification-skill -a claude-code

2Вручную: положить файлы

~/.claude/skills/maintain-formal-verification-skill/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/maintain-formal-verification-skill/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о maintain-formal-verification-skill

Как установить maintain-formal-verification-skill в Claude Code?

Выполните npx skills add backnotprop/pstack --skill maintain-formal-verification-skill -a claude-code. Файл скилла находится по пути ~/.claude/skills/maintain-formal-verification-skill/SKILL.md.

Что делает maintain-formal-verification-skill?

Он обновляет формальную проверку вслед за изменениями кода, повторно запускает её и разбирает сбои. Итог различает рассинхронизацию проверки и возможный баг в программе.

Может ли скилл исправить продуктовый код, если свойство не выполняется?

Нет. Он меняет только верификацию и сам скилл; баг в продукте нужно описать, а не устранять в ходе проверки.

Исходный текст

SKILL.md · MIT
---
name: maintain-formal-verification-skill
description: "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."
disable-model-invocation: true
---

# Maintain a formal verification skill

A formal check proves a property of what it describes. When the code changes and the verification does not, the check can keep passing while it describes code that no longer exists. That pass is the dangerous case, because it looks like a proof. This skill is the upkeep loop for a verify skill that `/create-formal-verification-skill` generated, or for any project-local skill that runs a model checker, prover, or code-level verifier against named code. The project-local skill handles a change that an agent makes while it uses that skill. This skill handles the changes that skipped it: merges, edits made without the skill, and drift that builds up across many commits.

## Outcomes

Give each check one outcome, and say which:

- **in sync**: no change since the last sync alters what the check describes, and the check passes.
- **updated**: the code changed, the verification now describes the new code, and the check passes.
- **bug**: the verification describes the current code, and the code breaks the property. This is a finding about the code. It is not drift.
- **blocked**: the check could not be brought back in line or could not run. Say exactly why.

A check can be both updated and bug: the update makes the verification describe the code again, and then the property fails on it.

## Edit scope

Edit only the verification: models, harnesses, property files, and the verify skill itself. Never edit product code during a run, unless the user asks you to. When a property fails on the current code, do not weaken the property or the model to make it pass. Report the failure.

## Pass

1. **Find the checks.** A verify skill has no fixed name, so find it by what it does: a project skill that runs a model checker, a prover, or another verifier against named code. Read each one you find, or the one the user named. For each check, collect the property, the code it covers, the bounds and assumptions, the command that runs it, and the commit where it was last confirmed to describe the code. If no verify skill exists, stop and point at `/create-formal-verification-skill`. If the skill does not record a sync commit, use the last commit that changed the verification files, and say that you did.

2. **Run it as it is.** Run each check once before you change anything, and record the result. A pass here does not tell you that the code is correct. It tells you that the old description still holds. A failure here can be drift or a bug. Do not decide which until step 5.

3. **Read every change to covered code.** Diff the covered files from the sync commit to the current commit, and read each commit message. Also look for code that moved: a covered function that is renamed, split, or moved to another file is still covered code. Also look for new code that touches the state that a check guards, such as a new function that writes the same fields. For each change, decide which of these it is:
   - **No effect.** The change does not alter anything the verification describes, such as formatting, comments, or code paths that the verification does not cover. Check this against the model or harness, not against the commit message.
   - **The verification no longer describes the code.** A step that was one indivisible action is now two, a branch was added or removed, a check moved, a new path reaches the guarded state, or a value now has a different range. The model or harness must change.
   - **The promise changed on purpose.** The change alters what the code promises, and evidence in the change says that this is intended: the doc comment, the tests, the changelog, or the commit message. The property must change, and you must cite that evidence.
   - **The promise may be broken.** The code changed, and no evidence says that the promise changed. Treat a failure that follows as a bug candidate.

4. **Update from the code, not from the result.** Change the model or harness so that each changed part again points to code that a reviewer can open, and keep one indivisible step in the code as one step in the verification. Write the update from the code before you rerun, and do not shape it by what makes the check pass. Change a property only for a promise that changed on purpose. Write down the old wording, the new wording, and the evidence. Keep the bounds unless the change makes them wrong. If you must reduce a bound, say so in the report.

5. **Rerun and judge each result.**
   - **Pass:** the check can now pass on a description that has lost the ability to fail. Break the new code the way the property guards against, such as removing a new check or reordering a new step, and confirm that the check catches it. Then drop the break.
   - **Fail:** replay the counterexample against the real code, step by step. If a step cannot happen in the code, the verification is wrong. Fix the verification, and say what was wrong. If every step can happen, it is a bug. Name the commit that introduced it, tell the counterexample as a sequence of steps in the code's own words, and state the harm in one sentence. If a cheap test or reproduction against the real code shows the bug, add it to the report as evidence. Do not commit it to the product code.

6. **Update the verify skill.** Update the code that each check covers, the commands, the bounds, the assumptions, and the sync commit. Set the sync commit to the commit that you checked. Do not move the sync commit for a blocked check, and say so in the report. Then follow the verify skill once as the next agent would, so that you know its steps still run.

## Report

Tell the user, for each check:

- the outcome, and the commits that you read;
- what changed in the verification and why, with a short reason for each change: the code changed shape, or the promise changed on purpose (with the evidence);
- the rerun result, and the break that you used to show the updated check can still fail;
- each bug, in plain words: the counterexample as steps in the code's words, the harm, and the commit that introduced it;
- what the verification still does not cover, including new code that it should cover and does not.

Say outright which failures were drift in the verification and which were bugs in the code. For a check that passed before you updated it and fails after, say that the old pass was on a stale description.

Put the verification updates in a change of their own, separate from any product fix.

© backnotprop · MIT · backnotprop/pstack

Похожие скиллы

Всё по теме «Тесты и QA» →
verification-gate sentimony Скилл не даёт объявить работу законченной без свежих доказательств: собирает матрицу проверок и выносит вердикт по конкретному набору утверждений. CX Codex +1 836установок verification-loop affaan-m Прогоняет работу сессии по шести фазам — сборка, типы, линт, тесты с покрытием, поиск секретов, разбор диффа — и выдаёт отчёт PASS/FAIL. CX Codex +1 5 000установок create-verification-skill michael-denyer Генерирует проектный скилл для сквозной проверки приложения от лица пользователя. Пригодится, когда у репозитория нет готовых сценариев запуска и фиксации поведения. CX Codex +1 890установок laravel-verification affaan-m Прогоняет проект на Laravel по фазам: окружение, линт, статический анализ, тесты с покрытием, аудит зависимостей и готовность к деплою. Пригодится перед PR и релизом. CX Codex +1 4 700установок maintain-integration elastic Проверяет и улучшает существующие пакеты Elastic integration: от манифестов и пайплайнов до CEL-программ и ECS-сопоставлений. CX Codex +1 503установок verification-before-completion Jesse Vincent Скилл запрещает объявлять задачу готовой без свежего запуска проверки и разбора вывода. Нужен перед коммитом или PR, когда словам агента нельзя верить на слово. CX Codex 251 313установок

Из того же набора44

principle-foundational-thinking Набор принципов на этап до написания логики: выбрать типы и структуры данных, навести порядок в каркасе, проверить общее состояние у конкурентных акторов. CX Codex +1 5 100установок correct Находит повторяющиеся ошибки агентов в репозитории и устраняет их через архитектуру, типы или линтеры. Пригодится, когда ИИ раз за разом наступает на одни и те же грабли. CX Codex +1 4 200установок benchmark-checklist Скилл задаёт агенту список вопросов, которые нужно закрыть доказательствами из прогона, прежде чем докладывать об ускорении или регрессии. CX Codex +1 4 100установок principle-explain-the-number Скилл для проверки измеренных чисел: заставляет назвать лимитер и отмести версии, что замер поймал не ту работу. Пригодится до того, как ускорение или регрессия уедут в отчёт. CX Codex +1 4 100установок poteto-help Отвечает на вопросы про pstack: как настроить, как запустить /poteto-mode, какой скилл взять под задачу. Сама работу не начинает — выдаёт готовый промпт. CX Codex +1 3 700установок ketchup Пересказывает изменения в чате с момента последней реплики пользователя и собирает список решений, которые зависят только от человека. CX Codex +1 2 900установок sharpen Скилл разбирает вашу формулировку задачи по четырём вопросам и переписывает промпт так, чтобы работа шла глубже, а не шире. CX Codex +1 2 200установок create-formal-verification-skill Скилл выбирает участок кода для формальной проверки и создаёт локальную инструкцию, чтобы агент мог повторять её при изменениях. Нужен, когда тестов недостаточно для проверки инварианта или порядка событий. CX Codex +1 1 200установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой