Simplifies code for clarity and maintainability while preserving exact behavior. Use when: refactoring for readability, reviewing complex code, after a feature works but feels heavy, during code review when complexity is flagged, or when consolidating scattered logic.
From cksnpx claudepluginhub cardinalconseils/claude-starter --plugin cksThis skill is limited to using the following tools:
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Simplification makes code easier to read, maintain, and extend without changing what it does. Every simplification must preserve all inputs, outputs, side effects, and error behavior exactly. The goal is not fewer lines — it is less cognitive load per line.
Read CLAUDE.md, neighboring files, and project conventions. Simplification means making code more consistent with the codebase, not imposing external preferences.
Before any change, confirm tests exist for the code you will simplify. If coverage is missing, add tests first — simplification without tests is gambling.
Preserve Behavior Exactly — All inputs, outputs, side effects, and error behavior must be identical before and after. If you are not sure, do not change it.
Follow Project Conventions — Match the style of the surrounding codebase. Do not introduce patterns the project does not use.
Prefer Clarity Over Cleverness — Explicit is better than compact when compact requires mental parsing. A readable if/return beats a dense ternary chain.
Small, Verifiable Changes — One simplification at a time. Run tests after each. Never batch multiple simplifications into one change.
Scope Discipline — Only simplify what you are asked to simplify. Do not "clean up" adjacent code, rename unrelated variables, or reorganize imports.
Run the test suite after every individual simplification. If a test fails, revert immediately — do not debug forward.
| Rationalization | Reality |
|---|---|
| "This refactor will only take a minute" | Unscoped refactors are the #1 source of regressions. Define scope before starting. |
| "Fewer lines is always better" | Fewer lines that require more mental effort to parse is worse, not better. |
| "Let me also fix this while I'm here" | Scope creep in simplification defeats the purpose. One thing at a time. |
| "This pattern is outdated, let me modernize it" | Consistency with the codebase beats consistency with the latest trends. |
| "Nobody will understand this later" | If it has tests and follows project conventions, it is understandable. |