Run knip to find and remove unused files, dependencies, and exports from this codebase.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionknipExecute the skills CLI command in your project's root directory to begin installation:
Fetches knip from brianlovin/agent-config and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate knip. Access via /knip in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
8
total installs
8
this week
312
GitHub stars
0
upvotes
Run in your terminal
8
installs
8
this week
312
stars
Run knip to find and remove unused files, dependencies, and exports from this codebase.
Check if knip is available:
npx knip --version to testknip is in package.json devDependenciesnpm install -D knip (or pnpm/yarn/bun equivalent based on lockfile present)Knip does NOT remove unused imports/variables inside files — that's a linter's job. Knip finds unused files, dependencies, and exports across the project.
Always follow this configuration-first workflow. Even for simple "run knip" or "clean up codebase" prompts, configure knip properly before acting on reported issues.
knip.json, knip.jsonc, or knip key in package.json)npx knip
Focus on configuration hints before anything else. These appear at the top of the output and suggest config adjustments to reduce false positives.
Fix configuration hints before addressing reported issues. Common adjustments:
Re-run knip after each config change. Repeat until configuration hints are resolved and false positives are minimized.
Once the configuration is settled, work through reported issues. Prioritize in this order:
ignoreExportsUsedInFile (see below)Re-run knip after each batch of fixes. Removing unused files often exposes newly-unused exports and dependencies.
When reviewing or creating a knip config, follow these rules:
ignore patterns — ignore hides real issues and should almost never be used. Always prefer specific solutions. Other ignore* options (like ignoreDependencies, ignoreExportsUsedInFile) are fine because they target specific issue types.ignoreExportsUsedInFile: { interface: true, type: true } — this handles the common case of types only used in the same file. Prefer this over broader ignore options..gitignore, so ignoring node_modules, dist, build, .git is redundant.vite.config.ts) — Enable or disable the corresponding plugin explicitly rather than ignoring the file.buffer, process) — Add to ignoreDependencies.paths to knip config (uses tsconfig.json semantics).Use --production to focus on production code only:
npx knip --production
This excludes test files, config files, and other non-production entry points. Do NOT use project or ignore patterns to exclude test files — use --production instead.
src/index, lib/, or files with "public" or "api" in the nameUse the AskUserQuestion tool to clarify before deleting these.
Once configuration is settled and you're confident in the results:
# Auto-fix safe changes (removes unused exports and dependencies)
npx knip --fix
# Auto-fix including file deletion
npx knip --fix --allow-remove-files
Only use --fix after the configuration-first workflow is complete.
If knip exits with code 2 (unexpected error like "error loading file"):
knip.json in the project root# Basic run
npx knip
# Production only (excludes test/config entry points)
npx knip --production
# Auto-fix what's safe
npx knip --fix
# Auto-fix including file deletion
npx knip --fix --allow-remove-files
# JSON output for parsing
npx knip --reporter json
--workspace flagMake data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
I recommend knip for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Solid pick for teams standardizing on skills: knip is focused, and the summary matches what you get after install.
We added knip from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Registry listing for knip matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in knip — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
I recommend knip for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in knip — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Keeps context tight: knip is the kind of skill you can hand to a new teammate without a long onboarding doc.
knip is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
knip fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 59