context-decay
Revalidate persistent agent knowledge by classifying why it can become stale and how quickly it changes, then retain, revise,…
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
Claude Code
$ npx -y skills add pskoett/pskoett-ai-skills --skill simplify-and-harden --agent claude-code
Codex
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a codex -y
Cursor
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a cursor -y
Gemini CLI
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a gemini-cli -y
GitHub Copilot
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a github-copilot -y
OpenCode
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a opencode -y
Windsurf
$ npx skills add pskoett/pskoett-ai-skills --skill simplify-and-harden -a windsurf -y
name: simplify-and-harden description: "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."
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
| 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 |
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.
This skill is a post-completion self-pass and does not replace an independent review pass.
Recommended flow: 1. Implement the task. 2. Run Simplify & Harden to clean, harden, and document non-obvious decisions. 3. Run an independent review pass for severity-ordered findings. 4. 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.
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.
The skill activates automatically when ALL of the following are true:
**Non-trivial code change definition**
Treat a diff as non-trivial when either condition is true:
1. 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:
2. 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 config-only, comments-only, formatting-only, generated artifacts only, or tests-only.
The skill does NOT activate when:
**Hard rule: Only touch files modified in this task.**
The agent MUST NOT:
I use this repository to build and test skills for AI agents. The skills follow the Agent Skills specification, and the repo includes an Agent Plugins 1.0 portable package.
Revalidate persistent agent knowledge by classifying why it can become stale and how quickly it changes, then retain, revise,…
Monitors context window health during large, long-running, multi-session, or explicitly context-sensitive work. Uses bounded…
Control-plane workflow for coordinating multi-agent, multi-session project work from a single Codex, GitHub Copilot, or agent-app…
[Beta] CI-only eval regression runner using gh-aw (GitHub Agentic Workflows). Runs all eval cases in .evals/ on a schedule or…
[Beta] Creates permanent eval cases from promoted learnings and runs regression checks against them. Turns failures into test…
Frames coding-agent work sessions with explicit intent capture and drift monitoring. Use when a session transitions from…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…