python-plugin/skills/vulture-dead-code/SKILL.md
Vulture and deadcode tools for detecting unused Python code (functions, classes, imports). Use when cleaning up codebases or removing dead code. Triggers vulture, deadcode.
npx skillsauth add laurigates/claude-plugins vulture-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.
Tools for finding unused Python code including functions, classes, variables, imports, and attributes.
| Use this skill when... | Use another tool instead when... |
|------------------------|----------------------------------|
| Detecting unused functions, classes, variables | Finding unused imports only (use ruff --select F401) |
| Cleaning up dead code in a codebase | Checking type correctness (use basedpyright) |
| Enforcing code hygiene in CI | Formatting code (use ruff format) |
| Generating whitelists for false positives | Running general linting (use ruff check) |
Vulture (mature, confidence-based) and deadcode (newer, AST-based) both detect unused code but with different approaches:
| Feature | Vulture | deadcode | |---------|---------|----------| | Approach | Static analysis + confidence scores | AST-based detection | | Accuracy | Confidence scores (60-100%) | High accuracy, fewer false positives | | Speed | Fast | Very fast | | Configuration | Whitelist files | TOML configuration | | Maturity | Mature (2012) | Newer (2023+) | | Best For | Large codebases, gradual cleanup | New projects, strict enforcement |
# Install vulture
uv add --dev vulture
# Install deadcode (newer alternative)
uv add --dev deadcode
# Install both for comparison
uv add --dev vulture deadcode
# Check entire project
vulture .
# Check specific files/directories
vulture src/ tests/
# Minimum confidence threshold (60-100%)
vulture --min-confidence 80 .
# Exclude patterns
vulture . --exclude "**/migrations/*,**/tests/*"
# Sort by confidence
vulture --sort-by-size .
# Generate whitelist of current issues
vulture . --make-whitelist > vulture_whitelist.py
[tool.vulture]
min_confidence = 80
paths = ["src", "tests"]
exclude = [
"**/migrations/*",
"**/__pycache__/*",
".venv/*"
]
ignore_decorators = [
"@app.route",
"@pytest.fixture",
"@property",
"@staticmethod",
"@classmethod"
]
ignore_names = [
"test_*",
"setUp*",
"tearDown*",
]
# Check entire project
deadcode .
# Check specific files/directories
deadcode src/
# Verbose output
deadcode --verbose .
# Dry run (show what would be removed)
deadcode --dry-run .
# Show unreachable code
deadcode --show-unreachable .
# Generate configuration
deadcode --init
[tool.deadcode]
paths = ["src"]
exclude = [
"tests/*",
"**/__pycache__/*",
"**/migrations/*",
]
ignore_names = [
"test_*",
"setUp",
"tearDown",
"main",
]
ignore_decorators = [
"app.route",
"pytest.fixture",
"property",
"staticmethod",
"classmethod",
"abstractmethod"
]
show_unreachable = false
| Choose Vulture when... | Choose deadcode when... | |------------------------|------------------------| | Large, mature codebases | New projects | | Need confidence-based filtering | Want fewer false positives | | Need whitelist file approach | Prefer TOML configuration | | Dynamic code (getattr, exec) | Need unreachable code detection |
# Run both for comprehensive detection
vulture --min-confidence 80 .
deadcode .
| Context | Command |
|---------|---------|
| Quick vulture check | vulture --min-confidence 90 . |
| Quick deadcode check | deadcode . |
| Generate whitelist | vulture . --make-whitelist > vulture_whitelist.py |
| CI enforcement | vulture --min-confidence 80 . vulture_whitelist.py |
| Unreachable code | deadcode --show-unreachable . |
| Combined check | vulture --min-confidence 80 . && deadcode . |
| Flag | Description |
|------|-------------|
| --min-confidence N | Minimum confidence (60-100%) |
| --exclude PATTERN | Exclude glob patterns |
| --sort-by-size | Sort results by size |
| --make-whitelist | Generate whitelist file |
| Flag | Description |
|------|-------------|
| --verbose | Verbose output |
| --dry-run | Show without modifying |
| --show-unreachable | Detect unreachable code |
| --init | Generate configuration |
| --strict | Strict enforcement mode |
For detailed examples, advanced patterns, and best practices, see REFERENCE.md.
tools
Scaffold a new ComfyUI custom-node repo (pyproject, CI, release-please, vitest+pytest, JS extension skeleton) in the picker/gesture vein. Use when bootstrapping or init-ing a comfyui node pack.
tools
Orchestrate a ComfyUI node pack from idea to registry: scaffold, create + seed the repo, open the gitops adoption PR. Use when releasing or spinning up a new comfyui node pack.
testing
macOS EndpointSecurity/EDR high CPU & battery drain. Use when Kandji ESF / XProtect pegs a core; trace the exec storm via powermetrics + eslogger.
development
odiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.