correct — Claude Code skill: what it does, how to install
Finds repeated mistakes made by coding agents and makes them impossible through architecture, types, linters, or tests. Useful when agents keep making the same wrong edits.
npx skills add backnotprop/pstack --skill correct -a claude-codeWhat correct does
The skill assumes every AI contributor only inspects opened files, copies nearby patterns, and takes the easiest compiling path. Running /correct triggers an audit of recent commits, reverts, review comments, and workaround notes. Mistakes are grouped into classes once they happen twice.
Fixes follow a strict hierarchy. First comes architecture: give each piece of state one owner, hide internals, and delete dead code agents could mimic. Next are types and linter rules that explicitly name the replacement file or function. Tests come third, while prose documentation is saved strictly for judgment calls.
Every new check must demonstrably fail on an actual past mistake from git history. Any exception requires an inline reason, an expiry date, and human approval. The repository keeps an enforcement table, pairing rules with automated checks until the root issue is eliminated.
What it helps with
- stop agents from repeating known mistakes across pull requests
- replace ignored prompt rules with strict compiler or linter checks
- eliminate dead patterns and legacy code that agents copy
- verify that new tests fail against past buggy commits
Example prompts for the agent
- /correct
- Find recurring mistake classes using /correct and add linter checks
- Run /correct to inspect recent commits and eliminate repeated errors
How to install correct
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a claude-code2Manually: put the files in place
~/.claude/skills/correct/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/correct/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a codex2Manually: put the files in place
.agents/skills/correct/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a cursor2Manually: put the files in place
.cursor/skills/correct/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack correct2Manually: put the files in place
.github/skills/correct/SKILL.md1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a gemini-cli2Platform CLI
gemini skills install https://github.com/backnotprop/pstack --path skills/correctManually: put the files in place
.devin/skills/correct/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill correct -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about correct
How to install correct in Claude Code?
Run npx skills add backnotprop/pstack --skill correct -a claude-code in your terminal.
What does the correct skill do?
It inspects recent commits and reviews to identify recurring agent errors, then systematically eliminates them using architecture, types, linters, and behavioral tests.
Why does the skill prioritize architecture over documentation?
Agents often skip written instructions during code generation. Enforcing boundaries through unexported internals, strict types, or linter errors prevents invalid code from compiling.
Source text
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