setup-knip

Install Knip and generate knip.json configuration for dead code detection.

243|40|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/maslennikov-ig/claude-code-orchestrator-kit --skill setup-knip
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-knip
Source: https://github.com/maslennikov-ig/claude-code-orchestrator-kit/tree/main/.claude/skills/setup-knip
Command: npx skills add https://github.com/maslennikov-ig/claude-code-orchestrator-kit --skill setup-knip

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill installs Knip, creates a sensible default configuration, and validates setup for code-cleanup workflows.

Core Features & Use Cases

  • Auto-install: Detects package manager and installs knip as a devDependency.
  • Config generation: Creates a default knip.json or framework-specific config.
  • Script integration: Adds useful npm scripts for knip operations.

Quick Start

Run setup-knip to enable Knip in a standard JavaScript/TypeScript project.

Frequently Asked Questions about setup-knip

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

FAQPage Schema
How do I detect dead code in my JavaScript or TypeScript project?

Dead code detection identifies unused files, exports, and dependencies. Knip automates this by analyzing your project structure and configuration, then reports unreachable or unused code so you can remove it safely.

How do I install and configure Knip for my project?

Run setup-knip to auto-detect your package manager, install Knip as a devDependency, generate a default knip.json configuration, add npm scripts, and validate the installation with npx knip --help.

Does Knip work with my framework or build tool?

Knip generates framework-specific configurations based on your project type. Setup-knip creates sensible defaults or project-aware knip.json files, then validates compatibility before you run dead-code analysis.

What happens if Knip is already installed in my project?

Setup-knip checks devDependencies first. If Knip exists, it discovers your existing configuration, updates npm scripts as needed, and validates the setup without reinstalling.

Can I use Knip with monorepos or non-standard project structures?

Knip supports custom configurations through knip.json. Setup-knip creates a default config you can extend for monorepos, workspaces, or custom entry points after initial setup.

Why should I run setup-knip before dead code analysis?

Setup-knip ensures Knip is installed, configured correctly, and validated before downstream workflows like dead-code-hunter or dependency-auditor run, preventing configuration errors and missing dependencies.