find-dead-code

Detect unused functions, classes, imports, and orphaned config keys in Python, JavaScript/TypeScript, and Go codebases.

5|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/tomzx/agents --skill find-dead-code-tomzx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-dead-code
Source: https://github.com/tomzx/agents/tree/main/skills/find-dead-code
Command: npx skills add https://github.com/tomzx/agents --skill find-dead-code-tomzx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify unused and unreachable code across a codebase and propose safe removals.

Core Features & Use Cases

  • Detects unused functions, methods, classes, imports, and orphaned config keys across Python, JavaScript/TypeScript, and Go projects.
  • Provides a ranked list of safe removals with notes on references and potential edge cases.
  • Supports guided validation workflows to ensure removals do not break behavior.

Quick Start

Run a repository-wide dead code scan to surface candidates for removal.

Frequently Asked Questions about find-dead-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find unused functions and dead code in a Python project?

To find dead code in a Python project, this Skill runs static analysis scanners across your repository to detect unused functions, classes, and imports, ranking findings by safety for manual review and removal.

Can I detect unused imports and orphaned config keys in JavaScript or Go repositories?

Yes, you can detect unused imports and orphaned config keys in JavaScript, TypeScript, and Go repositories using language-specific scanners and generic heuristics that identify unreachable code across your codebase.

What is the safest way to remove unreachable code during a refactor?

The safest way to remove unreachable code is to use this Skill to rank candidates by safety, note potential edge cases and references, and follow its guided validation workflows to ensure removals do not break behavior before deletion.

Does this dead code static analysis tool work with both Python and Go?

Yes, this dead code static analysis tool works with Python, JavaScript, TypeScript, and Go repositories, applying language-specific scanners to identify unused functions, methods, classes, and imports across different codebases.

What are the limitations of automated dead code removal?

Automated dead code removal has limitations regarding edge cases and dynamic references, so this Skill prioritizes safe removals and provides guidance for manual review before deletion to prevent breaking existing behavior.