一键导入
simplify
Optional pre-review quality pass — behavior-preserving fixes for reuse, dead weight, altitude, and clarity. Bug hunting is /review-gate's job.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Optional pre-review quality pass — behavior-preserving fixes for reuse, dead weight, altitude, and clarity. Bug hunting is /review-gate's job.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | simplify |
| description | Optional pre-review quality pass — behavior-preserving fixes for reuse, dead weight, altitude, and clarity. Bug hunting is /review-gate's job. |
| argument-hint | [blank to simplify the current branch's changes, or describe what to simplify] |
| disable-model-invocation | true |
| version | 1.0.0 |
| source | EveryInc/compound-engineering-plugin@3.19.0 (ce-simplify-code) |
Simplify recently changed code while preserving exact behavior: same output for every input, same error behavior, same side effects and ordering. Prioritize readable, explicit code over compact code — fewer lines is not the goal.
git diff <default-branch>...).
With no base ref, fall back to staged + unstaged changes (git diff HEAD).If the scope comes up empty, stop and ask the user what to simplify.
Preflight: the reviewers hunt in code. If the scope is documentation-only, or only generated, vendored, lockfile, or mechanical churn (formatting, lint autofix, mass rename), stop with a one-line note that there is nothing to simplify. On a mixed diff, narrow the scope to the code files and continue. Gate on the kind of change only — a user-named scope always runs.
Dispatch one subagent per persona, in parallel where the harness supports it, sequentially otherwise. For each, read its file and pass the full file content verbatim as the subagent's prompt, together with the resolved scope (the full diff or file set) — paraphrasing from memory loses the gating rules that keep the pass behavior-preserving:
references/personas/code-reuse-reviewer.md — existing utilities, duplicated functionality, reimplemented stdlib primitives.references/personas/code-quality-reviewer.md — dead weight, altitude (abstraction level), clarity.references/personas/efficiency-reviewer.md — wasted work, missed concurrency, memory.Wait for all three reviewers, aggregate their findings, and fix each issue directly. A false positive or a fix not worth its churn: note it, skip it, move on — settle it yourself rather than raising it to the user.
Before applying each fix, confirm it preserves behavior (the test above). If it can't clear that test, skip it.
Never simplify away a safety check. Input validation at trust boundaries, error handling that prevents data loss, security checks (authorization, escaping, sanitization), and accessibility affordances stay — even when a finding frames them as redundant. Code that drops one is not simpler, it is unfinished.
On a failure, fix the underlying break or revert the specific simplification that caused it — weakening assertions, types, or skipping tests defeats the behavior-preservation guarantee. If no checks are configured, state that in the summary.
Report fixes applied per dimension (reuse, quality, efficiency), findings skipped as false positives or not worthwhile, and which checks ran with their results. The measure is what improved and that behavior held — many clarity and safety fixes preserve or add lines.
Close with a flow pointer (presentation): /review-gate (user-invoked) — the gate that hunts for bugs and spec drift, in this session; suggest low for a trivial or mechanical diff, high for a large, cross-cutting, or risky one, medium otherwise.
基于 SOC 职业分类
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
Scan the session for compound-worthy learnings, then commit the working tree with a repo-appropriate, value-communicating message.
Garbage-collect the knowledge stores — audit docs/solutions/ and AGENTS.md against the current code.
Capture this session's durable learnings and route each to the right knowledge store, every write user-gated. Use at loop end when /commit's opening scan finds candidates, when /diagnosing-bugs closes out a fix, or when the user wants to capture, remember, or write down a learning, convention, gotcha, or preference.
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to be grilled about a plan, wants a decision stress-tested, or when requirements are fuzzy before a spec is written.