dep-audit

dep-audit is a command for Claude Code from hmj1026/dhpk. It costs 4 tokens per session (825 once invoked), scanned A, original, MIT.

A dependency security auditing command for checking the third-party packages used by a project. Dependencies are external libraries that the project relies on.

In plain words
What is it for?
Running a project's audit script when available, or selecting an audit command based on its package manager and requested severity level.
Why use it?
It identifies known security risks in those packages and can optionally try to fix them.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the dhpk plugin — 65 skills, 31 commands, 40 agents, 4 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/hmj1026/dhpk/dep-audit
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 40 agents, 4 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 dep-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/hmj1026/dhpk/dep-audit.svg)](https://agentmods.dev/commands/hmj1026/dhpk/dep-audit)
Your own site
<a href="https://agentmods.dev/commands/hmj1026/dhpk/dep-audit"><img src="https://agentmods.dev/badge/commands/hmj1026/dhpk/dep-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00004 $0.00825
Opus 5 $0.00002 $0.00413
Sonnet 5 $0.00001 $0.00165
Haiku 4.5 $0.00000 $0.00082

Measured yesterday against content hash 8804d35be137, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dep-audit scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/dep-audit.md · 102 lines

How it starts

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

⚠️ Must read and follow the skill below before executing this command:

@skills/change-verdict/SKILL.md

Use its security mode for the final evidence-only verdict. The command may run the explicitly requested audit or fix operation, but the verdict skill remains strictly read-only.

Arguments

$ARGUMENTS = optional parameters

  • --level <severity> - Minimum reporting level (low/moderate/high/critical), default: moderate
  • --fix - Attempt automatic fix

Task

Step 1: Check for audit script

Use Glob to check if .claude/scripts/dep-audit.sh exists in the project root.

  • Found → run: bash .claude/scripts/dep-audit.sh $ARGUMENTS
    • If script succeeds, use its output and skip to the Output section.
    • If script fails, treat as a real audit failure (do not silently fallback).
  • NOT found → skip to Step 2 (do NOT attempt to run the script).

Step 2: Fallback (no audit script)

If the script was not found in Step 1, detect the project ecosystem and run the audit manually.

Ecosystem detection (check project root for manifest files):

Manifest Ecosystem Audit Command Fix Command
package.json + pnpm-lock.yaml Node (pnpm) pnpm audit --audit-level {LEVEL} pnpm audit --fix
package.json + yarn.lock Node (yarn) yarn audit --level {LEVEL} yarn audit --fix or npx yarn-audit-fix
package.json Node (npm) npm audit --audit-level={LEVEL} npm audit fix
pyproject.toml Python pip-audit or safety check pip-audit --fix
Cargo.toml Rust cargo audit cargo audit fix
go.mod Go govulncheck ./... (manual fix)
build.gradle Java ./gradlew dependencyCheckAnalyze (manual fix)

Default {LEVEL} is moderate unless --level argument is provided.

If --fix is specified, run the fix command for the detected ecosystem after audit. If no recognized manifest file exists, report an error.

Read the full file on GitHub · 102 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. yesterday Changed · +4 lines 8804d35be137
  2. 6d ago First seen · 98 lines · 4 tokens per session scan A 8c4d2b04e6b4

Subscribe to this mod's changes

dep-audit is a command published in the GitHub repository hmj1026/dhpk (2 stars, last pushed yesterday), licensed MIT. It adds 4 tokens to every session and 825 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.