
Description
Knip Code Cleanup is an agent skill that runs knip, a tool that finds unused files, dependencies and exports in a project, and then helps you remove them. It begins with a setup check. If npx knip --version fails or is very slow, the skill looks for knip in package.json, and if it is not installed, it adds it as a dev dependency using the package manager that matches the lockfile. The skill follows a configuration first workflow, so the agent sets knip up properly before it acts on what knip reports, even for a short request such as clean up the codebase. The skill is clear about scope. knip finds unused files, dependencies and exports across the whole project, but it does not remove unused imports or variables inside a file, because that is the job of a linter. Use the skill when you want to clear dead code and unused packages from a project. It is part of the brianlovin agent-config repository on GitHub. Its security audits show Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.…
Highlights
- Finds unused files, dependencies and exports
- Configuration first workflow before any removals
- Installs knip with the package manager matching your lockfile
- Leaves unused imports to a linter
Ratings & Reviews
No ratings yet
Be the first to rate knip.
People also visit
knip FAQ
What does the knip skill do?
It runs knip to find unused files, dependencies and exports, and helps you remove them.
Does it remove unused imports?
No. The skill says knip does not handle unused imports or variables inside files, which is a linter's job.
What if knip is not installed?
The skill checks package.json and installs knip as a dev dependency with the package manager your lockfile uses.
How do I install the skill?
Run npx skills add https://github.com/brianlovin/agent-config --skill knip.
Is it free?
Yes. The skill is open source and public on GitHub.
What do the security audits show?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best knip alternatives?
Popular alternatives to knip include audit-and-reduce-dependencies, fallow and tree-shaking. See all knip alternatives

















