What problem does it solve?
Codebases accumulate dead exports, one-call wrappers, re-export chains, and shallow abstractions that inflate the public surface and slow down every future read. This Skill provides a disciplined, session-long protocol for finding and deleting that indirection one surgical commit at a time, without breaking durable data formats or public contracts.
Core Features & Use Cases
- Per-iteration ritual: Count callers with ripgrep, mentally inline helpers, run a one-sentence cohesion test, and surface each finding before editing.
- Anti-cosmetic gate: Every commit must shrink the public API surface, file count, call-graph depth, or first-read effort, or it gets reverted.
- Safety guardrails: A never-touch list protects durable strings, schemas, and storage formats, with explicit pause conditions for package-boundary and public-API changes.
- Use Case: After a large feature wave in a TypeScript monorepo, run a collapse pass over packages/auth and packages/data to delete dead exports and inline single-caller wrappers, landing one conventional commit per simplification with tests and typechecks per checkpoint.
Quick Start
Ask the AI to run a collapse pass on a specific package or pull request diff, declaring the scope, stop condition, and starting target.