pskoett avatar

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

Installs 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

FieldValue
Skill IDsimplify-and-harden
Version0.1.0
TriggerPost-completion hook
AuthorPeter Skøtt Pedersen
CategoryCode Quality / Security
PriorityRecommended

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

More from pskoett/pskoett-ai-skills

All 9

Recommended

More Security
1manutej avatarspring-boot-developmentmanutej/luxor-claude-marketplaceComprehensive Spring Boot development skill covering auto-configuration, dependency injection, REST APIs, Spring Data, security, and enterprise Java application536skills.sh installs
2intellectronica avatarcopilot-sdkintellectronica/agent-skillsThis skill helps with GitHub Copilot SDK work across Node.js/TypeScript, Python, Go, .NET, and Java. It covers setup, authentication, permissions, streaming eve535skills.sh installs
3vercel-labs avatarvercel-deployvercel-labs/agent-skillsDeploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Crea534skills.sh installs
4aj-geddes avatarsql-injection-preventionaj-geddes/useful-ai-promptsPrevent SQL injection attacks using prepared statements, parameterized queries, and input validation. Use when building database-driven applications securely.533skills.sh installs
5dylantarre avatarcomfort-safetydylantarre/animation-principlesUse when creating animations that reassure users, reduce anxiety, or communicate protection and security.532skills.sh installs
6rshankras avatarrelease-reviewrshankras/claude-code-apple-skillsSenior developer-level release review for macOS/iOS apps. Identifies security, privacy, UX, and distribution issues with actionable fixes. Use when preparing an529skills.sh installs