knip

Scan repositories to detect unused files, dependencies, and exports.

357|29|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/brianlovin/claude-config --skill knip-brianlovin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knip
Source: https://github.com/brianlovin/claude-config/tree/main/skills/knip
Command: npx skills add https://github.com/brianlovin/claude-config --skill knip-brianlovin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Knip helps teams identify and remove unused files, dependencies, and exports across a codebase, reducing bloat, build times, and maintenance costs.

Core Features & Use Cases

  • Scan projects to locate dead code, orphaned dependencies, and unused exports
  • Provide actionable cleanup recommendations
  • Assist with refactoring and repository hygiene

Quick Start

Run knip to scan the repository and generate a cleanup report.

Frequently Asked Questions about knip

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and remove unused dependencies and dead code in my codebase?

Scanning a repository detects unused files, dependencies, and exports, providing actionable cleanup recommendations. This process reduces bloat, lowers maintenance costs, and improves build performance by identifying dead code across the codebase.

What is the best way to automate dead code detection in a CI pipeline?

Automating dead code detection in a CI pipeline involves running a repository scan during the build process to locate unused exports and dependencies. This integration helps software teams continuously maintain lean codebases and catch bloat before deployment.

Can I use a repository scan to prepare a codebase refactoring plan?

Yes, you can run a manual repository scan to generate a cleanup report that serves as a refactoring plan. This report identifies unused exports and orphaned dependencies, helping teams safely remove dead code and improve repository hygiene.

Does dead code detection work for finding unused exports across an entire project?

Dead code detection works by scanning the entire project to locate unused exports alongside orphaned dependencies and files. This comprehensive scan ensures that all unused elements are identified so teams can maintain a lean codebase.

Why should I clean up unused files and dependencies from my repository?

Cleaning up unused files and dependencies reduces repository bloat, lowers maintenance overhead, and improves build performance. Removing dead code ensures software teams maintain a lean codebase, which ultimately decreases long-term maintenance costs.