dependency-audit

dependency-audit is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 6 tokens per session (2,565 once invoked), scanned A, original, MIT.

A security and maintenance audit for Python project dependencies. It checks packages for known vulnerabilities, outdated versions, and licence issues.

In plain words
What is it for?
Use it to inspect dependency files and installed packages, run vulnerability checks, and review package versions and licences.
Why use it?
It helps reveal risks hidden in third-party packages before they cause security, maintenance, or compliance problems.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/dependency-audit
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dependency-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/dependency-audit.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/dependency-audit)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/dependency-audit"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/dependency-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00006 $0.02565
Opus 5 $0.00003 $0.01282
Sonnet 5 $0.00001 $0.00513
Haiku 4.5 $0.00001 $0.00257

Measured 2d ago against content hash 7288a9bf51f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dependency-audit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
.claude/commands/python/dependency-audit.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Audit des Dépendances Python

Tu es un expert sécurité Python. Tu dois auditer les dépendances du projet pour identifier les vulnérabilités, les packages obsolètes et les problèmes de licence.

Arguments

$ARGUMENTS

Arguments :

  • (Optionnel) Focus : security, outdated, licenses, all

Exemple : /python:dependency-audit security ou /python:dependency-audit all

MISSION

Étape 1 : Identifier la Configuration

# Fichiers de dépendances possibles
ls -la requirements*.txt pyproject.toml setup.py Pipfile poetry.lock

# Lister les dépendances installées
pip list --format=json
pip freeze

Étape 2 : Audit de Sécurité

# Utiliser pip-audit (recommandé)
pip install pip-audit
pip-audit

# Ou safety (alternative)
pip install safety
safety check -r requirements.txt

# Ou avec pip natif (Python 3.12+)
pip audit
# Script d'audit sécurité automatisé
import subprocess
import json
from dataclasses import dataclass
from typing import Optional


@dataclass
class Vulnerability:
    package: str
    version: str
    vulnerability_id: str
    severity: str
    description: str
    fixed_in: Optional[str]


def run_pip_audit() -> list[Vulnerability]:
    """Exécute pip-audit et parse les résultats."""
    result = subprocess.run(
        ["pip-audit", "--format=json"],
        capture_output=True,
        text=True,
    )

    vulnerabilities = []
    if result.stdout:
        data = json.loads(result.stdout)
        for vuln in data.get("vulnerabilities", []):
            vulnerabilities.append(Vulnerability(
                package=vuln["name"],
                version=vuln["version"],
                vulnerability_id=vuln["id"],
                severity=vuln.get("severity", "UNKNOWN"),
                description=vuln["description"],
                fixed_in=vuln.get("fix_versions", [None])[0],
            ))

    return vulnerabilities

Étape 3 : Vérifier les Mises à Jour

# Packages obsolètes
pip list --outdated --format=json

# Avec pip-tools
pip install pip-tools
pip-compile --upgrade --dry-run

# Avec poetry
poetry show --outdated

# Avec pipenv
pipenv update --dry-run

Read the full file on GitHub · 399 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 399 lines · 6 tokens per session scan A 7288a9bf51f3

Subscribe to this mod's changes

dependency-audit is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 3d ago), licensed MIT. It adds 6 tokens to every session and 2,565 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.