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 commands/mathisk2095/jko-claude-plugins/dead-code-cleangit clone --depth 1 https://github.com/mathisk2095/jko-claude-pluginsWhat 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.00016 | $0.01447 |
| Opus 5 | $0.00008 | $0.00724 |
| Sonnet 5 | $0.00003 | $0.00289 |
| Haiku 4.5 | $0.00002 | $0.00145 |
Grade A, and why
dead-code-clean 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 2d 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 — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Clean
Actively find and remove dead code from the target. Makes changes directly. Defaults to 'high' confidence mode.
CRITICAL: This command modifies files. Ensure the working tree is clean before starting. Each phase is verified with build + tests before proceeding to the next.
First: Use the dead-code-expert skill for the full detection catalog, false-positive awareness, and safe removal strategies.
Preparation
- Detect project language from config files.
- Determine the target and confidence mode ($2 or default 'high').
- Ensure the working tree is clean:
git status --porcelain | head -5
If dirty, warn the user but proceed if they confirm.
Phase 1: Certain Dead Code (always remove)
1a. Unused Imports
Run the language-appropriate tool and fix:
Python:
ruff check --select F401 --fix
JS/TS: Read each file, identify imports not referenced in the file body, remove them with Edit.
Rust: Run cargo clippy and fix unused import warnings.
Go: Already a compile error -- nothing to do.
1b. Unused Local Variables
Python:
ruff check --select F841 --fix
Other languages: Read flagged files from linter output and remove unused variables with Edit.
1c. Debug Artifacts
Find and remove in production code (not tests):
rg -n '(console\.log|print\(|dbg!\(|println!\(|debugger|breakpoint\(\))' . --glob '!*test*' --glob '!*spec*' --glob '!node_modules*' --glob '!target*'
Remove each artifact. Replace println!/print() with structured logging if the project uses a logging framework.
1d. Unreachable Code
Find code after return/break/throw and remove it.
1e. Commented-Out Code
Find blocks of commented-out code:
rg -n '^\s*(//|#)\s*(const|let|var|function|class|import|from|if|for|while|return|def |fn |pub )\b' . --glob '!*test*' --glob '!node_modules*' --glob '!target*'
Read context around each match. If it's genuinely commented-out code (not documentation), delete it. Version control has the history.
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.
- 2d ago First seen · 163 lines · 16 tokens per session scan A 526716059a41
dead-code-clean is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 4d ago), licensed MIT. It adds 16 tokens to every session and 1,447 once invoked, about $0.0001 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 commands, from other repositories
url
Print the tlive web terminal/dashboard link + QR code.
codex-review
Run OpenAI Codex code review on current changes or a specific branch/commit.
raw-export
Export raw conversation data directly from JSONL session files.
setup
Guided tlive setup (IM channels, start, verification).
close
Close out a Linear issue — move to Done, add a closing comment, and clean up the local branch/worktree.
prompt
Convert a rough ask into a structured XML-tagged prompt using the factory-prompting vocabulary.