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 agentmods add skills/conniehan2019/code-removal-skill/dead-code-removalnpx skills add ConnieHan2019/code-removal-skill --skill dead-code-removalgit clone --depth 1 https://github.com/ConnieHan2019/code-removal-skillWhat 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 | $0.00119 | $0.08068 |
| Opus 5 | $0.00060 | $0.04034 |
| Sonnet 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 3d 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.
- 3d 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 2mo ago), licensed MIT. It adds 119 tokens to every session and 8,068 once invoked, about $0.0006 per session on Opus 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…