codebase-cleanup

Remove dead code, stale comments, weak types, and duplicated logic from codebases.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/darkmatter/skills --skill codebase-cleanup-darkmatter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-cleanup
Source: https://github.com/darkmatter/skills/tree/main/skills/codebase-cleanup
Command: npx skills add https://github.com/darkmatter/skills --skill codebase-cleanup-darkmatter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you perform a thorough, low-risk cleanup pass over an existing codebase by removing noise, dead branches, unused code, weak types, unsafe guards, and avoidable duplication.

Core Features & Use Cases

  • Eight-pass cleanup workflow: Organizes refactoring into focused passes so each concern is researched, assessed, and implemented separately.
  • High-confidence change discipline: Uses evidence-backed checks before making edits, reducing the chance of breaking working code.
  • Broad quality sweep: Useful for code audits, pre-release hygiene, onboarding unknown repositories, and technical debt reduction across common backend and frontend stacks.

Quick Start

Ask the skill to perform a full codebase cleanup sweep on the repository and report only high-confidence fixes.

Frequently Asked Questions about codebase-cleanup

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

FAQPage Schema
How do I remove dead code and duplicated logic from a codebase?

Codebase cleanup removes dead code, stale comments, weak types, and duplicated logic using a disciplined eight-pass workflow that researches, assesses, and implements each concern separately to minimize regression risk.

What is the best way to audit technical debt before a release?

A comprehensive code cleanup sweep audits technical debt by identifying unused code and unsafe guards, applying evidence-backed checks and tool-backed verification to ensure high-confidence fixes prior to release.

Does this code cleanup workflow support Python and Go projects?

Yes, the code cleanup workflow safely applies to comprehensive refactoring sweeps across JavaScript, TypeScript, Python, Rust, and Go projects, handling weak types and dead branches in each of these stacks.

How do I safely refactor an inherited repository without breaking existing tests?

You safely refactor unknown repositories by following a strict research-assessment-implementation workflow that runs per-pass confidence checks and executes tests after each individual change to verify stability.

How does technical debt reduction handle weak types and unsafe guards?

Technical debt reduction systematically removes weak types and unsafe guards through focused passes, replacing them with tool-backed verification and strong typing to improve overall codebase quality and maintainability.