cleanup

Scans repositories for dead code, debug artifacts, and unused imports, then applies confirmed fixes.

Updated May 13, 2026
One-click install
npx skills add https://github.com/andrewcodesit/skills --skill cleanup-andrewcodesit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/andrewcodesit/skills/tree/main/skills/engineering/cleanup
Command: npx skills add https://github.com/andrewcodesit/skills --skill cleanup-andrewcodesit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Repositories quietly accumulate dead code, leftover debug logs, unused imports, and stale feature flags across sessions, and manual cleanup is tedious and error-prone. This Skill scans the repo across nine cruft categories, filters out false positives, and applies fixes category by category only after user confirmation. ## Core Features & Use Cases - Nine-category scan: Detects unused imports, commented-out code, debug artifacts, dead exports, stale suppression directives, empty files, unused packages, stale feature flags, and unreferenced routes. - False-positive filtering: Verifies every candidate against framework config, test files, git hooks, and package.json scripts before reporting, so the report stays trustworthy. - Scoped or full scans: Use --branch to scan only files changed versus the base branch, or --full to scan the whole working tree. - Use Case: Before merging a feature branch, run the cleanup scan to remove leftover console.log statements and unused imports, with each fix category confirmed individually. ## Quick Start Ask the agent to run cleanup on the current branch to find and fix dead code and debug artifacts.

Frequently Asked Questions about cleanup

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

FAQPage Schema
How do I remove dead code and debug logs from a repo?▼

Run the cleanup scan, which checks nine categories including unused imports, commented-out code, and debug artifacts. Findings are reported with file:line citations, and fixes are applied category by category only after you confirm each one.

How to find unused imports in JavaScript, Python, or Go projects?▼

The scan uses the repo's own tooling: ESLint with its fix flag for JS/TS, ruff check --select F401 for Python, and goimports for Go. It verifies candidates against framework config and tests before reporting them as unused.

Can I scan only changed files instead of the whole repository?▼

Yes, the default --branch mode scans only files changed versus the base branch using git merge-base. Use --full to scan the entire working tree when you need a complete hygiene pass.

Does the cleanup scan delete code automatically without asking?▼

No, every fixable category requires explicit confirmation before changes are applied, and a show-me-first option prints the exact lines or diff. Manual-review findings like TODOs, suppression directives, and unused packages are never auto-modified.

Why does the scan skip some matches that look like dead code?▼

Matches found only in docs, markdown, lockfiles, or generated files are filtered out as false positives. Symbols referenced by framework config, git hooks, package.json scripts, or tests are also kept and reported separately as test-only or de-export hints.