audit

audit is a command for Claude Code from nexus-labs-automation/agent-observability. It costs 7 tokens per session (1,260 once invoked), scanned A, original, MIT.

A codebase review command for checking whether an AI agent is being observed properly. Observability means recording enough information to understand what the agent did, how it failed, and how much it used.

In plain words
What is it for?
Use it to inspect an agent project, identify its framework and monitoring setup, and review tracking for model calls, tools, errors, tokens, costs, identity, and multi-agent links.
Why use it?
It finds missing tracking and common monitoring mistakes, so failures, costs, model calls, and tool use are easier to investigate.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is /audit ./src/agents.

Part of the agent-observability plugin — 14 skills, 2 commands, 2 agents shipped together

Good fit Use it to inspect an agent project, identify its framework and monitoring setup, and review tracking for model calls, tools, errors, tokens, costs, identity, and multi-agent links.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nexus-labs-automation/agent-observability
agentmods
npx agentmods add commands/nexus-labs-automation/agent-observability/audit

Made for: Claude Code.

Or install agent-observability, the plugin that ships this one along with the rest of its 14 skills, 2 commands, 2 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/commands/nexus-labs-automation/agent-observability/audit.svg)](https://agentmods.dev/commands/nexus-labs-automation/agent-observability/audit)
Your own site
<a href="https://agentmods.dev/commands/nexus-labs-automation/agent-observability/audit"><img src="https://agentmods.dev/badge/commands/nexus-labs-automation/agent-observability/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00007 $0.01260
Opus 5 $0.00003 $0.00630
Sonnet 5 $0.00001 $0.00252
Haiku 4.5 $0.00001 $0.00126

Measured 8d ago against content hash 27a76b6a2af8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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

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/audit.md · 189 lines

How it starts

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

/audit Command

Scan existing agent codebase for telemetry coverage and anti-patterns.

Arguments

  • path: Optional path to audit (defaults to current directory)

Workflow

Step 1: Launch Codebase Analyzer

Launch codebase-analyzer agent to:

  1. Detect agent framework(s)
  2. Find existing observability SDKs
  3. Map agent architecture
  4. Identify entry points and key files

Step 2: Load Audit References

Based on detection, load:

  • references/methodology/agent-observability-tiers.md
  • references/frameworks/{framework}.md
  • references/vendors/{vendor}.md (if vendor detected)
  • references/anti-patterns/

Step 3: Evaluate Coverage

Check each instrumentation area:

Area Priority Status Check
SDK Initialization P0 Vendor SDK configured?
LLM Call Tracing P0 Model calls have spans?
Tool Call Tracing P0 Tool executions tracked?
Error Capture P0 Errors logged with context?
Token Tracking P1 Input/output tokens recorded?
Cost Attribution P1 Cost calculated per call?
Agent Identity P1 Agent name/type in spans?
Multi-Agent Links P1 Parent-child relationships?
Memory/RAG Spans P2 Retrieval tracked?
Human-in-Loop P2 Approval workflows traced?
Evaluations P2 Quality metrics captured?
Session Context P2 User/session attached?

Step 4: Anti-Pattern Scan

Launch instrumentation-reviewer agent to check for:

Critical:

  • Full prompt/response logging
  • Secrets in traces
  • Missing parent spans
  • Blocking telemetry calls

Important:

  • No token tracking
  • Missing error context
  • High cardinality attributes
  • Inconsistent naming

Step 5: Generate Audit Report

Output comprehensive report with:

  • Coverage scorecard
  • Gaps ranked by priority
  • Anti-patterns with file:line refs
  • Recommended fixes
  • Quick wins vs. larger efforts

Output Format

## Agent Observability Audit: [Project Name]

### Executive Summary
- **Framework:** [LangGraph]
- **Vendor:** [Langfuse v2.1]
- **Coverage Score:** [65%] (based on tier completion)
- **Critical Issues:** [2]
- **Recommended Actions:** [5]

### Existing Telemetry
| SDK/Vendor | Version | Location | Status |
|------------|---------|----------|--------|
| Langfuse | 2.1.0 | requirements.txt | Active |
| OpenTelemetry | 1.20 | pyproject.toml | Partial |

### Coverage Assessment

#### Tier 0: Foundation
| Check | Status | Notes |
|-------|--------|-------|
| SDK Init | PASS | langfuse.init() in main.py:12 |
| Root Span | FAIL | No agent-level span |
| Error Capture | PASS | Exception handler present |

#### Tier 1: Core Tracing
| Check | Status | Notes |
|-------|--------|-------|
| LLM Spans | PARTIAL | Only OpenAI, missing Anthropic |
| Tool Spans | FAIL | Tools not instrumented |
| Agent Loop | PASS | @observe decorator on run() |

#### Tier 2: Context
| Check | Status | Notes |
|-------|--------|-------|
| Token Tracking | PASS | usage in span attributes |
| Cost Attribution | FAIL | No cost calculation |
| User Context | PARTIAL | user_id but no session |

#### Tier 3: Multi-Agent
| Check | Status | Notes |
|-------|--------|-------|
| Parent-Child | FAIL | Child agents orphaned |
| Handoff Logging | FAIL | No delegation tracking |

#### Tier 4: Evaluation
| Check | Status | Notes |
|-------|--------|-------|
| Quality Scores | FAIL | Not implemented |
| Feedback Capture | FAIL | Not implemented |

### Coverage Score

[##########..........] 50% Overall

Read the full file on GitHub · 189 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. 8d ago First seen · 189 lines · 7 tokens per session scan A 27a76b6a2af8

Subscribe to this mod's changes

audit is a command published in the GitHub repository nexus-labs-automation/agent-observability (7 stars, last pushed 8mo ago), licensed MIT. It adds 7 tokens to every session and 1,260 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.