一键导入
simplify
Review changed code for reuse, quality, and efficiency, then fix any issues found. Use after completing a feature to clean up.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review changed code for reuse, quality, and efficiency, then fix any issues found. Use after completing a feature to clean up.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | simplify |
| description | Review changed code for reuse, quality, and efficiency, then fix any issues found. Use after completing a feature to clean up. |
| argument-hint | [focus area] |
Review recently changed files for code quality issues and fix them. This skill complements agents/code-reviewer.md (the canonical defect/security rubric used by /implement Stage B and /gate-check Code Review) by focusing on cleanup — reuse, clarity, and efficiency — on files that have already passed review. Where wording overlaps (naming, hardcoded values, pattern compliance), follow the code-reviewer rubric as the source of truth.
Find changed files — Check git diff --name-only HEAD~1 (or git diff --name-only for uncommitted changes)
Review for:
agents/code-reviewer.md § Code quality)Fix issues — Apply changes directly, keeping fixes minimal and focused
Verify — Run gate check to ensure nothing broke. If no refactors are warranted (the diff is already minimal) and the no-op preconditions documented in ## When this is a no-op hold, the gate re-run is skipped — re-running an unchanged tree against a clean gate is wasted tokens. Consult the most recent /implement or /gate-check log for the active gate stamp.
Closing summary — dirty-tree advisory (STE-216) — At the end of every /simplify invocation (after Verify, before exit), capture git status --porcelain once. If the output is non-empty (any modified, added, deleted, or untracked file), emit two lines to stdout:
⚠ tree dirty: M <files> — run /pr or git commit to land the simplification
Capability: simplify_tree_dirty
Rendered: tree dirty after /simplify — modified files: <list>; run /pr or git commit to land the simplification
<files> and <list> are the per-file paths from git status --porcelain, comma-joined. The literal token tree dirty: is machine-greppable so the smoke driver and operator-side automation can detect the dirty case deterministically. The simplify_tree_dirty capability key is registered in the static plain-language map shared by /spec-write step 7 (single source of truth).
When the output is empty (clean tree — the no-op gate-skip path or the rare case where the operator committed concurrently), no advisory fires and no capability row emits. The two-line dirty-case output is opt-in by tree state.
The advisory is informational: /simplify continues to exit 0 in the dirty case. Auto-commit was considered as the symmetric fix to /implement Phase 4 and rejected per CLAUDE.md core principle "human approval before commit". Subsequent /pr / /gate-check / git commit are the operator's responsibility; the fix is purely a visibility increase. The advisory fires regardless of whether /simplify itself made the change (canonical case) or /simplify ran on a tree that was already dirty before the skill started — distinguishing source is non-essential, the actionable signal is the dirty tree at exit time.
If $ARGUMENTS specifies a focus area, prioritize that:
/simplify exits as a no-op without re-running gate checks when both preconditions hold:
/simplify entry, so there is nothing to simplify./gate-check returned clean — no failing gate to re-verify.Rationale: re-running an unchanged tree against an already-clean gate produces no signal change, so the gate re-run is skipped to save tokens. The skill emits a single line acknowledging the no-op (referencing this section by name — "per ## When this is a no-op, gate re-run is skipped") and exits. If either precondition fails — the tree has uncommitted changes, or the prior gate stamp is dirty — the carve-out does NOT apply and the full Verify step (3 → 4) runs as normal.
Implement a feature or fix end-to-end. Analyzes the request, builds in TDD order, runs gate checks, self-reviews with bounded loops, and reports for human approval before committing.
Bundle the Release Checklist + /docs --commit --full into one atomic, human-approved release commit. Reads specs/plan/M<N>.md, bumps the four release files, regenerates docs, prompts once for approval, commits on `y`, does not push.
Guide the user through writing or completing spec files (requirements, technical spec, testing spec, plan). Use after /setup to fill in specs before implementation, or to update existing specs.
Set up SDD/TDD development process for the current project. Creates CLAUDE.md, configures settings, and optionally creates spec files. Use when starting a new project or adding process to an existing one.
Socratic design session for greenfield features with open solution spaces. Clarifies goals one question at a time, proposes 2-3 approaches with tradeoffs, gets design approval, then feeds into /spec-write.
Run the project gate checks and report results. Use after completing any feature, before creating a PR, or to verify project health.