dead-code-analyzer

Detect dead code, duplicate logic, and circular dependencies with knip, jscpd, and madge.

7|Updated May 28, 2026
One-click install
npx skills add https://github.com/zcaceres/skills --skill dead-code-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-analyzer
Source: https://github.com/zcaceres/skills/tree/main/plugins/quality/skills/dead-code-analyzer
Command: npx skills add https://github.com/zcaceres/skills --skill dead-code-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires knip, jscpd, madge.

What problem does it solve?

This skill eliminates technical debt by identifying unused code, duplicate logic, and circular dependencies that clutter your project and increase maintenance overhead.

Core Features & Use Cases

  • Dead Code Detection: Uses knip to find unused exports, dependencies, and files.
  • Duplicate Analysis: Uses jscpd to locate redundant code blocks that should be refactored.
  • Dependency Mapping: Uses madge to visualize and resolve circular dependency chains.
  • Use Case: Run this before a major refactor to safely remove unused components and simplify your dependency graph.

Quick Start

Run the dead code analyzer to scan the current project for unused exports and circular dependencies.

Frequently Asked Questions about dead-code-analyzer

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

FAQPage Schema
How do I find and remove dead code in a TypeScript project?

Static analysis identifies dead code by detecting unused exports, dependencies, and files within your project. This Skill automates that process using sequential validation to locate unused components and simplify your dependency graph.

What is the best way to detect duplicate logic and circular dependencies before refactoring?

Detecting duplicate logic and circular dependencies requires mapping your codebase structure. This Skill uses static analysis to locate redundant code blocks and visualize dependency chains, allowing you to safely simplify dependencies before a major refactor.

Do I need knip, jscpd, and madge installed to analyze unused exports?

Yes, this Skill requires knip, jscpd, and madge to perform its sequential analysis. Knip finds unused exports, jscpd locates duplicate code blocks, and madge visualizes circular dependency chains within your software project.

Can I use static analysis to clean up technical debt in software engineering workflows?

Yes, static analysis cleans up technical debt by identifying unused code, duplicate logic, and circular dependencies. Applying this to code maintenance and quality assurance workflows reduces maintenance overhead and improves code quality.

How does dependency mapping help resolve circular dependencies in code?

Dependency mapping visualizes circular dependency chains within your project to help you resolve them. By mapping these references, you can pinpoint structural issues and safely refactor to simplify your software dependency graph.