Agent skill · software engineering · jeremylongshore

cleanup-code

Comprehensive codebase cleanup across 11 quality dimensions: dead code,

Why this skill is useful

Adds executable scripts for systematic code cleanup across 11 quality dimensions, enhancing code quality and maintainability.

What it needs

Requires git, go, node, python, rust installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Codebase Cleanup Systematic code cleanup across 11 quality dimensions, ordered by risk. Each finding includes confidence scoring (HIGH/MEDIUM/LOW) and all changes are verified through build/test gates. Environment Detection !git rev-parse --show-toplevel 2>/dev/null && echo "---" && git diff --stat HEAD~5 2>/dev/null tail -5 !ls package.json pyproject.toml Cargo.toml go.mod Makefile 2>/dev/null head -5 !cat package.json 2>/dev/null head -3; echo "---"; ls tsconfig.json .eslintrc 2>/dev/null Prerequisites Git repository with clean working tree (no uncommitted changes) Language toolchain installed (Node.js/Python/Go/Rust as applicable) Optional: knip, madge, jscpd, ruff, bandit for tool-verified scanning Overview This skill orchestrates cleanup across 11 dimensions, each with a dedicated agent. Dimensions are ordered LOW → HIGH risk. See dimensions reference for full detection criteria, verification steps, and risk profiles. The 11 Dimensions (by risk level): # Dimension Key Risk Auto-apply? --- ----------- ----- ------ ------------- 1 Dead code removal dead LOW Yes (after build) 2 AI slop removal slop LOW Comments only 3 Weak type elimination types MED Yes (after typecheck) 4 Security cleanup security MED Flag only 5 Legacy code removal legacy MED With confirmation 6 Type consolidation typecons MED Yes (after typecheck) 7 Defensive code cleanup defensive MED Flag only 8 Performance optimization perf MED Flag only 9 DRY deduplication dry HIGH Flag only (>=10 lines) 10 Async pattern fixes async HIGH Flag only 11 Circular dep untangling circular HIGH Flag only Instructions Step 1: Safety Checkpoint Before any changes: 1. Verify clean git state: git status --porcelain must be empty (or stash changes) 2. Record baseline: git rev-parse HEAD as rollback point 3. Run existing tests to confirm green baseline 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/cleanup-code--bb47f5

View the source on GitHub

Browse the @skills marketplace