knip

Audit JavaScript and TypeScript codebases for unused dependencies, exports, files, and unresolved imports.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill knip-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knip
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/knip
Command: npx skills add https://github.com/matt-riley/agent-skills --skill knip-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Knip helps identify unused dependencies, exports, files, and unresolved imports in JavaScript and TypeScript projects to support safe cleanup and healthier codebases.

Core Features & Use Cases

  • Detect unused dependencies, exports, and files in JS/TS projects.
  • Flag unresolved imports and provide guidance for remediation.
  • Support monorepos and CI-friendly workflows with safe, non-destructive reporting.

Quick Start

Run Knip on a TypeScript project to generate a report of unused code and dependencies.

Frequently Asked Questions about knip

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

FAQPage Schema
How do I find unused dependencies and exports in a TypeScript project?

You can identify unused dependencies and exports in a TypeScript project by running a static analysis audit that generates a non-destructive report flagging unused files, exports, and unresolved imports.

Can I run unused code analysis on a JavaScript monorepo?

Yes, you can run unused code analysis on a JavaScript monorepo. The audit supports monorepos and provides CI-friendly workflows with configurable scopes and safe previews before applying fixes.

What is the safest way to remove unused JavaScript files during a code-health review?

The safest way to remove unused JavaScript files during a code-health review is using a non-destructive audit that provides a safe preview of fixes before any changes are applied to your codebase.

Does static analysis for unused code work well in CI pipelines?

Static analysis for unused code works well in CI pipelines by providing non-destructive reporting with a configurable scope, ensuring PR-safe audits that flag unused dependencies and exports without altering code.

How do unresolved imports get flagged during a JavaScript codebase cleanup?

Unresolved imports get flagged during a JavaScript codebase cleanup through static analysis that detects them and provides guidance for remediation alongside reports of unused files and dependencies.