$npx -y skills add parcadei/Continuous-Claude-v3 --skill dead-codeFind unused functions and dead code in the codebase
| 1 | # Dead Code Detection |
| 2 | |
| 3 | Find unused functions and dead code using TLDR static analysis. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ```bash |
| 8 | # Scan entire project |
| 9 | tldr dead . |
| 10 | |
| 11 | # Scan specific directory |
| 12 | tldr dead src/ |
| 13 | |
| 14 | # Specify entry points (functions to exclude from analysis) |
| 15 | tldr dead . --entry main cli test_ |
| 16 | |
| 17 | # Specify language |
| 18 | tldr dead . --lang python |
| 19 | tldr dead . --lang typescript |
| 20 | ``` |
| 21 | |
| 22 | ## Output Format |
| 23 | |
| 24 | ``` |
| 25 | Dead code analysis: |
| 26 | Total functions: 150 |
| 27 | Dead functions: 12 |
| 28 | |
| 29 | Unused functions: |
| 30 | - old_helper (src/utils.py:42) |
| 31 | - deprecated_func (src/legacy.py:15) |
| 32 | - _unused_method (src/api.py:230) |
| 33 | ``` |
| 34 | |
| 35 | ## Cross-Platform |
| 36 | |
| 37 | Works on Windows, Mac, and Linux (including WSL). |
| 38 | |
| 39 | ```bash |
| 40 | # Windows (PowerShell) |
| 41 | tldr dead . |
| 42 | |
| 43 | # Mac/Linux |
| 44 | tldr dead . |
| 45 | ``` |
| 46 | |
| 47 | ## Entry Points |
| 48 | |
| 49 | Functions matching entry patterns are excluded from dead code analysis: |
| 50 | - `main`, `cli` - Application entry points |
| 51 | - `test_*`, `*_test` - Test functions |
| 52 | - `setup`, `teardown` - Fixtures |
| 53 | - `@app.route`, `@api.endpoint` - Framework handlers |
| 54 | |
| 55 | ```bash |
| 56 | # Custom entry points |
| 57 | tldr dead src/ --entry main api_handler background_job |
| 58 | ``` |
| 59 | |
| 60 | ## Integration |
| 61 | |
| 62 | This skill replaces the session-start-dead-code hook with on-demand analysis. |
| 63 | |
| 64 | | Approach | Pros | Cons | |
| 65 | |----------|------|------| |
| 66 | | Hook (removed) | Automatic | Slowed startup by 3s | |
| 67 | | Skill (this) | On-demand, fast | Manual invocation | |
| 68 | |
| 69 | ## Related Commands |
| 70 | |
| 71 | ```bash |
| 72 | # Impact analysis (who calls this?) |
| 73 | tldr impact func_name . |
| 74 | |
| 75 | # Architecture layers |
| 76 | tldr arch src/ |
| 77 | |
| 78 | # Full codebase structure |
| 79 | tldr structure . --lang python |
| 80 | ``` |