knip-cleanup

Identify unused files, exports, and dependencies in Next.js/TypeScript projects.

32|13|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/nghiahsgs/taw-kit --skill knip-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knip-cleanup
Source: https://github.com/nghiahsgs/taw-kit/tree/main/skills/knip-cleanup
Command: npx skills add https://github.com/nghiahsgs/taw-kit --skill knip-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects unused files, exports, and dependencies in Next.js/TypeScript projects, enabling safer cleanup.

Core Features & Use Cases

  • Dry-run reporting for all categories (files, exports, dependencies) to avoid accidental deletions.
  • Starter knip.json generation and guidance to apply fixes across large codebases.
  • Use Case: maintain large Next.js apps with frequent refactors to reclaim unused code without breaking builds.

Quick Start

Run knip-cleanup to generate a dry-run report and apply deletions only after explicit approval.

Frequently Asked Questions about knip-cleanup

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

FAQPage Schema
How do I find unused files and exports in a large Next.js project?

To find unused files in a Next.js project, run a static analysis dry-run report to identify dead code across files, exports, and dependencies. This process safely targets large codebases and ensures no accidental deletions occur before explicit approval.

Can I automatically remove unused dependencies from my TypeScript codebase?

You cannot automatically remove unused dependencies without explicit confirmation. The cleanup process enforces safe-by-default behavior through dry-run analysis, applying deletions only after you review the report and grant explicit approval.

What is the best way to safely clean up dead code during frequent refactors?

The best way to safely clean up dead code is using a dry-run reporting mechanism that identifies unused files, exports, and dependencies. This allows you to review potential deletions and reclaim unused code without breaking builds.

Does static analysis for dead code work with Next.js and TypeScript?

Static analysis for dead code works directly with Next.js and TypeScript projects. It detects unused files, exports, and dependencies, providing starter configurations and guided cleanup to maintain large applications safely.

How do I generate a knip configuration for dead code analysis?

To generate a knip configuration for dead code analysis, you can use a starter generation tool that creates a knip.json file. This provides the necessary setup to begin guided cleanup and identify unused code in your project.