From agents
Simplify working code without changing behavior. Analyze, apply, or explain clarity fixes. Use when recent code feels complex. NOT for review (honest-review) or debt scans (tech-debt-analyzer).
npx claudepluginhub wyattowalsh/agents --plugin agentsThis skill uses the workspace's default tool permissions.
Simplify recently modified code for clarity, consistency, and maintainability while preserving exact behavior.
evals/ambiguous-active-diff.jsonevals/ambiguous-boundary.jsonevals/analyze-explicit.jsonevals/api-validation-change.jsonevals/apply-explicit.jsonevals/apply-invalid-path.jsonevals/apply-snippet.jsonevals/empty-args.jsonevals/explain-explicit.jsonevals/extension-point-removal.jsonevals/implicit-explain.jsonevals/implicit-trigger.jsonevals/mixed-bugfix-intent.jsonevals/mixed-snippet-file.jsonevals/negative-debt-scope.jsonevals/negative-perf-scope.jsonevals/negative-review-scope.jsonevals/policy-boundary-removal.jsonevals/scaling-orchestrator.jsonevals/vague-multi-file-active-diff.jsonCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Simplify recently modified code for clarity, consistency, and maintainability while preserving exact behavior.
NOT for bug hunting (honest-review), debt inventory (tech-debt-analyzer), or performance-only investigation (performance-profiler).
Use these terms exactly throughout all modes:
| Term | Meaning |
|---|---|
| recent scope | The code changed in the current task, current diff, or explicit user target; default operating scope |
| simplification pass | A behavior-preserving cleanup focused on clarity, structure, or redundant machinery |
| behavior preservation | Keeping the same externally observable behavior, contracts, outputs, side effects, and error boundaries |
| semantic change | Any change that alters behavior, API shape, validation rules, ordering guarantees, error semantics, or security posture |
| mechanical cleanup | Low-risk edits like removing obvious redundancy, flattening nesting, renaming for clarity, or deleting dead comments |
| redirection | Explicitly refusing out-of-scope work and naming the correct skill to use instead |
| $ARGUMENTS | Action |
|---|---|
analyze <path, symbol, or snippet> | -> Mode A: Analyze simplification opportunities (read-only) |
apply <path, symbol, or snippet> | -> Mode B: Apply a simplification pass |
explain <path, symbol, or snippet> | -> Mode C: Explain why something feels complex and how to simplify it |
Simplify this code / Make this clearer / Refine this implementation | -> Auto-detect: Mode B only when the Apply Eligibility Gate passes; otherwise Mode A or ask |
| Natural-language request asking what should be simplified | -> Auto-detect: Mode A |
| Empty | Show mode menu with examples |
If no explicit mode keyword is provided:
Apply only when all checks pass:
| Check | Passes When | Otherwise |
|---|---|---|
| Target | One concrete file, symbol, snippet, or tightly bounded recent diff is identified | Analyze first or ask for the target |
| Intent | The request is only a simplification pass | Redirect or ask if it includes bugs, features, API changes, validation changes, security, or perf tuning |
| Behavior invariants | The unchanged outputs, contracts, ordering, side effects, and error boundaries can be stated before editing | Analyze first and list unknowns |
| Validation basis | Existing tests/checks, type contracts, or invariant reasoning cover the narrow target | Ask before editing if weaker than invariant reasoning |
| Scope risk | No mixed snippet/file target, missing path, public API shift, policy boundary, or cross-module rewrite is required | Ask before editing |
analyze on a snippet: stay read-only, classify simplification opportunities inside the pasted code only, and state any assumptions explicitly.explain on a snippet: explain what feels complex and what a safer simpler shape would look like without implying repo-backed edits.apply on a snippet: treat the snippet as the whole scope, simplify only within the pasted text, and verify by invariant reasoning or explicit limitation when project checks are unavailable./simplify analyze src/auth/session.py
/simplify apply src/routes/session.ts
/simplify explain internal/auth/session.go
/simplify
When $ARGUMENTS is empty, present the mode menu:
| Mode | Command | Purpose |
|---|---|---|
| Analyze | analyze <target> | Find the highest-confidence simplification opportunities without editing |
| Apply | apply <target> | Make a behavior-preserving simplification pass |
| Explain | explain <target> | Explain why the code feels complex and what a safer simpler shape looks like |
Paste code, point at a file or symbol, or pick a mode above.
Preserve functionality first — The simplify contract is narrow: never change what the code does; change only how clearly it expresses the same behavior.
Prefer clarity over cleverness — Explicit control flow, obvious names, and readable structure beat compact tricks. Avoid nested ternaries, dense one-liners, and abstraction layers that hide trivial work.
Stay inside recent scope by default — Start with the current task's changes, current diff, or explicit target. Only widen scope when the user asks or the simplification is impossible without a clearly related nearby edit.
Honor project standards — Simplify into the codebase's existing conventions, helpers, and error-handling patterns. Do not impose a generic style if the project already has a better one.
Load only the layer needed for the mode:
| Mode | Load |
|---|---|
| Analyze | references/simplification-taxonomy.md and references/output-formats.md |
| Apply | references/simplification-taxonomy.md, references/behavior-preservation.md, and references/output-formats.md |
| Explain | references/simplification-taxonomy.md and references/output-formats.md |
Read-only simplification report.
$ARGUMENTS, current context, or active diff.references/simplification-taxonomy.md.references/output-formats.md.Make a behavior-preserving simplification pass.
references/simplification-taxonomy.mdreferences/behavior-preservation.mdreferences/output-formats.mdreferences/behavior-preservation.md before editing.references/output-formats.md.Coaching and rationale, no edits.
$ARGUMENTS or pasted code.references/simplification-taxonomy.md.references/output-formats.md.| Scope | Strategy |
|---|---|
| 1 file or 1 symbol | Work inline in a single simplification pass |
| 2-5 files | Split by file ownership; simplify in parallel only when files do not overlap |
| 6+ files or multi-layer refactor | Use /orchestrator for a wave-based plan before editing |
Use simplify for working code that needs to become clearer without changing behavior.
Do not use simplify for:
honest-review, security-scanner)tech-debt-analyzer)performance-profiler)When a request is outside scope, redirect explicitly instead of stretching the skill.
Do not load all references at once. Read only what the current mode needs.
| File | Content | Read When |
|---|---|---|
references/simplification-taxonomy.md | Categories of simplification opportunities, preferred transformations, and anti-patterns to avoid | Analyze, Apply, Explain |
references/behavior-preservation.md | Verification hierarchy, stop conditions, approval boundaries, and behavior-safety checklist | Apply, risky Analyze findings |
references/output-formats.md | Output templates for analyze/apply/explain, empty-args menu, and redirection responses | All modes |