- Home
- Skills
- Code Quality & Review
- Dead Code Finder
Works with the AI tools you already use
Dead Code Finder
Identify and remove unused variables, functions, exports, and orphan files across Python and JS/TS projects.
$9.99
Dead Code Finder
Example session with this skill installed
Scan the src/ directory of my TypeScript project for unused exports and orphan files. The main entry point is src/index.ts.
- Read your context and instructions
- Compiled the dead code finder
- Generated the document
I have scanned the src/ directory against src/index.ts. I identified 4 high-confidence deletions and 2 orphan files.
Dead Code Analysis Report
| File Path | Symbol/Type | Confidence | Reason |
|---|---|---|---|
src/utils/math.ts | calculateLegacyTax | High | Exported but never imported in the project. |
src/components/OldButton.tsx | File (Orphan) | High | No inbound imports found from any other file. |
src/hooks/useLegacyAuth.ts | File (Orphan) | High | No inbound imports found from any other file. |
src/types/index.ts | DeprecatedUser | High | Type definition is not referenced in any module. |
src/services/api.ts | loggerConfig | Medium | Name appears in config.json strings but has no code references. |
src/main.ts | unusedVar | High | Local variable defined but never read. |
Next steps
- Review
src/utils/math.tsandsrc/types/index.tsfor immediate deletion. - Verify if
loggerConfiginsrc/services/api.tsis required by a dynamic runtime configuration before removing. - Run
npm testafter deleting the flagged orphan files to ensure no hidden side effects.
OldButton.tsx
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Large codebases accumulate technical debt in the form of unused exports, variables, and orphan files that bloat bundles and confuse developers. This skill scans your project to identify dead code that can be safely deleted, assigning confidence scores to minimize the risk of breaking dynamic references.
What it does
- Python AST analysis finds unused imports, local variables, and unreferenced functions or classes.
- JS/TS tree shaking identifies exported symbols that are never imported elsewhere in the project.
- Orphan detection flags entire files that have no inbound imports or references.
- Framework awareness respects entry points, test files, dunder methods, and React components used in JSX.
- Confidence scoring categorizes findings from high to low based on the risk of dynamic usage or reflection.
How it works
- Define entry points by specifying your main application files and public APIs to anchor the dependency graph.
- Execute scan on the target directory using the analysis engine.
- Review findings organized by confidence level and file location.
- Apply whitelists to exclude legacy modules or third-party integrations that should remain untouched.
Frameworks & tools
This skill supports Python, JavaScript, and TypeScript projects. It leverages AST parsing and dependency graph analysis to track symbols across modules.
Why this beats prompting it yourself
Generic LLM prompts often miss the difference between a truly unused export and a dynamic reference hidden in a string or registry. This skill systematically builds a dependency tree, ensuring that "dead" code isn't actually a critical entry point or test utility.
Use cases
- Bundle optimization by removing unreferenced JavaScript exports and orphan files.
- Technical debt reduction during major refactors or version migrations.
- Codebase audits to find legacy Python functions that are no longer part of any execution path.
Known limitations
Dynamic features like getattr, reflection, or string-based imports can hide usage. Always run your test suite after performing deletions.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install