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.
npx skills add https://github.com/pskoett/pskoett-ai-skills --skill simplify-and-harden