audit

audit is a skill for Claude Code, Codex from Borda/AI-Rig. It costs 109 tokens per session (12,724 once invoked), scanned A, original, Apache-2.0.

A full quality audit for Claude Code configuration, including agents, skills, rules, settings, hooks, and installed plugins.

In plain words
What is it for?
Use it to inspect local or installed configuration, check model assignments and efficiency, apply documentation-based upgrades, or run adversarial reviews.
Why use it?
It finds inconsistencies, outdated documentation, missing permissions, broken connections, and differences between the files on disk and the recorded inventory.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the foundry plugin — 10 skills, 10 agents 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 skills/borda/ai-rig/audit
Any agent
npx skills add Borda/AI-Rig --skill audit
Clone the repo
git clone --depth 1 https://github.com/Borda/AI-Rig

Made for: Claude Code, Codex.

Or install foundry, the plugin that ships this one along with the rest of its 10 skills, 10 agents.

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 audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/borda/ai-rig/audit.svg)](https://agentmods.dev/skills/borda/ai-rig/audit)
Your own site
<a href="https://agentmods.dev/skills/borda/ai-rig/audit"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,724 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 $0.00109 $0.12724
Opus 5 $0.00055 $0.06362
Sonnet 5 $0.00022 $0.02545
Haiku 4.5 $0.00011 $0.01272

Measured 5d ago against content hash e7bbbdd89e79, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 5d 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.

Enumerates other installed skillslowAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

**Scope token resolution** (each remaining token after flag-strip, resolved before Step 2): (1) reserved keywords (`agents`, `skills`, `rules`, `communication`, `setup`, `plugin`, `plugins`) → use as-is; (2) matches dir

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/cc_foundry/skills/audit/SKILL.md · 553 lines

How it starts

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

Full-sweep audit of .claude/ config + all plugins/*/ files: agents, skills, rules, settings.json, hooks. Spawns foundry:curator per-file, aggregates system-wide for cross-file issues — infinite loops, inventory drift, missing permissions, interop breaks. Reports findings; fix level chosen from follow-up gate.

  • $ARGUMENTS: optional — parse --flags first, then resolve remaining tokens as scope

    Flags (order independent, any combination with scope):

    • --local — audit source tree (plugins/*/) not user setup (.claude/ + installed cache); plugin-dev workflows where local edits not yet installed; sets LOCAL_MODE=true
    • --upgrade — fetch latest Claude Code docs, filter new features by genuine value, apply: config changes (apply + correctness check), capability changes (calibrate before → apply → calibrate after → accept if Δrecall ≥ 0 and ΔF1 ≥ 0). Skip to Mode: upgrade. Mutually exclusive with --adversarial and --efficiency — error if combined with either.
    • --adversarial (alias: --challenge) — adversarial review of all agents + skills in scope using foundry:challenger (Phase A) + Codex adversarial pass (Phase B); surfaces issues beyond standard per-file audit; see Mode: adversarial. Mutually exclusive with --upgrade only; combinable with --efficiency.
    • --efficiency — cost and efficiency sweep: model tier validation, token bloat detection, unbounded spawn patterns, cross-file boilerplate duplication, missing model declarations, bin/ extraction candidates (Check 33). Generates prioritized cost-reduction plan with estimated savings. Detection only — run /distill executables to act on extraction candidates. Skip to Mode: efficiency. Mutually exclusive with --upgrade only; combinable with --adversarial.
    • --skip-gate — suppress follow-up gate (for automation pipelines)
    • --fast — widen fan-out from MAX_BATCHES to MAX_BATCHES_FAST, trading tokens for wall-clock. Not free: each extra agent costs ~120,851 tok of fixed overhead regardless of how little work it does (see <constants>). Use when latency matters more than cost; omit by default. Combinable with every other flag.

    Legacy positional tokens (fix, upgrade, adversarial, challenge, ab, apply, fast, full) — hard error: print migration hint and stop. Example: "fix medium removed — run /audit and pick fix level from gate, or pass --upgrade / --adversarial as flags."

    Scope tokens (positional, space-separated — resolve each token before Step 2):

    • No scope: full sweep — sources per --local: without --local covers .claude/agents/, .claude/skills/, .claude/rules/, hooks, settings, ~/.claude/plugins/cache/ installed; with --local covers plugins/*/agents/, plugins/*/skills/ + .claude/ secondary
    • agents — restrict sweep to agent files only
    • skills — restrict sweep to skill files only
    • rules — restrict sweep to rule files only
    • communication — restrict sweep to communication governance files: rules/communication.md, rules/quality-gates.md, TEAM_PROTOCOL.md, skills/_shared/file-handoff-protocol.md
    • setup — restrict to system-config files: settings.json, permissions-guide.md, hooks, MEMORY.md, README.md, plugin integration, post-install user state (Checks 1–11, 30, I1, I2, I3); Step 3: setup SKILL.md only (one foundry:curator spawn); Checks I1–I3 read ~/.claude/ not .claude/
    • plugin — plugin integration only: codex plugin (Check 7), foundry plugin + init validation (Check 8, including 8g); Step 3: setup SKILL.md only (one foundry:curator spawn)
    • plugins — full audit of all plugins: per-file audit of every plugins/*/agents/*.md and plugins/*/skills/*/SKILL.md + integration checks (7, 8) per plugin
    • plugins <name> — same as plugins scoped to one plugin: plugins/<name>/agents/*.md + plugins/<name>/skills/*/SKILL.md + integration checks; <name> must match dir under plugins/ (e.g. plugins foundry, plugins oss, plugins research)
    • <plugin-name>tier 2 shorthand: bare plugin dir name (e.g. oss, foundry, research, develop, codemap) auto-resolved when token matches dir under plugins/; equivalent to plugins <name>; no plugins prefix needed
    • <agent-name>tier 3: name matches plugins/*/agents/<name>.md or .claude/agents/<name>.md; runs agent checks only (Checks 14a, 14b, 15, 19, 20, 17, 12, 13, 25, 22, 26, 29); one file in Step 3
    • <skill-name>tier 3: name matches plugins/*/skills/<name>/SKILL.md or .claude/skills/<name>/SKILL.md; runs skill checks only (Checks 14a, 14b, 15, 17, 12, 23, 22, 13, 24, 25, 26, 27, 28, 29); one file in Step 3
    • Multiple scope tokens — space-separated, any combo; scope = union of resolved file sets: agents skills, oss research, shepherd curator, review resolve; check list = union (de-duplicated)

Read the full file on GitHub · 553 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. 5d ago First seen · 553 lines · 109 tokens per session scan A e7bbbdd89e79

Subscribe to this mod's changes

audit is a skill published in the GitHub repository Borda/AI-Rig (26 stars, last pushed yesterday), licensed Apache-2.0. It adds 109 tokens to every session and 12,724 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

file-headers

MANDATORY for every coding agent (Claude Code, Codex, or any other) on every change-set — every applicable source file the agent creates or updates MUST start with the project's copyright/authorship header (file overview + exact author line). Use automatically whenever writing a new file or editing an existing one; do…

hoangsonww/Claude-Code-Agent-Monitor · 101 tokens

productivity-score

Calculate a productivity score using actual Agent Monitor metrics — session completion rates, cache efficiency (cacheread vs input), compaction pressure (baseline tokens), turn velocity (turncount / totalturndurationms), tool success ratio (PreToolUse vs PostToolUse), and the workflow intelligence API's complexity and…

hoangsonww/Claude-Code-Agent-Monitor · 67 tokens

budget-set

Define a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a…

hoangsonww/Claude-Code-Agent-Monitor · 79 tokens

dashboard-status

Quick dashboard health and status overview — checks the Agent Monitor API (port 4820), reports session/agent/event counts from /api/stats, confirms WebSocket connectivity, reads the redacted hook status returned by /api/settings/info, and shows data freshness (last event timestamp). Use to verify the monitoring system…

hoangsonww/Claude-Code-Agent-Monitor · 69 tokens

dag-map

Render the multi-agent orchestration DAG for a session — parent→child subagent edges, tree depth, and fan-out — from the Agent Monitor workflow intelligence API. Cross-checks the orchestration dataset against the raw agent records and session detail. Use when visualizing how a session's agent structure was organized.

hoangsonww/Claude-Code-Agent-Monitor · 65 tokens

run-agent

Launch and supervise Claude Code or Codex through the CCAM Run API. Use when the user wants to start a monitored agent, select a model, approval policy, sandbox, or working directory, send a follow-up, inspect live output, resume a native session, or stop a dashboard-launched run.

hoangsonww/Claude-Code-Agent-Monitor · 64 tokens