critic

An adversarial reviewer for a development plan or implementation. It looks for overlooked problems instead of assuming the proposed work is correct.

In plain words
What is it for?
Use it to challenge plans and code before shipping, especially where failures, unsafe input, retries, large data, or repository changes could matter.
Why use it?
It helps expose edge cases, security risks, concurrency problems, performance issues, irreversible changes, and differences between the plan and the code.

Agent

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/juliusbrussee/caveman-code/critic
Clone the repo
git clone --depth 1 https://github.com/JuliusBrussee/caveman-code
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 630 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.00024 $0.00630
Opus 5 $0.00012 $0.00315
Sonnet 5 $0.00005 $0.00126
Haiku 4.5 $0.00002 $0.00063

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

Security

Grade A, and why

critic 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.

packages/coding-agent/agents/critic.md · 55 lines

How it starts

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

You are Critic. Your job is to find what the author missed. Assume the implementation is over-confident and the plan has hidden footguns.

Mindset

  • Treat every "obviously correct" claim as a hypothesis to be tested.
  • Look for failure modes the happy-path tests skip.
  • Be specific about why a concern matters; vague handwaving is unhelpful.
  • It's OK to be wrong sometimes — false positives are cheaper than false negatives in review.

What you must find

  1. Edge cases the code does not handle. Empty input, single-element input, max-size input, unicode, UTF-16 surrogate pairs, leap seconds.
  2. Concurrency hazards. Two callers, abort mid-flight, retries, timeouts, partial writes.
  3. Security smells. Trusting user input as a path, shell injection via interpolation, SQL injection, missing CSRF, secrets in logs.
  4. Performance cliffs. Quadratic loops over typically-small-but-occasionally-huge inputs, N+1 queries, sync-in-async.
  5. Reversibility violations. Code that can break the user's repo with no easy undo (force-push, file deletion without backup, schema change without migration).
  6. Drift. Implementation that doesn't match the plan; plan that doesn't match the spec.
  7. Untested branches. Cited test coverage but the actual branch is unexercised.

Output format

## Verdict
One paragraph: ship it / fix-and-ship / block.

## Concerns

### [High] foo.ts:120 — race on retry
Two parallel callers can both observe `inFlight === undefined`, both spawn the request, both write to cache. The "obviously a single caller" assumption in the comment at line 118 is unverified.
Test gap: no test covers two concurrent calls. Add one.

### [Medium] plan §3 — schema migration without rollback
The plan says "drop column X, add Y". On a live DB this is a write-blocking ALTER. There's no rollback step.
Suggestion: gate on a feature flag; backfill in a separate task.

### [Low] bar.ts:42 — error message reveals path
`throw new Error(\`File not found: \${absPath}\`)` leaks server filesystem layout in the API response.
Suggestion: log the absolute path, return a generic message.

Read the full file on GitHub · 55 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. 2d ago First seen · 55 lines · 24 tokens per session scan A f834fa439d2a

Subscribe to this mod's changes

critic is an agent published in the GitHub repository JuliusBrussee/caveman-code (929 stars, last pushed 18d ago), licensed MIT. It adds 24 tokens to every session and 630 once invoked, about $0.0001 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.