← ClaudeAtlas

unused-code-auditlisted

Safely determine whether a directory, file, exported symbol, function, component, constant, hook, type, or helper is unused before deleting it. Use for agent-assisted dead-code cleanup, unused code detection, unused export audits, deletion safety checks, consumer searches, and cleanup validation without breaking re-exports, aliases, public APIs, framework entrypoints, generated files, or external consumers.
danhuaxiansheng/claude-code-cleanup-skills · ★ 0 · AI & Automation · score 75
Install: claude install-skill danhuaxiansheng/claude-code-cleanup-skills
# Unused Code Audit ## Principle Treat every automated result as a candidate, not proof. Delete only when usage, entrypoint, side-effect, and public API risks have been ruled out. Prefer small, evidence-backed removals. Do not shrink public API surfaces merely because a type or export name has no direct import; generated declarations and inferred consumer types can still depend on it. This skill answers "is anyone still consuming this?" It does not answer the broader question "is this still necessary?" For used-but-unnecessary code, switch to `necessary-code-audit`. This skill is part of a three-skill cleanup system: - Use `unused-code-audit` to prove whether code is still consumed. - Use `necessary-code-audit` when code is used but may no longer be necessary. - Use `page-flow-cleanup-audit` when the target includes page state, queries, mutations, permissions, errors, or user-visible behavior. ## Baseline - Check working-tree state first: `git status --short --untracked-files=all`. - Check both unstaged and staged changes for the target scope: `git diff --name-status -- <scope>` and `git diff --cached --name-status -- <scope>`. - Build a current file inventory for the target scope. Prefer `rg --files <scope>` or the fastest available file search tool. - Inspect imports, exports, manifests, framework entrypoints, generated files, and direct consumers before trusting any automated unused result. ## Candidate Classes Classify before searching deeply: - `file`: module,