Skip to content

Rasaboun/knip

 
 

Repository files navigation

NPM Version NPM Downloads GitHub Repo stars

Knip finds and fixes unused dependencies, exports and files in your JavaScript and TypeScript projects. Less code and dependencies lead to improved performance, less maintenance and easier refactorings.

AI Agent Skill

This repository includes a ready-to-use agent skill in the skill/ directory. It gives AI coding agents structured guidance on running Knip — setup, configuration, interpreting results, handling false positives, and safe auto-fixing.

Install with a single command:

npx skills add https://github.com/webpro-nl/knip --skill using-knip

Or copy the skill/ folder manually into your agent's skill directory:

# GitHub Copilot
cp -r path/to/knip/skill .github/skills/using-knip

# Claude Code
cp -r path/to/knip/skill .claude/skills/using-knip

The skill triggers on phrases like "knip", "unused dependencies", "unused exports", "dead code", and similar. It includes configuration templates for common setups (Next.js, Expo, Astro, monorepos) in skill/references/.

Contributors

Special thanks to the wonderful people who have contributed to Knip!

Knip

/'knɪp/ means "(to) cut" and is pronounced with a hard "K" 🇳🇱

License

Knip is free and open-source software licensed under the ISC License.

Parts of Knip have been inspired by and/or partially copy code from the following projects:

About

✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 83.6%
  • JavaScript 8.5%
  • MDX 3.3%
  • Astro 3.0%
  • CSS 0.8%
  • Lua 0.3%
  • Other 0.5%