configure-plugin/skills/configure-dead-code/SKILL.md
Dead-code detection: Knip, Vulture, cargo-machete, deadcode. Use when setting up unused-code scanning, migrating tools, or adding dead-code CI checks.
npx skillsauth add laurigates/claude-plugins configure-dead-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Check and configure dead code detection tools.
| Use this skill when... | Use another approach when... |
|------------------------|------------------------------|
| Setting up dead code detection for a new project | Running an existing dead code scan (knip, vulture) |
| Auditing whether Knip, Vulture, or cargo-machete is configured correctly | Manually removing specific unused exports or imports |
| Migrating between dead code detection tools | Debugging why a specific file is flagged as unused |
| Adding dead code checks to CI/CD pipelines | Reviewing dead code findings one by one |
| Standardizing dead code detection across a monorepo | Configuring linting rules (/configure:linting instead) |
pwdfind . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' \)find . -maxdepth 1 \( -name 'knip.json' -o -name 'knip.config.*' \)find . -maxdepth 1 \( -name '.vulture' -o -name 'vulture.ini' \)find . -maxdepth 1 -name '.pre-commit-config.yaml'find . -maxdepth 1 -name '.project-standards.yaml'Parse from command arguments:
--check-only: Report compliance status without modifications (CI/CD mode)--fix: Apply fixes automatically without prompting--tool <knip|vulture|deadcode|machete>: Override tool detectionDead code detection tools:
Execute this dead code detection compliance check:
Check for language and tool indicators:
| Indicator | Language | Tool |
|-----------|----------|------|
| knip.json or knip.config.* | JavaScript/TypeScript | Knip |
| package.json with knip | JavaScript/TypeScript | Knip |
| pyproject.toml [tool.vulture] | Python | Vulture |
| .vulture or vulture.ini | Python | Vulture |
| Cargo.toml | Rust | cargo-machete |
Use WebSearch or WebFetch to verify latest versions before configuring.
For the detected tool, check configuration completeness:
Knip:
knip.json or knip.config.*)Vulture:
cargo-machete:
Print a formatted compliance report:
Dead Code Detection Compliance Report
======================================
Project: [name]
Language: [TypeScript | Python | Rust]
Tool: [Knip 5.x | Vulture 2.x | cargo-machete 0.6.x]
Configuration:
Config file knip.json [EXISTS | MISSING]
Entry points configured [CONFIGURED | AUTO-DETECTED]
Ignore patterns node_modules, dist [CONFIGURED | INCOMPLETE]
Plugin support enabled [ENABLED | N/A]
Detection Scope:
Unused files enabled [ENABLED | DISABLED]
Unused exports enabled [ENABLED | DISABLED]
Unused dependencies enabled [ENABLED | DISABLED]
Unused types enabled [ENABLED | DISABLED]
Scripts:
dead-code command package.json scripts [CONFIGURED | MISSING]
Integration:
Pre-commit hook .pre-commit-config.yaml [OPTIONAL | MISSING]
CI/CD check .github/workflows/ [CONFIGURED | MISSING]
Overall: [X issues found]
If --check-only, stop here.
Apply configuration based on detected language. Use templates from REFERENCE.md:
bun add --dev knip, uv add --group dev vulture)Update .project-standards.yaml:
standards_version: "2025.1"
last_configured: "[timestamp]"
components:
dead_code: "2025.1"
dead_code_tool: "[knip|vulture|deadcode|machete]"
dead_code_ci: true
Print a summary of changes applied, run an initial scan if possible, and provide next steps for reviewing findings.
For detailed configuration templates and usage examples, see REFERENCE.md.
| Context | Command |
|---------|---------|
| Quick compliance check | /configure:dead-code --check-only |
| Auto-fix all issues | /configure:dead-code --fix |
| Run Knip scan (JS/TS) | npx knip --reporter compact |
| Run Vulture scan (Python) | vulture . --min-confidence 80 |
| Run cargo-machete (Rust) | cargo machete |
| CI mode (JSON output) | npx knip --reporter json |
| Flag | Description |
|------|-------------|
| --check-only | Report status without offering fixes |
| --fix | Apply all fixes automatically without prompting |
| --tool <tool> | Override tool detection (knip, vulture, deadcode, machete) |
# Check compliance and offer fixes
/configure:dead-code
# Check only, no modifications
/configure:dead-code --check-only
# Auto-fix with Knip
/configure:dead-code --fix --tool knip
/configure:linting - Configure linting tools/configure:all - Run all compliance checkstesting
Verify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues. Use when filing upstream reports from backlogs, audit docs, or git-history findings.
documentation
Gate outward-bound text (upstream issues, docs, PR bodies) through isolated haiku fresh-reader critique before publishing. Use when an artifact must survive a reader with zero project context.
tools
Suggest improvements to SKILL.md content, descriptions, or tool config from eval results. Use when raising pass rates, fixing triggering, or iterating on a skill after evaluation.
tools
deadbranch CLI for stale-branch cleanup — dry-run preview, TUI or non-interactive delete, protects main/develop/WIP. Use when asked to clean up branches, prune branches, or remove stale branches.