configs/agents/skills/review-and-simplify-changes/SKILL.md
Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes. Use when the user asks to "simplify code", "review changed code", "check for code reuse", "review code quality", "review efficiency", "simplify changes", "clean up code", "refactor changes", or "run simplify".
npx skillsauth add Ehrax/dotfiles review-and-simplify-changesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-agents to review in parallel, but keep those sub-agents read-only: they should only inspect code and send findings back to the main agent. Only the main agent may apply high-confidence, behavior-preserving fixes.
Choose the mode from the user's request:
review-only: user asks to review, audit, or check the changessafe-fixes: user asks to simplify, clean up, or refactor the changesfix-and-validate: same as safe-fixes, but also run the smallest relevant validation after editsIf the user does not specify, default to:
review-only for "review", "audit", or "check"safe-fixes for "simplify", "clean up", or "refactor"Prefer this scope order:
If there is no clear scope, stop and say so briefly.
When using git changes, determine the smallest correct diff command based on the repo state:
git diffgit diff --cachedDo not assume git diff HEAD is the right default when a smaller diff is available.
Before reviewing standards or applying fixes, read the repo's local instruction files and relevant project docs for the touched area. Prefer the closest applicable guidance, such as:
AGENTS.mdUse those instructions to distinguish real issues from intentional local patterns.
Use Codex sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.
When spawning sub-agents:
apply_patch, stage changes, commit, or perform other state-mutating actionsUse four review roles.
Review the changes for reuse opportunities:
This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.
Recommended sub-agent role: explorer for broad codebase lookup, or reviewer if a stronger review pass is more useful than wide search.
Review the same changes for code quality issues:
This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.
Recommended sub-agent role: reviewer
Review the same changes for efficiency issues:
This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.
Recommended sub-agent role: reviewer
Review the same changes for clarity, local standards, and balance:
This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.
Recommended sub-agent role: reviewer
Only report issues that materially improve maintainability, correctness, or cost. Do not churn code just to make it look different.
Wait for all review sub-agents to complete, then merge their findings.
The main agent owns this step. Treat sub-agent output as review input only, not as permission to delegate code changes back out.
Normalize findings into this shape:
Discard weak, duplicative, or instruction-conflicting findings before editing.
In review-only mode, stop after reporting findings.
In safe-fixes or fix-and-validate mode:
Prefer fixes like:
Do not stage, commit, or push changes as part of this skill.
In fix-and-validate mode, after the main agent finishes edits, run the smallest relevant validation for the touched scope.
Examples:
Prefer fast, scoped validation over full-suite runs unless the change breadth justifies more.
If validation is skipped because the user asked not to run it, say so explicitly.
Close with a brief result:
If the code is already clean for this rubric, say that directly instead of manufacturing edits.
development
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
development
Grilling session that mines the user for fragments — heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) — and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions "fragments", "ideate", or "raw material" for writing.
documentation
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
development
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".