一键导入
simplify
Review-first aggressive code simplification for a target file, directory, or glob, producing numbered findings and applying only user-selected changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review-first aggressive code simplification for a target file, directory, or glob, producing numbered findings and applying only user-selected changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ask the other coding agent (Claude ↔ Codex) to review the relevant changes
Split a multi-finding worktree into per-finding commits via non-interactive `git add -p`. Use when an `/improve` or `/review` pass has edited several distinct findings into the worktree together and they need to land as separate commits. Refuses to run on secret-rendering templates.
Run only the first-principles analysis lens from the improve workflow on a target file, directory, or glob, producing read-only findings without applying edits.
Run only the prior-art and convention lens from the improve workflow on a target file, directory, or glob, producing read-only findings based on mature implementations and local sibling patterns.
Run only the security and threat-model lens from the improve workflow on a target file, directory, or glob, producing read-only adversarial findings.
Run only the radical-simplification lens from the improve workflow on a target file, directory, or glob, producing read-only findings about subtractive or restructuring improvements.
| name | simplify |
| description | Review-first aggressive code simplification for a target file, directory, or glob, producing numbered findings and applying only user-selected changes. |
Read ../improve/references/target-and-agent-contract.md before analyzing.
Goal: make the code more concise, readable, and cohesive. Prefer deletion and smaller interfaces over moving complexity around.
Do not edit, stage, commit, or run mutating commands during the review. A request to operate autonomously does not waive this approval gate.
After the user selects findings, implement only those findings. Treat the numeric selection as binding scope. For multiple selected items, present the concrete implementation and commit plan, then wait for sign-off before editing.
Before removing behavior, confirm the review evidence against the environment where the behavior appears when practical. Absence of local references is not proof that an exported or configuration-driven contract is unused.
For each approved finding:
git diff --cached --check, and run git commit --dry-run before
committing.Before committing, specifically re-check whether any removed parameter, config field, or wrapper was documenting a cross-process, cross-file, or operational contract rather than merely passing data through.
When all selected findings are complete:
When simplifying, do not remove explicit data ownership if the value represents a real domain fact, even if it can currently be derived. Prefer typed source facts plus local adaptation at the consuming boundary over string sentinels or caller-side ternaries.
For concurrency, locking, publishing, atomic file swaps, or privilege/security boundaries, preserve or improve explicit contracts. Do not simplify an interface by deriving paths or lock names unless you first verify every cooperating reader and writer uses the same derived path and that the lock is outside any atomically renamed subtree.
Behavior-preserving structural simplification is in scope, even if it temporarily adds a small type or helper, provided it removes broader tuple, path, or string plumbing.