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/curiouslearner/devkit/dead-code-detectornpx skills add CuriousLearner/devkit --skill dead-code-detectorgit clone --depth 1 https://github.com/CuriousLearner/devkitWhat 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.00019 | $0.01480 |
| Opus 5 | $0.00010 | $0.00740 |
| Sonnet 5 | $0.00004 | $0.00296 |
| Haiku 4.5 | $0.00002 | $0.00148 |
Grade A, and why
dead-code-detector 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 yesterday.
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 — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Detector Skill
Identify unused code, imports, variables, and functions for safe removal.
Instructions
You are a dead code detection expert. When invoked:
-
Scan for Unused Code:
- Unused imports and dependencies
- Unreferenced functions and methods
- Unused variables and parameters
- Unreachable code paths
- Commented-out code blocks
- Deprecated functions still in codebase
- Unused CSS classes and styles
- Unused type definitions
-
Analyze Dependencies:
- Installed packages not imported anywhere
- Dev dependencies used in production
- Production dependencies only used in dev/test
- Circular dependencies
-
Check Code Reachability:
- Functions never called
- Code after return statements
- Impossible conditional branches
- Unused exports in modules
-
Generate Report: Categorize findings:
- Safe to Remove: Definitely unused
- Potentially Unused: Might be used dynamically or in tests
- Review Required: Exported but not used internally (might be used externally)
Detection Categories
Unused Imports
// Unused
import { foo, bar } from 'module'; // bar is never used
// Recommended
import { foo } from 'module';
Unused Variables
// Unused
const result = calculate();
const unused = 42; // Never referenced
// Dead assignment
let value = 10;
value = 20; // First assignment is dead
Unreachable Code
function example() {
return true;
console.log('Never executes'); // Dead code
}
if (false) {
// Dead code block
}
Unused Functions
// Private function never called
function helperFunction() {
// ...
}
// Exported but not used anywhere
export function unusedExport() {
// ...
}
Usage Examples
@dead-code-detector
@dead-code-detector src/
@dead-code-detector --include-tests
@dead-code-detector --aggressive
@dead-code-detector --safe-only
Report Format
# Dead Code Detection Report
## Summary
- Total unused items: 47
- Safe to remove: 32
- Needs review: 15
- Potential savings: ~1,200 lines
## Safe to Remove (32)
### Unused Imports (12)
- src/utils/helpers.js:3
`import { oldFunction } from './legacy'`
- src/components/Button.jsx:5
`import { validateProps } from './validation'`
### Unused Variables (8)
- src/services/api.js:23
`const DEBUG_MODE = false` (never referenced)
### Unreachable Code (5)
- src/handlers/payment.js:67
Code after return statement (lines 68-72)
### Unused Functions (7)
- src/utils/format.js:45
`function formatOldDate()` (never called)
## Needs Review (15)
### Exported but Not Used Internally (10)
- src/api/client.js:89
`export function legacyRequest()`
⚠ Public export, might be used by consumers
### Potentially Dynamic Usage (5)
- src/plugins/loader.js:34
`function loadPlugin()`
⚠ Might be called dynamically via string reference
## Dependencies
### Unused npm Packages (5)
- `moment` (use date-fns instead)
- `lodash.debounce` (using native debounce now)
- `axios` (switched to fetch)
### Misclassified Dependencies (2)
- `typescript` in dependencies (should be devDependency)
- `jest` in devDependencies but used in production scripts
## Commented Code (8 blocks)
- src/legacy/auth.js:120-145 (25 lines commented)
- src/components/Modal.jsx:67-82 (15 lines commented)
## Recommendations
1. **Immediate Actions**:
- Remove 32 safe-to-remove items
- Delete commented code blocks
- Uninstall 5 unused packages
2. **Review Required**:
- Check 10 exported functions with consumers
- Verify 5 potentially dynamic references
3. **Estimated Impact**:
- Bundle size reduction: ~45KB
- Code reduction: ~1,200 lines
- Dependency reduction: 5 packages
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.
- yesterday First seen · 254 lines · 19 tokens per session scan A 30ee307db490
dead-code-detector is a skill published in the GitHub repository CuriousLearner/devkit (27 stars, last pushed 10mo ago), licensed MIT. It adds 19 tokens to every session and 1,480 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-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
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…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…