openspec-cleanup

Identify and report dead, obsolete, or orphaned code with file paths and line numbers.

Updated Dec 8, 2025
One-click install
npx skills add https://github.com/open-platform-model/cli --skill openspec-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-cleanup
Source: https://github.com/open-platform-model/cli/tree/main/.claude/skills/openspec-cleanup
Command: npx skills add https://github.com/open-platform-model/cli --skill openspec-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps software teams identify dead, obsolete, or orphaned code in a codebase without modifying the code, enabling safer cleanup planning and faster technical debt reduction.

Core Features & Use Cases

  • Change-aware and standalone sweep modes to locate dead code patterns across a repository.
  • Detailed findings with file path, line number, description of what is dead, why it is dead, and confidence levels.
  • Produces a structured cleanup report that guides manual remediation.

Quick Start

Identify dead or obsolete code introduced by a specific OpenSpec change and generate a structured cleanup report without modifying any files.

Frequently Asked Questions about openspec-cleanup

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

FAQPage Schema
How do I find and remove dead code in my codebase?

To find dead code, this Skill analyzes your repository and generates a structured report listing dead, obsolete, or orphaned code with file paths, line numbers, and confidence levels for safe manual removal.

What is change-aware static analysis for dead code detection?

Change-aware static analysis targets dead code introduced by specific changes, while standalone sweeps scan the entire repository to surface orphaned code patterns without modifying any files.

How do I analyze change impact to identify obsolete code?

You can analyze change impact by running this Skill in change-aware mode, which enumerates obsolete code tied to specific changes and reports why it is dead with a confidence score.

Does this dead code cleanup tool modify my source files?

No, this dead code cleanup tool does not modify your source files; it only performs static analysis and delivers a structured cleanup report to guide manual remediation.

Can I scan an entire repository for orphaned code patterns?

Yes, you can perform standalone sweeps across the entire repository to surface dead, obsolete, or orphaned code patterns and generate a comprehensive cleanup report.

What is included in a dead code cleanup report?

A dead code cleanup report includes the file path, line number, what is dead, why it is dead, and a confidence level for each finding to guide safe technical debt reduction.