Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add backnotprop/pstack --skill correct -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/correct/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/correct/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set44

principle-experience-first A principle skill that shifts priority toward the user when product, UX, or feature-scope tradeoffs come up. Useful when deciding what to cut. CX Codex +1 5,100installs principle-separate-before-serializing-shared-state Architectural guideline for concurrent actors: eliminate shared mutable state across files or keys first, resorting to locks only when a single writer is strictly required. CX Codex +1 5,100installs principle-attack-the-premise This skill tests the shared premise behind repeated failed fixes. Use it before writing another fix that hits the same gate. CX Codex +1 5,100installs principle-foundational-thinking A principle set for the stage before logic: pick core types and data structures, order the scaffold, check what concurrent actors share. CX Codex +1 5,100installs benchmark-checklist A skill that makes the agent answer seven questions with evidence from a run before it reports a speedup or a regression. CX Codex +1 4,100installs principle-explain-the-number A skill for the moment before you trust a measured number: name what caps it, then rule out that the test measured something other than your work. CX Codex +1 4,100installs poteto-help Answers questions about pstack: how to set it up, how to run /poteto-mode, which skill fits a task. It hands you a prompt instead of starting work. CX Codex +1 3,700installs ketchup Summarizes chat updates since your last message in plain words and visual diagrams, highlighting decisions that need your approval. CX Codex +1 2,900installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor