Safely identifies and removes dead code with test verification after each deletion. Uses knip, depcheck, ts-prune, vulture, deadcode, or cargo-udeps depending on ecosystem.
Ships in julianromli-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use a conservative cleanup loop. Prefer keeping uncertain code over deleting something with hidden runtime or external consumers.
SAFE, CAUTION, or DANGER.SAFE item at a time.CAUTION items before touching them.DANGER items unless the user explicitly wants deeper investigation.Choose tools by ecosystem. Prefer the project's package manager and existing scripts where possible.
| Tool | What it finds | Command |
|---|---|---|
knip | Unused exports, files, dependencies | npx knip |
depcheck | Unused npm dependencies | npx depcheck |
ts-prune | Unused TypeScript exports | npx ts-prune |
vulture | Unused Python code | vulture src/ |
deadcode | Unused Go code | deadcode ./... |
cargo-udeps | Unused Rust dependencies | cargo +nightly udeps |
If specialized tooling is unavailable, fall back to targeted search:
Assign every finding to a safety tier before editing.
| Tier | Typical examples | Default action |
|---|---|---|
SAFE | Unused internal utilities, private helpers, unused tests/helpers, wrapper functions with no callers | Delete with verification |
CAUTION | Components, hooks, API routes, middleware, server actions, jobs, CLI commands | Investigate runtime and indirect usage first |
DANGER | Config files, entry points, exported types, schema files, generated boundaries, public APIs | Skip unless the user asks for deeper work |
Escalate to a higher-risk tier when any of these are present:
For each SAFE item:
Keep deletions atomic. Do not batch multiple unrelated removals into a single verification cycle.
If a revert is needed:
Before deleting a CAUTION item, explicitly check for:
import() or require() usageDelete a CAUTION item only when indirect usage has been ruled out and verification still passes.
After dead-code removals are green, look for low-risk consolidation:
Keep this phase separate from dead-code deletion. If consolidation changes behavior, stop treating it as cleanup and call it out explicitly.
End with a short cleanup report that includes:
Use this format when it helps:
Dead Code Cleanup
----------------------------
Deleted: 12 unused functions
3 unused files
5 unused dependencies
Skipped: 2 items (verification failed)
Saved: ~450 lines removed
----------------------------
All tests passing
CAUTION or DANGER items remain.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, Python, Go, Rust
dead-code, cleanup, refactoring, unused-dependencies, code-removal
34 skills in this plugin
/agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction./brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./clone-websiteReverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide one or more target URLs as arguments./collapsible-sidebarUse this when building a sidebar that collapses to an icon rail, or any element that toggles between shown and hidden. Labels fade out before display:none and fade in on show, using CSS transition-behavior allow-discrete plus @starting-style, with no JS animation library./vercel-composition-patternsReact composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes./convex-best-practicesGuidelines for building production-ready Convex apps covering function organization, query patterns, validation, TypeScript usage, error handling, and the Zen of Convex design philosophy/julianromli-ai-skills:refactor-cleanfrom julianromli-ai-skills
julianromli-ai-skills@cascade-code-general-misc-4 is listed by joshuarweaver/cascade-code-general-misc-4 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin julianromli-ai-skillsOther plugins' skills for the same job