Skip to main content
skill CX Codex

simplify-and-harden — Claude Code skill: review after the task

A post-completion self-review pass: simplify, harden, re-verify and micro-document the code while the agent still remembers why it changed.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a claude-code
Open on GitHub

What simplify-and-harden does

The skill fires on its own once the agent finishes the main task and signals completion. It then walks the fresh diff looking for obvious bugs, confusing logic, brittle assumptions and missed hardening. The point is timing: context about the task fades fast, and the next task wipes it clean, so reviewing your own edits later gets harder.

Two passes run. The first simplifies — strip debug logs and dead code, fix names that read badly in hindsight, flatten nested conditionals, narrow an over-wide public API. The second hardens, re-verifies, and writes short notes on non-obvious decisions. Only files touched in the current task are fair game; no refactoring of nearby code. Budget is capped at 20% of the original diff size and 60 seconds, and hitting either limit stops the run with a budget_exceeded flag.

It stays quiet for docs-only, tests-only, formatting-only or generated-file diffs, and for a failed or interrupted task. You can skip it with --no-review. Treat it as a self-pass, not independent review: run it first, then a separate review pass, and merge only after both are addressed.

What it helps with

  • strip debug logs and dead code left from iteration
  • rename variables that read badly on a fresh look
  • flatten nested conditionals with early returns
  • narrow a public API down to what is needed
  • close gaps in input validation and auth checks

Example prompts for the agent

  • task is done, run simplify-and-harden on the diff
  • review the changes in auth.ts with simplify-and-harden
  • we finished this endpoint — do a simplify-and-harden pass

How to install simplify-and-harden

1Skills CLI (Vercel)

npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a claude-code

2Manually: put the files in place

~/.claude/skills/simplify-and-harden/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/simplify-and-harden/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about simplify-and-harden

How do I install simplify-and-harden in Claude?

With the Agent Skills CLI: npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a claude-code. The skill lands at ~/.claude/skills/simplify-and-harden/SKILL.md.

What does simplify-and-harden do?

It runs two passes over the code from the task you just finished: simplification, then hardening with re-verification. It also documents non-obvious decisions.

When does the skill not activate?

When the task failed or was interrupted, or when the diff is docs-only, tests-only, formatting-only or generated files. You can also skip it with the --no-review flag.

Similar skills

Everything for Code review and refactoring →

From the same set4

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