audit

audit is a command for Claude Code from openplanr/planr-pipeline. It costs 0 tokens per session (4,363 once invoked), scanned A, original, MIT.

A command that performs an adversarial audit of a codebase, meaning a systematic search for structural, architectural, and user-experience problems.

In plain words
What is it for?
Use it to inventory repository files, classify project components, measure complexity, inspect architecture and workflows, and produce a detailed audit plan.
Why use it?
It helps reveal risks and weaknesses before they become expensive fixes, then turns the findings into an actionable plan.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; mentions Claude Code.

Part of the planr-pipeline plugin — 8 skills, 10 commands, 9 agents, 1 hook 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/openplanr/planr-pipeline/audit
Clone the repo
git clone --depth 1 https://github.com/openplanr/planr-pipeline

Made for: Claude Code.

Or install planr-pipeline, the plugin that ships this one along with the rest of its 8 skills, 10 commands, 9 agents, 1 hook.

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/openplanr/planr-pipeline/audit.svg)](https://agentmods.dev/commands/openplanr/planr-pipeline/audit)
Your own site
<a href="https://agentmods.dev/commands/openplanr/planr-pipeline/audit"><img src="https://agentmods.dev/badge/commands/openplanr/planr-pipeline/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,363 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.00000 $0.04363
Opus 5 $0.00000 $0.02181
Sonnet 5 $0.00000 $0.00873
Haiku 4.5 $0.00000 $0.00436

Measured 6d ago against content hash 206664d90272, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Bash(curl:*): ❌
.claude/commands/audit.md · 420 lines

How it starts

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

planr-pipeline & OpenPlanr — Master Codebase Audit Prompt

For use in Claude Code / any agentic coding environment

Drop this as a slash command or paste directly into Claude Code


You are a Principal Engineer & Product Architect conducting a full adversarial audit of this codebase. Your job is not to be polite. Your job is to find every structural, architectural, and experiential problem — then produce an actionable plan to fix them.

This audit has three phases. You must complete them in order. Do not skip phases. Do not summarize — produce full deliverables.


PHASE 1 — DISCOVERY (Read-Only)

Scan the entire repository. Read every file. Build a mental model before drawing conclusions.

1.1 Structure Inventory

Run the following and record the output:

find . -type f | grep -v node_modules | grep -v .git | sort

Then map the tree into categories:

  • Entry points (CLI commands, slash commands)
  • Agent definitions
  • Shared utilities / helpers
  • Config / schema files
  • Templates
  • Documentation
  • Tests
  • Generated / output artifacts

1.2 Complexity Heatmap

For every source file, record:

  • Line count
  • Number of functions / exported symbols
  • Number of external imports
  • Cyclomatic complexity (estimate from nesting depth)

Flag any file over 300 lines as a bloat candidate. Flag any file over 500 lines as a critical bloat violation.

1.3 Dependency Audit

Read package.json (and any sub-package manifests). For every dependency, ask:

  • Is it actually used? (grep for import/require)
  • Could it be replaced by a built-in Node/TypeScript equivalent?
  • Is it a heavy library doing a job that needs 10 lines of code?
  • Is it pinned to a specific version? Is that version current?

Flag every unused or replaceable dependency as a dead weight item.

1.4 Schema & Contract Audit

Locate every schema definition (Zod, TypeScript interfaces, JSON schema, frontmatter contracts). For each:

  • Is the schema co-located with its consumer, or floating?
  • Is it validated at runtime or only at compile time?
  • Is there a single source of truth, or duplicates?
  • Is the schema versioned?

Read the full file on GitHub · 420 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. 6d ago First seen · 420 lines · 0 tokens per session scan A 206664d90272

Subscribe to this mod's changes

audit is a command published in the GitHub repository openplanr/planr-pipeline (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,363 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.