correct — скилл для Claude Code: что делает и как установить
Находит повторяющиеся ошибки агентов в репозитории и устраняет их через архитектуру, типы или линтеры. Пригодится, когда ИИ раз за разом наступает на одни и те же грабли.
npx skills add backnotprop/pstack --skill correct -a claude-codeЧто делает correct
Скилл исходит из предпосылки, что агент видит только открытые файлы, копирует соседний пример и выбирает кратчайший компилируемый путь. При вызове /correct он ищет паттерны в недавних коммитах, отменённых правках, комментариях к ревью и инструкциях. Ошибку выделяют в класс после двух повторений.
Решение строится по уровням: сначала архитектура и единый источник правды, затем строгие типы, проверки линтера с подсказкой нужной функции и тесты. Текстовые инструкции в документации идут в последнюю очередь, потому что агент легко их пропустит. Каждую добавленную проверку обязательно подтверждают падением на реальной прошлой ошибке.
Исключения оформляются прямо в проблемной строке с указанием причины, срока действия и одобрения человека. В репозитории ведётся таблица, где каждому правилу сопоставлен механизм принуждения. Правило удаляется, как только архитектура делает ошибку физически невозможной.
Какие задачи решает
- предотвратить повторение типичных ошибок ИИ-агентов в кодовой базе
- заменить игнорируемые текстовые правила архитектурными ограничениями и линтерами
- связать каждое проектное правило с проверяющим тестом или строгой типизацией
- доказать работоспособность новой проверки на прошлых коммитах с багами
Примеры запросов агенту
- /correct
- Найди классы повторяющихся ошибок через /correct и добавь проверки линтера
- Используй /correct для проверки недавних коммитов и отката неверных правок
Как установить correct
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a claude-code2Вручную: положить файлы
~/.claude/skills/correct/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/correct/
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a codex2Вручную: положить файлы
.agents/skills/correct/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a cursor2Вручную: положить файлы
.cursor/skills/correct/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack correct2Вручную: положить файлы
.github/skills/correct/SKILL.md1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a gemini-cli2Командой платформы
gemini skills install https://github.com/backnotprop/pstack --path skills/correctВручную: положить файлы
.devin/skills/correct/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора44
Похожие
Рядом в теме «Настройка агента: память, контекст, субагенты»
Все скиллы по теме «Настройка агента: память, контекст, субагенты» →Вопросы о correct
Как установить correct в Claude Code?
Для установки выполните команду npx skills add backnotprop/pstack --skill correct -a claude-code.
Что делает скилл correct?
Он анализирует историю правок и ревью, находит частые промахи агентов и блокирует их через изменения архитектуры, типизацию, линтеры или тесты.
В каком порядке скилл предлагает устранять ошибки?
Сначала применяется архитектурная изоляция, затем типы и линтеры с подсказкой исправлений, следом тесты поведения и только в конце — текстовые инструкции.
Исходный текст
SKILL.md · MIT
--- name: correct description: "Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types, then a lint whose error names the fix, then a test, and write docs last. Prove each check fails on a real past mistake. Repeat this each time the operator corrects you. Use for /correct." disable-model-invocation: true --- # Correct The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them. Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo. ## Find the mistake classes First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice. ## Fix each class at the highest level that works 1. **Eliminate it with architecture.** Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy. 2. **Enforce it with types so the bad state can't be written.** If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more. 3. **Test the behavior.** Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change. 4. **Write docs or agent rules last, only for judgment calls.** Nothing fails when an agent skips them. ## Fix and prove Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval. ## Keep the rule table Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen. **Reply:** each class with its evidence, the level you picked, and why a higher level didn't work.
© backnotprop · MIT · backnotprop/pstack