remove-dead-code

Scan TypeScript/JavaScript projects to identify dead code and generate a verifiable report.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/hbvg234/jnmt.vn --skill remove-dead-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-dead-code
Source: https://github.com/hbvg234/jnmt.vn/tree/main/.claude/skills/remove-dead-code
Command: npx skills add https://github.com/hbvg234/jnmt.vn --skill remove-dead-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically identifies and safely removes dead code in TypeScript/JavaScript projects, protecting live code with backups and multi-agent validation.

Core Features & Use Cases

  • Backup Before Everything: Before any modification, create a timestamped backup branch from the current HEAD to protect the original state.
  • Parallel Scout + Validator Pattern: Multiple agents analyze in parallel with cross-checks to confirm dead code before removal.
  • Conservative by Default: When in doubt, keep code to avoid removing live functionality, especially for dynamic imports and public API surface.
  • Never Remove Without Reporting First: A reviewable report guides the removal step.

Quick Start

Ask the system to scan your repository for dead code and review the report before proceeding with safe removal.

Frequently Asked Questions about remove-dead-code

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

FAQPage Schema
How do I safely remove dead code from a TypeScript project?

To safely remove dead code, create a timestamped backup branch from HEAD first, then scan the project to generate a reviewable report before proceeding with any removals.

Can static analysis detect dead code with dynamic imports and guarded exports?

Static analysis can detect dead code in projects with complex dependencies including dynamic imports and guarded exports, using parallel agents to cross-check and confirm dead code before removal.

What is the best way to clean up unused JavaScript files without breaking live functionality?

The best way to clean up unused JavaScript is a conservative approach that keeps code when in doubt, requiring multi-agent validation and post-removal verification to protect live functionality.

Does dead code removal work with test utilities and public API surfaces?

Dead code removal works across codebases with complex dependencies including test utilities, but it conservatively preserves public API surfaces to avoid accidentally removing live functionality.

Why does the dead code refactoring process require a backup branch?

The dead code refactoring process requires a backup branch to protect the original state before any modification, ensuring you can restore the codebase if post-removal verification fails.

When should I not use automated dead code removal?

You should not use automated dead code removal when you cannot create a backup branch first, or when your project heavily relies on dynamic imports that static analysis cannot fully trace.