What problem does it solve? TypeScript codebases accumulate unused exports, redundant barrel files, and over-exported symbols that bloat the public API and slow refactors. This Skill sets up knip correctly and walks through a phased cleanup that deletes dead code without breaking builds. ## Core Features & Use Cases - Accurate knip baseline: Configures a single root-level knip config for monorepos, handles entry points, wildcard package exports, and framework-indirect dependencies so the report contains only real findings. - Phased dead code removal: Deletes unused exports, collapses pass-through barrels, and narrows exports to what other files actually import, re-running knip between phases since each deletion exposes more dead code. - Automated barrel rewriting: Ships a references/debarrel.py script that classifies barrels as keep or drop, rewrites importers to the declaring module, and refuses to delete anything still referenced or pinned by package.json exports. - Use Case: In a monorepo with 168 barrel files, classify them with the script, keep only genuine public API aggregators, rewrite importers, and verify with typecheck, tests, and a production build. ## Quick Start Ask the agent to add knip to this TypeScript repo and remove all dead exports and pass-through barrel files.