remove-deadcode

Remove unused TypeScript code and imports with LSP-based reference verification.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/hsch14/ABC-car_insurance --skill remove-deadcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-deadcode
Source: https://github.com/hsch14/ABC-car_insurance/tree/main/.agents/skills/remove-deadcode
Command: npx skills add https://github.com/hsch14/ABC-car_insurance --skill remove-deadcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the accumulation of technical debt by identifying and removing unused code, imports, and orphaned files that clutter the codebase and increase maintenance overhead.

Core Features & Use Cases

  • LSP-Verified Safety: Uses Language Server Protocol to ensure no referenced code is ever deleted, preventing runtime errors.
  • Parallel Execution: Orchestrates multiple deep agents to perform batch removals simultaneously, significantly speeding up large-scale refactoring.
  • Use Case: When a project has grown over time and contains legacy functions or unused imports, this Skill automates the cleanup process while maintaining strict type safety and atomic git commits.

Quick Start

Run the remove-deadcode skill to scan the entire project and automatically remove all confirmed unused code.

Frequently Asked Questions about remove-deadcode

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

FAQPage Schema
How do I safely remove unused TypeScript code and orphaned files from my project?

To safely remove unused TypeScript code, the Skill uses Language Server Protocol (LSP) reference verification to ensure only unreferenced imports, functions, and files are deleted. It executes project-wide automated refactoring tasks to eliminate dead code without causing runtime errors.

How does LSP reference verification prevent runtime errors during automated refactoring?

LSP reference verification prevents runtime errors by checking all references across the project before deleting any code. It ensures that only truly orphaned files and unused imports are purged, maintaining strict type safety throughout the atomic deletion process.

Can I use parallel agents to speed up large-scale TypeScript dead code cleanup?

Yes, you can use parallel agents to speed up large-scale TypeScript dead code cleanup. The Skill orchestrates multiple deep agents simultaneously to perform batch removals, significantly accelerating refactoring across large codebases while maintaining conflict-free execution.

Do I need Git integration to automate TypeScript dead code removal?

Yes, you need Git integration to automate TypeScript dead code removal. Git is required to ensure type-safe deletions are committed atomically, enabling conflict-free parallel execution and safe rollback if any refactoring task produces unexpected results.

What is the best way to reduce technical debt by removing unused imports in TypeScript?

The best way to reduce technical debt by removing unused imports is running an automated, project-wide scan that identifies clutter and verifies references. This process strips unused code while preserving strict type safety through atomic git commits.

What are the limitations of using automated refactoring for dead code removal?

A key limitation is that automated dead code removal relies entirely on LSP reference verification, meaning dynamically referenced code might not be detected as used. Additionally, it strictly requires a TypeScript compiler and Git integration to function properly.