What problem does it solve?
The repository is migrating dead-code and unused-dependency detection from the legacy unimported tool to knip, but knip treats every path in a ./* wildcard export as an entry point, so it cannot detect unused top-level source files. This Skill guides you through replacing wildcard exports with explicit, minimal package.json#exports so knip achieves real parity with unimported.
Core Features & Use Cases
- New package setup: Start new packages in the target state with explicit subpath exports and a knip-scoped script, with no
.unimportedrc.json.
- Existing package migration: Audit deep-import consumers, replace the
./* wildcard with explicit subpath exports, refactor broken consumers, and switch the dead-code script from unimported to knip.
- Review guidance: Flag new packages that add a
.unimportedrc.json, run the bare unimported binary, or introduce a ./* wildcard in exports.
- Use Case: When adding a new library under
libs/, use this Skill to write the correct exports map and knip command (pnpm knip --directory ../.. -W libs/<x>) so unused source files are detected from day one.
Quick Start
Ask the assistant to set up dead-code detection with knip and explicit package.json exports for your new package in the ledger-live monorepo.