Skillshub knip-deadcode

Community Knip Dead Code Detection Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/knip-deadcode" ~/.claude/skills/comeonoliver-skillshub-knip-deadcode && rm -rf "$T"
manifest: skills/pproenca/dot-skills/knip-deadcode/SKILL.md
source content

Community Knip Dead Code Detection Best Practices

Comprehensive guide for detecting and removing dead code in JavaScript and TypeScript projects using Knip. Contains 43 rules across 8 categories, prioritized by impact to guide configuration, CI integration, and cleanup workflows.

When to Apply

Reference these guidelines when:

  • Configuring Knip for a new project or monorepo
  • Investigating false positives or false negatives
  • Setting up CI pipelines to prevent dead code regressions
  • Using auto-fix to clean up unused code
  • Optimizing Knip performance for large codebases

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Configuration FoundationsCRITICAL
config-
2Entry Point StrategyCRITICAL
entry-
3Workspace & MonorepoHIGH
workspace-
4Dependency AnalysisHIGH
deps-
5Export DetectionMEDIUM-HIGH
exports-
6CI IntegrationMEDIUM
ci-
7Auto-Fix WorkflowMEDIUM
fix-
8Performance OptimizationLOW-MEDIUM
perf-

Quick Reference

1. Configuration Foundations (CRITICAL)

2. Entry Point Strategy (CRITICAL)

3. Workspace & Monorepo (HIGH)

4. Dependency Analysis (HIGH)

5. Export Detection (MEDIUM-HIGH)

6. CI Integration (MEDIUM)

7. Auto-Fix Workflow (MEDIUM)

8. Performance Optimization (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information