Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ConnieHan2019/code-removal-skill --skill dead-code-removalgit clone --depth 1 https://github.com/ConnieHan2019/code-removal-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/conniehan2019/code-removal-skill/dead-code-removal)<a href="https://agentmods.dev/skills/conniehan2019/code-removal-skill/dead-code-removal"><img src="https://agentmods.dev/badge/skills/conniehan2019/code-removal-skill/dead-code-removal/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/conniehan2019/code-removal-skill/dead-code-removal"><img src="https://agentmods.dev/badge/skills/conniehan2019/code-removal-skill/dead-code-removal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00119 | $0.08068 |
| Opus 5.5 | $0.00048 | $0.03227 |
| Sonnet 5.5 | $0.00024 | $0.01614 |
| Haiku 4.5 | $0.00012 | $0.00807 |
Grade A, and why
dead-code-removal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 629 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Removal Skill
version: 0.1.0 status: open-source release (methodology mature; packaging new) language toolchain: Go (
scripts/*.sh); methodology is language-agnostic — swap the scripts to support another language.
🚨 Top-Level Non-Negotiable Rules (read first — violations cause repeated permission prompts)
If you run this skill inside a permission-gated agent (e.g. Claude Code), violating any of these forces a permission prompt on nearly every command.
-
Don't prefix the validation scripts with env vars
- ❌
GOCACHE=... GOFLAGS=-mod=mod scripts/build-check.sh ./... - ✅
scripts/build-check.sh ./... - Why: an env-var prefix creates a new command prefix that is not on your allowlist → a fresh prompt every time. If your environment needs fixed cache/proxy locations, export them once in your shell profile, or edit the script defaults — never prefix at the call site.
- ❌
-
Don't add decorative pipes (
| head,| tail,| tee)- ❌
scripts/build-check.sh ./... 2>&1 | tail -5 - ✅
scripts/build-check.sh ./...(output is short; if long, truncate with your editor/Readtooling) - Why: a composite command re-matches the allowlist;
tail/headmay not be allowed, so the whole pipeline prompts.
- ❌
-
Don't edit source code with Bash
- ❌
sed -i .../awk > tmp && mv tmp file/head -n X file > new && tail >> new && cp new file - ✅ Use your editor / file-edit tooling
- Why: Bash-edited source can't be diffed cleanly and easily trips sandbox write permissions.
- ❌
-
Don't dress up an unverified risk as a decision for the user
- Before escalating to a human, pass the 3 gates in §Supervisor Mode → Escalation Gate (fact closure / technical closure / decision residue).
If you violate 1–3, re-read this section and switch to the prescribed form — don't power through and trigger the prompt.
Goal
Given a deprecated entry point (HTTP handler) or a module directory, automatically find and remove every downstream dependency that is referenced only by the dead code — so the removal is both correct and complete in a single pass.
What ships with it
39 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/acceptance-criteria.md 9.6 KB
- references/acceptance-criteria.zh.md 8.3 KB
- references/agent-orchestration-workflow.md 19 KB
- references/agent-orchestration-workflow.zh.md 16 KB
- references/blind-review-prompt.md 3.9 KB
- references/blind-review-prompt.zh.md 3.3 KB
- references/blind-review-result-template.md 1.4 KB
- references/blind-review-result-template.zh.md 1.3 KB
- references/drafts/langgraph-implementation-design.md 11 KB
- references/drafts/langgraph-implementation-design.zh.md 11 KB
- references/drafts/permission-hook.md 6.5 KB
- references/drafts/permission-hook.zh.md 5.6 KB
- references/eval-checklist.md 9.3 KB
- references/eval-checklist.zh.md 8.0 KB
- references/execution-result-template.md 1.1 KB
- references/execution-result-template.zh.md 1.0 KB
- references/executor-prompt-template.md 2.6 KB
- references/executor-prompt-template.zh.md 2.3 KB
- references/iteration-template.md 2.2 KB
- references/iteration-template.zh.md 2.0 KB
- references/orchestration-proof-template.md 2.4 KB
- references/orchestration-proof-template.zh.md 2.3 KB
- references/permission-template.md 11 KB
- references/permission-template.zh.md 9.9 KB
- references/README.md 1.8 KB
- references/README.zh.md 1.6 KB
- references/removal-list-template.md 6.5 KB
- references/removal-list-template.zh.md 5.9 KB
- references/runtime-validation-checklist.md 6.8 KB
- references/runtime-validation-checklist.zh.md 5.8 KB
- references/supervisor-board-template.md 789 B
- references/supervisor-board-template.zh.md 674 B
- references/supervisor-checklist.md 6.5 KB
- references/supervisor-checklist.zh.md 5.3 KB
- scripts/build-check.sh 946 B runs code
- scripts/module-gone-check.sh 561 B runs code
- scripts/tidy-check.sh 933 B runs code
- scripts/vet-check.sh 771 B runs code
- SKILL.zh.md 30 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 629 lines · 119 tokens per session scan A 65aeb7a1cf11
dead-code-removal is a skill published in the GitHub repository ConnieHan2019/code-removal-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 119 tokens to every session and 8,068 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
dead-code-removal compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dead-code-removalConnieHan2019/code-removal-skill | Skill | 5 | 5mo ago | MIT | A | 119 | Claude Code |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | today | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 71 | Claude Code, Codex |
| observability-audit-sessionsIBM/mcp-context-forge | Skill | 4.9k | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 343 | today | Apache-2.0 | A | 112 | Claude Code |
| performance-verificationvalkor-ai/loom | Skill | 1.6k | 2d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| ci-fixersipyourdrink-ltd/bernstein | Skill | 1.2k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |