
Configure Dead Code
- 57 installs
- 49 repo stars
- Updated August 4, 2026
- laurigates/claude-plugins
Helps with ai & agent building tasks.
About
configure-dead-code is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- configure-dead-code
- AI & Agent Building
- AI-coding skill
Configure Dead Code by the numbers
- 57 all-time installs (skills.sh)
- Ranked #6,669 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/laurigates/claude-plugins --skill configure-dead-codeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 57 |
|---|---|
| repo stars | ★ 49 |
| Last updated | August 4, 2026 |
| Repository | laurigates/claude-plugins ↗ |
What it does
Helps with ai & agent building tasks.
Files
/configure:dead-code
Check and configure dead code detection tools.
When to Use This Skill
| 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) |
Context
- Project root: !
pwd - Package files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' \) - Knip config: !
find . -maxdepth 1 \( -name 'knip.json' -o -name 'knip.config.*' \) - Vulture config: !
find . -maxdepth 1 \( -name '.vulture' -o -name 'vulture.ini' \) - Pre-commit: !
find . -maxdepth 1 -name '.pre-commit-config.yaml' - Project standards: !
find . -maxdepth 1 -name '.project-standards.yaml'
Parameters
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 detection
Dead code detection tools:
- JavaScript/TypeScript: Knip (finds unused files, exports, dependencies)
- Python: Vulture or deadcode (finds unused code)
- Rust: cargo-machete (finds unused dependencies)
Execution
Execute this dead code detection compliance check:
Step 1: Detect project language and existing tools
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.
Step 2: Analyze current configuration
For the detected tool, check configuration completeness:
Knip:
- [ ] Config file exists (
knip.jsonorknip.config.*) - [ ] Entry points configured
- [ ] Ignore patterns set
- [ ] Plugin configurations
- [ ] Workspace support (monorepo)
- [ ] CI integration
Vulture:
- [ ] Configuration file exists
- [ ] Minimum confidence set
- [ ] Paths configured
- [ ] Ignore patterns
- [ ] Allowlist file (if needed)
cargo-machete:
- [ ] Installed as cargo subcommand
- [ ] Workspace configuration
- [ ] CI integration
Step 3: Generate compliance report
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.
Step 4: Configure dead code detection (if --fix or user confirms)
Apply configuration based on detected language. Use templates from REFERENCE.md:
1. Install tool (e.g., bun add --dev knip, uv add --group dev vulture) 2. Create config file with entry points, exclusions, and plugins 3. Add scripts to package.json or create run commands 4. Add CI workflow step (warning mode, not blocking)
Step 5: Update standards tracking
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: trueStep 6: Print final report
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.
Agentic Optimizations
| 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 |
Flags
| 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) |
Examples
# 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 knipError Handling
- No language detected: Cannot determine appropriate tool, error
- Tool installation fails: Report error, suggest manual installation
- Configuration conflicts: Warn about multiple tools, suggest consolidation
- High number of findings: Suggest starting with allowlist
See Also
/configure:linting- Configure linting tools/configure:all- Run all compliance checks- Knip documentation: https://knip.dev
- Vulture documentation: https://github.com/jendrikseipp/vulture
- cargo-machete documentation: https://github.com/bnjbvr/cargo-machete
Dead Code Detection Reference
Configuration templates and usage examples for dead code detection tools.
Knip Configuration (JavaScript/TypeScript)
Install Knip
npm install --save-dev knip
# or
bun add --dev knipknip.json Template
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"src/index.ts",
"src/cli.ts",
"src/server.ts"
],
"project": [
"src/**/*.ts",
"src/**/*.tsx"
],
"ignore": [
"src/**/*.test.ts",
"src/**/*.spec.ts",
"dist/**",
"coverage/**"
],
"ignoreDependencies": [
"@types/*"
],
"ignoreExportsUsedInFile": true,
"ignoreBinaries": [
"tsc",
"tsx"
],
"workspaces": {
".": {
"entry": "src/index.ts",
"project": "src/**/*.ts"
}
}
}knip.config.ts Template (TypeScript)
import type { KnipConfig } from 'knip';
const config: KnipConfig = {
entry: [
'src/index.ts',
'src/cli.ts',
],
project: [
'src/**/*.ts',
'src/**/*.tsx',
],
ignore: [
'src/**/*.test.ts',
'dist/**',
'coverage/**',
],
ignoreDependencies: [
'@types/*',
],
ignoreExportsUsedInFile: true,
};
export default config;Package.json Scripts
{
"scripts": {
"knip": "knip",
"knip:production": "knip --production",
"knip:dependencies": "knip --dependencies",
"knip:exports": "knip --exports",
"knip:files": "knip --files"
}
}Knip Usage
# Find all unused code
npm run knip
# Production mode (ignore devDependencies)
npm run knip:production
# Find unused dependencies only
npm run knip:dependencies
# Find unused exports only
npm run knip:exports
# Fix automatically (remove unused dependencies)
knip --fixKnip Ignores
{
"ignoreDependencies": [
"@types/*"
],
"ignoreExportsUsedInFile": true,
"ignoreMembers": [
"then",
"catch"
]
}Vulture Configuration (Python)
Install Vulture
uv add --group dev vulturepyproject.toml Section
[tool.vulture]
min_confidence = 80
paths = ["src", "tests"]
exclude = [
"*/migrations/*",
"*/tests/fixtures/*",
]
ignore_decorators = ["@app.route", "@celery.task"]
ignore_names = ["setUp", "tearDown", "setUpClass", "tearDownClass"]
make_whitelist = trueAllowlist File (vulture-allowlist.py)
"""
Vulture allowlist for intentionally unused code.
This file is referenced by Vulture to ignore known false positives.
"""
# Intentionally unused for future use
future_feature
placeholder_function
# Framework-required but appears unused
class Meta:
pass
# Framework hooks
def setUp(self): pass
def tearDown(self): pass
# Exported for library users
public_api_functionVulture Usage
# Basic scan
uv run vulture src/ --min-confidence 80
# Generate allowlist
uv run vulture src/ --make-whitelist > vulture-allowlist.py
# With allowlist
uv run vulture src/ vulture-allowlist.py
# Sorted by confidence
uv run vulture src/ --sort-by-sizedeadcode Configuration (Python Alternative)
Install deadcode
uv add --group dev deadcodepyproject.toml Section
[tool.deadcode]
exclude = [
"tests",
"migrations",
]
ignore-names = [
"Meta",
"setUp",
"tearDown",
]Run deadcode
uv run deadcode src/cargo-machete Configuration (Rust)
Install cargo-machete
cargo install cargo-machete --locked.cargo-machete.toml Template
[workspace]
exclude = ["example-package"]
ignore = ["tokio"] # Used in proc macrosWorkspace Configuration (Cargo.toml)
[workspace.metadata.cargo-machete]
ignored = [
"serde", # Used in derive macros
"tokio", # Used in proc macros
"anyhow", # Used via ? operator
]cargo-machete Usage
# Find unused dependencies
cargo machete
# Fix automatically
cargo machete --fix
# Check specific package
cargo machete --package my-crateCI/CD Integration
GitHub Actions - Knip
- name: Install dependencies
run: npm ci
- name: Run Knip
run: npm run knip
continue-on-error: true # Don't fail CI, just warn
- name: Run Knip (production mode)
run: npm run knip:productionGitHub Actions - Vulture
- name: Install dependencies
run: uv sync --group dev
- name: Run Vulture
run: uv run vulture src/ --min-confidence 80
continue-on-error: true # Don't fail CI, just warnGitHub Actions - cargo-machete
- name: Install cargo-machete
run: cargo install cargo-machete --locked
- name: Check for unused dependencies
run: cargo machete
continue-on-error: true # Don't fail CI, just warnPre-commit Integration
Knip (warning only)
repos:
- repo: local
hooks:
- id: knip
name: knip
entry: npx knip
language: node
pass_filenames: false
always_run: true
stages: [manual] # Only run manually, not on every commitVulture (warning only)
repos:
- repo: local
hooks:
- id: vulture
name: vulture
entry: uv run vulture src/ --min-confidence 80
language: system
types: [python]
pass_filenames: false
stages: [manual] # Only run manually