simplify-and-harden
БесплатноБез исполняемых скриптовНе проверенPost-completion self-review for coding agents that runs simplify, harden, re-verification, and micro-documentation passes on non-trivial code or high-impact…
от pskoett★ 343 звезды на GitHubОб этом скилле
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.
Most agents solve the ticket and stop. This skill turns "done" into "done well."
The operating philosophy is a deliberate "fresh eyes" self-review before moving on: carefully re-read all newly written code and all existing code modified in the task, and look hard for obvious bugs, errors, confusing logic, brittle assumptions, naming issues, and missed hardening opportunities. The goal is not to expand scope or rewrite the solution -- it is to use peak context to perform a disciplined first review pass while the agent still remembers the intent behind every change.
Best Use with Independent Review
This skill is a post-completion self-pass and does not replace an independent review pass.
Recommended flow:
- Implement the task.
- Run Simplify & Harden to clean, harden, and document non-obvious decisions.
- Run an independent review pass for severity-ordered findings.
- Merge only after both passes are addressed.
If the two disagree, treat the independent review findings as the external gate and either fix or explicitly waive findings.
On-demand independent review
For larger or risky changes, use a general-purpose subagent with fresh context. No named agent preset is required. Give it the changed-file list, diff, approved plan or acceptance criteria, and relevant verification evidence. Ask it to read the scoped code directly and report findings without editing files. Restrict tools to read-only where the host supports it; otherwise state that constraint in the brief. In Copilot, request the same scoped independent review in chat.
Use the Simplify and Harden checklists below for complexity and security. Also compare every supplied requirement against the implementation: missing features, incorrect behavior, incomplete edge/error paths, API and response contracts, test coverage, and unverified acceptance criteria. Classify spec gaps as missing, incorrect, incomplete, or untested.
Require severity-ordered findings with file and line (or "not implemented"), category, concrete evidence, relevant spec reference or attack vector, and a specific fix. Keep out-of-scope observations separate and explicitly report when there are no in-scope findings. The reviewer reports; the implementing agent handles fixes under the existing approval and re-verification rules.
One reviewer can cover all relevant dimensions. Split reviews only when scope or risk justifies it, not automatically into three agents. If independent review is unavailable, report that limitation; a self-pass is not a substitute for an independent merge gate.
Trigger Conditions
The skill activates automatically when ALL of the following are true:
- The agent has completed its primary coding task
- The agent signals task completion (exit code 0, PR ready, or equivalent)
- The diff contains a non-trivial code change (see definition below)
- The skill has not already run on this task (no re-entry loops)
Non-trivial code change definition
Treat a diff as non-trivial when either condition is true:
- It touches at least one executable source file (for example:
*.ts,*.tsx,*.js,*.jsx,*.py,*.go,*.rs,*.java,*.cs,*.rb,*.php,*.swift,*.kt,*.scala,*.sh) and includes either:- At least 10 changed non-comment, non-whitespace lines in executable source files, OR
- At least one high-impact logic change (auth/authz checks, input validation, data access/query logic, external command execution, file path handling, network request handling, or concurrency control).
- It changes configuration, workflow, permissions, deployment, or security policy in a way that can alter who may act, what executes, what is deployed, or which protections apply.
Treat the diff as non-trivial = false when it is docs-only, low-impact con
Установить simplify-and-harden в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл simplify-and-harden?
Post-completion self-review for coding agents that runs simplify, harden, re-verification, and micro-documentation passes on non-trivial code or high-impact configuration changes. Use when a task is complete in a general agent session and you want a bounded quality and security sweep before signaling done. For CI pipeline execution, use simplify-and-harden-ci.
Как установить скилл simplify-and-harden?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл simplify-and-harden запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic