knip
Installation
SKILL.md
Knip Code Cleanup
Run knip to find and remove unused files, dependencies, and exports from this codebase.
Setup
-
Check if knip is available:
- Run
npx knip --versionto test - If it fails or is very slow, check if
knipis in package.json devDependencies - If not installed locally, install with
npm install -D knip(or pnpm/yarn equivalent based on lockfile present)
- Run
-
If no
knip.jsonorknip.jsoncconfig exists and knip reports many false positives, consider creating a minimal config based on the frameworks detected in package.json