
Dead Code
Run on-demand TLDR dead-code analysis to list unused functions before refactors or release review.
Overview
Dead-code is an agent skill most often used in Ship (also Build and Operate) that finds unused functions and dead code via TLDR static analysis.
Install
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill dead-codeWhat is this skill?
- Runs `tldr dead` for project-wide or directory-scoped unused function detection
- Supports `--entry` patterns to exclude main, CLI, tests, and framework route handlers
- `--lang python` and `--lang typescript` for language-targeted scans
- Cross-platform Bash workflow (Windows PowerShell, Mac, Linux, WSL)
- On-demand replacement for slower automatic session-start dead-code hooks
- Documents comparison table: hook added ~3s startup vs on-demand skill
Adoption & trust: 552 installs on skills.sh; 3.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your codebase has grown helper and legacy functions and you cannot tell which symbols are still reachable without slow manual tracing.
Who is it for?
Indie maintainers who want a quick unused-function sweep before merge, refactor, or dependency cleanup.
Skip if: Runtime-only dead paths that static analysis cannot see, or teams forbidden from running shell analysis tools in CI.
When should I use this skill?
You need unused function and dead-code reports via TLDR instead of automatic session hooks.
What do I get? / Deliverables
You receive a TLDR dead-code report listing unused functions with paths and lines, respecting your declared entry points and language.
- Dead-code summary with total and unused function counts
- File path and line references per unused symbol
- Configurable entry-point exclusion list
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Dead-code detection is canonically shelved under Ship review because it supports pre-release cleanup and quality gates, though it also helps during active Build and Operate refactors. Static unused-function reports fit code review and hygiene checks rather than primary test execution or security scanning.
Where it fits
Scan `src/` after a feature merge to drop orphaned API helpers before wiring new routes.
Run `tldr dead .` with test entry patterns excluded to produce a pre-release deletion checklist.
Target `legacy/` with `--lang typescript` to justify removing deprecated modules during a maintenance sprint.
How it compares
On-demand TLDR dead analysis via Bash—not a full test coverage suite or automatic IDE unused-symbol pass alone.
Common Questions / FAQ
Who is dead-code for?
Solo builders and small teams with Python or TypeScript codebases who use agents with Bash access and want structured unused-function lists.
When should I use dead-code?
During Ship review before release, during Build when trimming modules, or during Operate when refactoring legacy folders—run when cleanup is the goal, not on every session start.
Is dead-code safe to install?
It instructs local `tldr` scans; review the Security Audits panel on this page and treat reported symbols as candidates—verify exports and dynamic calls before deleting.
SKILL.md
READMESKILL.md - Dead Code
# Dead Code Detection Find unused functions and dead code using TLDR static analysis. ## Quick Start ```bash # Scan entire project tldr dead . # Scan specific directory tldr dead src/ # Specify entry points (functions to exclude from analysis) tldr dead . --entry main cli test_ # Specify language tldr dead . --lang python tldr dead . --lang typescript ``` ## Output Format ``` Dead code analysis: Total functions: 150 Dead functions: 12 Unused functions: - old_helper (src/utils.py:42) - deprecated_func (src/legacy.py:15) - _unused_method (src/api.py:230) ``` ## Cross-Platform Works on Windows, Mac, and Linux (including WSL). ```bash # Windows (PowerShell) tldr dead . # Mac/Linux tldr dead . ``` ## Entry Points Functions matching entry patterns are excluded from dead code analysis: - `main`, `cli` - Application entry points - `test_*`, `*_test` - Test functions - `setup`, `teardown` - Fixtures - `@app.route`, `@api.endpoint` - Framework handlers ```bash # Custom entry points tldr dead src/ --entry main api_handler background_job ``` ## Integration This skill replaces the session-start-dead-code hook with on-demand analysis. | Approach | Pros | Cons | |----------|------|------| | Hook (removed) | Automatic | Slowed startup by 3s | | Skill (this) | On-demand, fast | Manual invocation | ## Related Commands ```bash # Impact analysis (who calls this?) tldr impact func_name . # Architecture layers tldr arch src/ # Full codebase structure tldr structure . --lang python ```