deadcode
Find and remove dead code in React, Next.js, and Python projects
Install / Use
claude mcp add Coding-Dev-Tools -- npx -y github:Coding-Dev-Tools/deadcodeIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of deadcode
deadcode scores 78/100 on our quality scale, 2265th of 3,478 Development & Engineering skills we index.
Its MCP Server is 7.2 KB long, well organised into 29 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 34 days ago, so deadcode is actively maintained.
- Our last check on 2026-09-20 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 87/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
deadcode compared with similar skills
All 4 of these similar skills score higher than deadcode; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| deadcode (this skill)by Coding-Dev-Tools | 78 | 3 | 34d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 86.1k | 13d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.5k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install deadcode?
- Run
claude mcp add Coding-Dev-Tools -- npx -y github:Coding-Dev-Tools/deadcode. The install tabs above show the steps for each supported agent. - Which AI agents does deadcode work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is deadcode safe to use?
- It is MIT-licensed and scores 87/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is deadcode still maintained?
- The repository was last updated 34 days ago, so deadcode is actively maintained.
Skill content
View source on GitHubDeadCode
Detect and remove unused exports, dead routes, orphaned CSS, and unreferenced components in TypeScript/React/Next.js projects.
⭐ Star this repo if you care about bundle size — it helps other devs find DeadCode!
Installation
# Install from source (PyPI publishing pending)
pip install git+https://github.com/Coding-Dev-Tools/deadcode.git
# Scan current project
deadcode scan
# Scan a specific project
deadcode scan -p /path/to/project
# Preview removable dead code
deadcode remove --dry-run
# Remove confirmed dead code
deadcode remove
Commands
deadcode scan
Scan a TypeScript/React/Next.js project for all categories of dead code.
deadcode scan # Scan current directory
deadcode scan -p /path/to/project # Scan specific project
deadcode scan --json-output # Machine-readable JSON
deadcode scan -c unused_export # Filter by category
deadcode scan -i "generated/" # Ignore paths
deadcode remove
Remove dead code after previewing. Always preview with --dry-run first.
deadcode remove --dry-run # Preview changes (no writes)
deadcode remove # Apply removals
deadcode remove -c orphaned_css # Remove only orphaned CSS
deadcode stats
Quick overview of dead code in your project.
deadcode stats
Categories
| Category | Description | Example |
|----------|-------------|---------|
| unused_export | Exported names never imported elsewhere | export function oldHelper() with zero consumers |
| dead_route | Next.js routes with no internal links | app/legacy/page.tsx no longer linked from navigation |
| orphaned_css | CSS classes not referenced in JSX | .oldClass in styles.module.css with zero usages |
| unreferenced_component | React components defined but never imported | A <LegacyWidget> component with no import sites |
Features
- Unused export detection — finds functions, types, classes, interfaces, enums, and consts that are exported but never imported within your project
- Dead route detection — detects unreachable page components in Next.js App Router projects
- Orphaned CSS detection — finds CSS module classes that are defined but never referenced in TSX/JSX files
- Safe auto-removal —
--dry-runpreview shows exactly what will be deleted first;removeonly blanks self-contained single-line findings and skips (with a warning) anything spanning multiple lines, so it never leaves half-deleted, broken code - Full-project scanning — fast regex-based scanning covers export/import patterns, route detection, CSS class usage, and component references across your entire codebase (no AST/tree-sitter — deliberately dependency-free and quick)
- Monorepo support — handles large projects efficiently with ignore patterns
- CI integration — JSON output for automated pipelines and gating
Ignore / Include Patterns
# Ignore specific paths
deadcode scan -i "generated/" -i "**/*.generated.ts"
# Include only matching paths (whitelist)
deadcode scan --include "src/" # Only scan src/
deadcode scan --include "src/" --include "lib/" # Multiple dirs
deadcode remove --dry-run --include "packages/" # Works with remove
deadcode stats --include "app/" # Works with stats
--include accepts gitignore-style patterns and is repeatable (specify multiple targets).
When both --include and -i/--ignore are used, --include is applied first, then
--ignore excludes any matches within the included paths.
Default ignores: node_modules/, .git/, .next/, dist/, build/, public/, static/
Pricing
DeadCode is one of 11 tools in the Revenue Holdings suite. One license covers all CLI tools.
| Plan | Price | Best For | |------|-------|----------| | Free | $0 | Individual devs, OSS — CLI only, rate-limited | | DeadCode Individual | $12/mo ($10 billed annually) | Professional devs — unlimited scans, auto-removal, CI integration | | Suite (all 11 tools) | $49/mo ($39 billed annually) | Full Revenue Holdings toolkit — 40% savings | | Team | $79/mo ($63 billed annually) | Up to 5 devs — trend analytics, shared baselines, alerts | | Enterprise | Custom | SSO, RBAC, compliance reports, dedicated support |
🔹 No lock-in: CLI works fully offline on the free tier — no telemetry, no phone-home. 🔹 Annual billing: Save 20%.
Per-Tier Features
| Feature | Free | Individual | Suite | Team | Enterprise |
|---------|:----:|:----------:|:-----:|:----:|:----------:|
| CLI: scan, stats | ✓ | ✓ | ✓ | ✓ | ✓ |
| All 4 scanner categories | — | ✓ | ✓ | ✓ | ✓ |
| Auto-removal (deadcode remove) | — | ✓ | ✓ | ✓ | ✓ |
| Unlimited file scanning | — | ✓ | ✓ | ✓ | ✓ |
| CI/CD integration (JSON output) | — | ✓ | ✓ | ✓ | ✓ |
| Project trend baselines | — | — | — | ✓ | ✓ |
| Dashboard & analytics | — | — | — | ✓ | ✓ |
| Compliance reports | — | — | — | — | ✓ |
| RBAC / SSO / SAML / OIDC | — | — | — | — | ✓ |
| Priority support | Community | 24h | 24h | 8h | Dedicated |
<p align="center"> <sub>Part of <a href="https://coding-dev-tools.github.io/devforge/">Revenue Holdings</a> — CLI tools built by autonomous AI.</sub> </p>
CI/CD Integration
# Generate report for CI
deadcode scan --json-output > deadcode-report.json
# Fail CI if any dead routes found
deadcode scan -c dead_route --fail 1
# Fail CI if total findings exceed threshold
deadcode scan --fail 10
# Track dead code trends over time
deadcode scan --json-output > baseline-$(date +%Y-%m-%d).json
Configuration (.deadcode.yml)
Create a .deadcode.yml file in your project root:
# .deadcode.yml
ignore:
- "generated/"
- "**/*.generated.ts"
- "src/legacy/"
categories:
- unused_export
- dead_route
- orphaned_css
- unreferenced_component
# Exit with code 1 if findings >= this number (for CI gating)
fail_threshold: 10
CLI flags override config file settings.
Storage
.deadcode.yml— project configuration (ignore patterns, categories)deadcode-baseline.json— saved scan results for trend tracking
Roadmap
- [ ] VS Code extension with inline decorations showing dead code
- [ ] ESLint plugin integration with auto-fix
- [ ] Webpack/Rollup bundle analysis hooks
- [ ] MCP server for AI-assisted cleanup
- [ ] Incremental scanning with cache
- [ ] GitHub Actions annotator for PR comments
License
MIT — see LICENSE
Related Skills
Agent-Reach
86.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.5k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.2kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
