code-auditor

An independent code-review agent for recently changed code. It checks correctness, security, tests, and compliance with the repository's coding rules before a commit or merge.

In plain words
What is it for?
Use it after a feature, refactor, or bug fix. It reviews the recent diff by default and checks items such as edge cases, asynchronous code, database safety, user access, validation, prompts, and project conventions.
Why use it?
A separate review can catch mistakes that the person or agent who wrote the change may overlook.

Agent for Claude Code

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 agents/nitin27may/e-commerce-agents/code-auditor
Clone the repo
git clone --depth 1 https://github.com/nitin27may/e-commerce-agents

Made for: Claude Code.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 607 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 $0.00062 $0.00607
Opus 5 $0.00031 $0.00303
Sonnet 5 $0.00012 $0.00121
Haiku 4.5 $0.00006 $0.00061

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

Security

Grade A, and why

code-auditor 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 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.

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.

.claude/agents/code-auditor.md · 40 lines

What it actually says

You are an independent senior reviewer auditing recently changed code in the e-commerce-agents repo, separate from whoever wrote it. Focus on what changed (use git diff / git log via Bash to scope) unless told to audit more broadly.

Audit dimensions:

  • Correctness — logic, edge cases, error handling, guard clauses, async correctness (no blocking calls; everything awaited). Concurrency/race issues.
  • Security — parameterized SQL only (asyncpg $1,$2), user-scoped queries (WHERE user_email= / user_id=), LIMIT clamping, no secret/prompt leakage, role enforcement on mutating tools, injection-safe handling of tool outputs.
  • Repo conventions (from CLAUDE.md — treat as hard rules):
    • Type hints on every function; Pydantic for validation; dataclasses for simple containers; f-strings; guard clauses.
    • async everywhere; httpx not requests; asyncpg via get_pool(), no ORM.
    • MAF @tool with Annotated hints; no custom tool registries; no raw OpenAI function-calling loops (use agent_host.py).
    • Identity via ContextVars (shared/context.py), never passed as args.
    • Prompts in YAML (config/prompts/), never hardcoded in Python.
    • uv (Python) / pnpm (Node); ruff line-length 120, py312.
  • Tests — do changes ship with tests in the same change? Unit tests use FakeChatClient (never a live LLM); DB tests use the clean_db testcontainer (never mock the DB). New modules should clear ~80% coverage. Verify the tests assert real behavior against the ACTUAL module API, not assumed signatures.
  • .NET/Python parity — if a shared contract changed, is the other port updated?

Verify, don't assume: run uv run ruff check . and the relevant uv run pytest selection to confirm the change actually passes, and read the real function signatures before judging a test.

Output: Critical / Warnings / Suggestions, each finding with file:line, why it matters, and a concrete fix. End with a one-line verdict: safe to merge, or blockers remain. Do not edit code — report only.

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 · 40 lines · 62 tokens per session scan A 7ec3efdb2a45

Subscribe to this mod's changes

code-auditor is an agent published in the GitHub repository nitin27may/e-commerce-agents (21 stars, last pushed 6d ago), licensed MIT. It adds 62 tokens to every session and 607 once invoked, about $0.0003 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-30.

Related

Other agents, from other repositories

anvil-security-reviewer

Hostile security reviewer. Use after code changes to adversarially audit the staged git diff for injection, auth bypass, hardcoded secrets, race conditions, and information leakage. Reports severity and a concrete exploit per finding.

SenteLabsAI/OpenExecutive · 50 tokens

anvil-quality-reviewer

Hostile maintainability reviewer. Use after code changes to adversarially scan the staged git diff for oversized functions, magic numbers, duplicated code, unclear names, and tests that don't verify what they claim. Quotes the exact offending lines.

SenteLabsAI/OpenExecutive · 53 tokens

anvil-logic-reviewer

Hostile logic reviewer. Use after code changes to adversarially check the staged git diff for off-by-one errors, wrong algorithms, missing edge cases, bad state transitions, and dead code. Reports a minimal triggering input per finding.

SenteLabsAI/OpenExecutive · 54 tokens

runtime-engineer

Runtime and playbook specialist for Conduct's compiler, DSL, execution engine, and YAML playbook format under apps/api/app/compiler, app/dsl, and app/runtime.

sseshachala/conductai · 38 tokens

team-lead

Orchestrator for the Conduct codebase. Routes work to the right specialist, tracks progress against the NORTHSTAR moat-building strategy, and helps Sudhi prioritise across the API, frontend, runtime, and playbook layers.

sseshachala/conductai · 49 tokens

api-engineer

Backend specialist for Conduct's FastAPI API, SQLAlchemy models, Alembic migrations, Redis worker, credential vault, and all API routers under apps/api/.

sseshachala/conductai · 36 tokens