knip

📁 knoopx/pi 📅 Jan 24, 2026
22
总安装量
6
周安装量
#17058
全站排名
安装命令
npx skills add https://github.com/knoopx/pi --skill knip

Agent 安装分布

codex 3
claude-code 3
windsurf 2
opencode 2
gemini-cli 2

Skill 文档

Knip

Find unused files, dependencies, and exports in TypeScript/JavaScript projects.

Usage

bunx knip                     # Analyze project
bunx knip --production        # Production only (no tests, devDeps)
bunx knip --strict            # Direct dependencies only
bunx knip --fix               # Auto-remove unused (use cautiously)
bunx knip --include files     # Only unused files
bunx knip --include exports   # Only unused exports
bunx knip --include dependencies  # Only unused deps

Output Formats

bunx knip --reporter compact  # Compact output
bunx knip --reporter json     # JSON for tooling
bunx knip --reporter github-actions  # CI annotations

Filtering

bunx knip --workspace packages/client  # Specific workspace
bunx knip --exclude "test/**/*"        # Exclude patterns

Debugging

bunx knip --debug                      # Debug output
bunx knip --trace-file src/utils.ts    # Trace file
bunx knip --trace-export myFunction    # Trace export

Configuration

Configure via .knip.json or knip.config.js for custom entry points and exclusions.