simplify-and-harden
от pskoett
Coding Agents & IDEsКратко
Post-completion self-review for coding agents that runs simplify, harden, and micro-documentation passes.
Описание
Что делает этот навык
A post-completion review hook for coding agents that runs three sequential passes on the task diff: simplify (dead code, naming, control flow cleanup), harden (input validation, injection vectors, auth checks, secrets), and document (inline comments on non-obvious decisions). Activates after a non-trivial coding task completes and pauses for human approval before applying structural refactors or security changes.
Runs while the agent still holds full context about the task, catching issues a later reviewer would need to reconstruct from scratch.
Когда его использовать
- Catching unused imports and debug logs after finishing an implementation
- Checking new API endpoints for missing auth guards before opening a PR
- Adding decision comments to non-obvious logic before handing off for review
- Flagging hardcoded secrets or unvalidated user inputs in freshly written code
- Running a bounded quality and security sweep before marking a task done
Пример сценария
User asks: Review my changes after completing the user export endpoint
- 1
Re-reads all modified files with fresh eyes before making any edits
- 2
Applies cosmetic fixes automatically (removes unused imports, tightens naming, flattens control flow)
- 3
Presents any structural refactor as an interactive proposal and waits for explicit approval
- 4
Checks the new endpoint for input validation gaps, missing role checks, and exposed secrets
- 5
Adds up to 5 inline comments on non-obvious decisions and outputs a structured YAML summary
Structured YAML summary listing applied fixes, flagged issues, comments added, budget utilization, and whether follow-up review is required
Установка
clawhub install pskoett/simplify-and-hardenВыполните команду CLI или вставьте промпт в Claude Code, Cursor, Codex — любой кодинг-агент, которым пользуетесь.