
Simplify And Harden
A post-completion self-review hook that runs three focused passes on your code before you signal done: simplify (kill dead code, tighten naming, flatten control flow), harden (validate inputs, check error paths, audit security assumptions), and add micro-docs for non-obvious decisions. It only touches what you changed in the current task and stays within a 20% diff budget. The philosophy is sound: exploit peak context before the agent forgets why it made those choices. Refactors require explicit approval via interactive prompts. Best paired with an independent review pass afterward, since self-review has limits. If your agent tends to leave scaffolding behind or skip input validation, this catches it while the context is still warm.
- skills.sh installs
- 540
- GitHub stars
- 331
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pskoett/pskoett-ai-skills --skill simplify-and-harden --agent claude-codeInstalls into .claude/skills of the current project.
Files
Agent Skill: Simplify & Harden
Install
gh skill install pskoett/pskoett-skills simplify-and-harden
For CI-only execution, use:
gh skill install pskoett/pskoett-skills simplify-and-harden-ci
Fallback using the Agent Skills CLI:
npx skills add pskoett/pskoett-skills/skills/simplify-and-harden
npx skills add pskoett/pskoett-skills/skills/simplify-and-harden-ci
Metadata
| Field | Value |
|---|---|
| Skill ID | simplify-and-harden |
| Version | 0.1.0 |
| Trigger | Post-completion hook |
| Author | Peter Skøtt Pedersen |
| Category | Code Quality / Security |
| Priority | Recommended |
Rationale and Philosophy
When a coding agent completes a task, it holds peak contextual understanding of the problem, the solution, and the tradeoffs it made along the way. This context degrades immediately -- the next task wipes the slate. Simplify & Harden exploits that peak context window to perform two focused review passes before the agent moves on.
Sponsors
Details
- Repository
- github.com/pskoett/pskoett-ai-skills
- Categories
- Security, DevOps & CI/CD, Git & Pull Requests, Documentation, Code Review & Quality, AI & Agent Building, Automation & Workflows, Sales & Marketing
- First seen
- Jun 3, 2026