MCPInstall

vulture-dead-code

Vulture and deadcode tools for detecting unused Python code (functions, classes, imports). Use when cleaning up codebases or removing dead code. Triggers vulture, deadcode.

Installs
318
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/laurigates/claude-plugins --skill vulture-dead-code
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads vulture-dead-code automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Vulture and deadcode - Dead Code Detection

Tools for finding unused Python code including functions, classes, variables, imports, and attributes.

When to Use This Skill

Use this skill when...Use another tool instead when...
Detecting unused functions, classes, variablesFinding unused imports only (use ruff --select F401)
Cleaning up dead code in a codebaseChecking type correctness (use basedpyright)
Enforcing code hygiene in CIFormatting code (use ruff format)
Generating whitelists for false positivesRunning general linting (use ruff check)

Overview

Vulture (mature, confidence-based) and deadcode (newer, AST-based) both detect unused code but with different approaches:

FeatureVulturedeadcode
ApproachStatic analysis + confidence scoresAST-based detection
AccuracyConfidence scores (60-100%)High accuracy, fewer false positives
SpeedFastVery fast
ConfigurationWhitelist filesTOML configuration
MaturityMature (2012)Newer (2023+)
Best ForLarge codebases, gradual cleanupNew projects, strict enforcement

Installation

# Install vulture
uv add --dev vulture

# Install deadcode (newer alternative)
uv add --dev deadcode

# Install both for comparison
uv add --dev vulture deadcode

Vulture - Confidence-Based Detection

Basic Usage

# 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

Configuration (pyproject.toml)

[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*",
]

deadcode - AST-Based Detection

Basic Usage

# 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

Configuration (pyproject.toml)

[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

Choosing Between Tools

Choose Vulture when...Choose deadcode when...
Large, mature codebasesNew projects
Need confidence-based filteringWant fewer false positives
Need whitelist file approachPrefer TOML configuration
Dynamic code (getattr, exec)Need unreachable code detection

Hybrid Approach

# Run both for comprehensive detection
vulture --min-confidence 80 .
deadcode .

Agentic Optimizations

ContextCommand
Quick vulture checkvulture --min-confidence 90 .
Quick deadcode checkdeadcode .
Generate whitelistvulture . --make-whitelist > vulture_whitelist.py
CI enforcementvulture --min-confidence 80 . vulture_whitelist.py
Unreachable codedeadcode --show-unreachable .
Combined checkvulture --min-confidence 80 . && deadcode .

Quick Reference

Vulture Flags

FlagDescription
--min-confidence NMinimum confidence (60-100%)
--exclude PATTERNExclude glob patterns
--sort-by-sizeSort results by size
--make-whitelistGenerate whitelist file

deadcode Flags

FlagDescription
--verboseVerbose output
--dry-runShow without modifying
--show-unreachableDetect unreachable code
--initGenerate configuration
--strictStrict enforcement mode

For detailed examples, advanced patterns, and best practices, see REFERENCE.md.

FAQ

What does the vulture-dead-code skill do?

Vulture and deadcode tools for detecting unused Python code (functions, classes, imports). Use when cleaning up codebases or removing dead code. Triggers vulture, deadcode.

How do I install vulture-dead-code?

Run npx skills add https://github.com/laurigates/claude-plugins --skill vulture-dead-code in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/vulture-dead-code/ (personal) or .claude/skills/vulture-dead-code/ (project).

Which AI agents can use vulture-dead-code?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is vulture-dead-code safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains vulture-dead-code?

It is published by laurigates in laurigates/claude-plugins. It has 318 recorded installs.

More from laurigates/claude-plugins

View all →

python-code-quality

laurigates/claude-plugins

Python code quality with ruff and ty. Use when the user mentions ruff, ty, linting, formatting, type checking, or Python code style.

1K installs

ruff-linting

laurigates/claude-plugins

Open the skill to read its SKILL.md instructions.

465 installs

python-testing

laurigates/claude-plugins

Python testing with pytest, coverage, fixtures, and mocking. Use when the user mentions pytest, unit tests, coverage, fixtures, mocking, or writing Python tests.

Testing & QA428 installs

pytest-advanced

laurigates/claude-plugins

Advanced pytest: fixtures, markers, parametrization, parallel execution. Use when implementing test infrastructure, writing fixtures, or running with coverage.

Testing & QA352 installs

uv-workspaces

laurigates/claude-plugins

Manage multi-package Python projects with uv workspaces. Use when the user mentions uv workspaces, Python monorepo, shared lockfiles, or member dependencies.

321 installs

basedpyright-type-checking

laurigates/claude-plugins

Open the skill to read its SKILL.md instructions.

320 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs