Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Morrison-Lab/ai-config --skill simplifyコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
| name | simplify |
| description | Prune dead code paths and logic. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Edit","Write"] |
After any change that narrows the invocation context (e.g., a job now only runs under branch pipelines, a function is only called from one site, a config option is removed), sweep for dead code that the change made unreachable.
Dead branches — if conditions that can never be true given the new
invocation context. Example: checking for merge_request_event when the
job only runs on branch pipelines.
Unnecessary fallbacks — ${VAR:-fallback} where VAR is always set
in the current context. Simplify to just $VAR.
Redundant guards — checks that duplicate a constraint already enforced by the caller (e.g., a rule in the CI template already ensures an MR exists, so the script's "no MR found" check is belt-and-suspenders — keep it for defense-in-depth, but remove the comment claiming it's the primary gate).
Vestigial comments — comments describing behavior that no longer applies. Stale comments are worse than no comments.
Collapsed conditionals — an if/else where one branch is now
unreachable can be collapsed to just the reachable branch.
Unused variables — assignments whose values are never read downstream.
| Situation | Action |
|---|---|
| Code is unreachable AND no consumer could reach it | Remove |
| Code is unreachable under shipped config but a consumer could override | Keep with a comment explaining why |
| Fallback value is never used but adds clarity | Keep (readability > minimalism) |
| Comment describes removed behavior | Remove or rewrite |
| Defense-in-depth guard (redundant but safe) | Keep the guard, update the comment |
The best code is code that doesn't exist. Every line is a liability — it must be read, understood, maintained, and tested. Remove what you can; document what you keep.
shared/workflow/challenge-unnecessary-complexity.md — the standing
review-time counterpart. This skill only prunes dead code made
unreachable by a narrowed invocation context, triggered after a specific
refactor; the fragment is the broader "flag complexity in
otherwise-correct, reachable content" rule folded into every review pass
(prose and math too, not just code). Run this skill when code just
became unreachable; the fragment's check applies continuously, to code
that is fully reachable but more complex than it needs to be.tidy — the broader on-demand code audit (5 axes, one of which is
"Simplify"); this skill is narrower and specifically about dead-code
removal after a context change.