← Back to list

knip
by knoopx
pi.ai config
⭐ 2🍴 0📅 Jan 21, 2026
SKILL.md
name: knip description: Identify and remove unused dependencies, files, and exports in TypeScript and JavaScript projects. Use when detecting unused code, cleaning up dead code, improving maintainability, or reducing bundle sizes.
Knip
Knip is a tool to find unused files, dependencies, and exports in TypeScript and JavaScript projects. It helps maintain clean codebases by detecting dead code.
Setup
No setup required. Knip is run on-demand using bunx.
Usage
Run Knip in the root of your project:
bunx knip
Common options:
--fix: Automatically remove unused dependencies from package.json (use cautiously)--config <file>: Specify a custom configuration file--include <patterns>: Include additional file patterns--exclude <patterns>: Exclude file patterns--reporter <reporter>: Output format (e.g., json, markdown)--no-config-hints: Disable configuration hints
Example:
bunx knip --reporter json --exclude "test/**/*"
Workflow
- Ensure you're in the project root directory
- Run Knip to scan for unused code
- Review the reported unused dependencies, files, and exports
- Manually remove or refactor the identified unused code
- Re-run to verify cleanup
Configuration
Knip can be configured via a .knip.json or knip.config.js file for custom rules, entry points, and exclusions.
Supported Environments
Works with TypeScript, JavaScript, and various bundlers/frameworks. It analyzes imports, exports, and dependencies to detect unused code.
Related Skills
- bun: Use Knip to clean up unused dependencies in Bun-managed projects.
- typescript: Maintain clean TypeScript codebases by removing unused exports and files.
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon