clarification
Use when a user's request is vague, ambiguous, or underspecified. Explores the codebase first, then runs an iterative Q&A loop…
Review changed code for reuse opportunities, quality issues, and inefficiencies using three parallel review agents, then fix any issues found. Triggers when the user says "simplify", "clean up the code", "review the changes", or after run-plan execution when code quality
$ npx -y skills add tmdgusya/engineering-discipline --skill simplify --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/simplifyContext preview
The summary Claude sees to decide when to auto-load this skill.
Review changed code for reuse opportunities, quality issues, and inefficiencies using three parallel review agents, then fix any issues found. Triggers when the user says "simplify", "clean up the code", "review the changes", or after run-plan execution when code quality
name: simplify description: Review changed code for reuse opportunities, quality issues, and inefficiencies using three parallel review agents, then fix any issues found. Triggers when the user says "simplify", "clean up the code", "review the changes", or after run-plan execution when code quality verification is needed.
Reviews all changed files through three parallel agents — reuse, quality, and efficiency — then fixes any issues found.
Changed code is the only review target. Each review dimension runs independently, sees the full diff, and reports findings without knowledge of the other agents' results. The main agent aggregates and applies fixes.
1. **Identify changes before reviewing.** Always run `git diff` (or `git diff HEAD` if there are staged changes) first. Never review without knowing what changed. 2. **All three agents must run in parallel.** Sequential execution of the three review agents is prohibited. Dispatch all three concurrently in a single message. 3. **Each agent receives the full diff.** Do not split or filter the diff per agent. Every agent sees every change. 4. **Fix issues directly.** This skill produces code changes, not just a report. If a finding is actionable, fix it. 5. **Skip false positives silently.** If a finding is not worth addressing, move on. Do not argue with the finding or explain why it was skipped. 6. **Do not expand scope beyond the diff.** Review only the changed code. Do not refactor untouched code, even if it has the same issues.
1. Run `git diff` to see unstaged changes 2. If no output, run `git diff HEAD` to check staged changes 3. If still no output, check for recently modified files that the user mentioned or that were edited earlier in this conversation 4. If no changes can be identified, notify the user and stop
Capture the full diff output — this is the input for all three agents.
Dispatch all three agents concurrently via the Agent tool in a single message. Each agent receives the full diff and its review prompt below.
**What to provide to each agent:**
**What NOT to provide:**
Provide this prompt to the agent:
> You are reviewing a code diff for reuse opportunities. Your job is to find new code that duplicates functionality already in the codebase. > > For each change in the diff: > > 1. **Search for existing utilities and helpers** that could replace newly written code. Search utility directories (`utils/`, `helpers/`, `lib/`, `common/`, `shared/`), files adjacent to the changed ones, and files imported by the changed files. > 2. **Flag any new function that duplicates existing functionality.** Report the new function, the existing function, and where the existing one lives. > 3. **Flag inline logic that could use an existing utility.** Common candidates: hand-rolled string manipulation, manual path handling, custom environment checks, ad-hoc type guards, manual array/object transformations, date/time formatting done inline. > 4. **Flag reimplemented standard library features.** Check if the change reimplements something available in the language's standard library or in already-installed dependencies. > > For each finding, report: > - **Reuse opportunity:** [brief description] > - New code: [file:line] — [what was written] > - Existing: [file:line] — [what already exists] > - Suggestion: [how to replace] > > If no reuse issues are found, report: "No reuse issues found."
Provide this prompt to the agent:
> You are reviewing a code diff for quality issues. Your job is to find hacky patterns, unnecessary complexity, and abstraction boundary violations. > > Check for these patterns: > > 1. **Redundant state:** new variables that are always derived from another variable, caches that store what could be computed on access, event listeners or observers that could be direct function calls. > 2. **Parameter sprawl:** functions that gained a new boolean flag parameter, functions with more than 4 parameters after the change, multiple parameters that are always passed together and should be a single object. > 3. **Copy-paste with slight variation:** two or more blocks that differ by only 1-2 lines, repeated conditional structures with different field names, similar error handling blocks across multiple locations. > 4. **Leaky abstractions:** accessing private fields or internal state from outside the module, passing implementation details across module boundaries, changes that make one module depend on another's internal structure. > 5. **Stringly-typed code:** new string comparisons against values already defined as constants, new string literals matching existing enum or union type values, magic strings appearing in multiple places without a shared constant. > 6. **Unnecessary comments:** comments explaining WHAT the code does, narrating the change, or referencing a task. Delete these. Keep only comments that explain non-obvious WHY — hidden constraints, subtle invariants, workaround
Engineering discipline skills for AI coding agents. Works with Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.
Use when a user's request is vague, ambiguous, or underspecified. Explores the codebase first, then runs an iterative Q&A loop…
Corrective cleanup of AI-generated code — removes LLM-specific patterns while preserving behavior. Use when the user says…
Behavioral guardrails to prevent common LLM coding mistakes — enforces surgical changes, assumption verification, and scope…
Orchestrates multi-day execution of complex tasks through milestones. Each milestone goes through plan-crafting, run-plan…
Decomposes complex, multi-day tasks into optimized milestones (ultraplan). Broad parallel exploration grounds a draft milestone…
Use when a task's scope is clear and multi-step implementation is needed, before touching code. Triggered after clarification is…