code-slimming
Installation
SKILL.md
Code Slimming: Read-Only Refactor Opportunity Audit
Find behavior-preserving opportunities to make a codebase smaller, clearer, and less repetitive. This skill reports opportunities only. It does not edit code and does not write tests.
It works on four slimming axes:
- Dead code - unused functions, methods, variables, parameters, imports, types, exports, constants, branches, files, and dependencies that nothing reaches. Includes superseded code (an old implementation whose callers all moved to a replacement) and leftover files (backups, one-off scripts, stale fixtures/configs/assets, docs for removed features).
- Redundant code - duplicate or near-duplicate blocks, whether across the repo or repeated inside a single file, including exact copy-paste clones and per-element function copies that differ only in a literal where one loop or lookup table would do.
- Wrapper and indirection removal - thin layers that forward without adding a real role, including inert try/catch scaffolding that adds no handling, context, or recovery.
- Comment volume - commented-out code, comments that restate the code, and banner walls that add bytes without signal. Comments should be minimal and earn their place.