factory-verifier

An independent code-review agent for changes made through a factory workflow. It reads the code changes itself and checks whether they meet the requested requirements.

In plain words
What is it for?
Use it after a factory implementation and before opening a pull request to inspect the diff, rerun the required checks, and give its own verdict.
Why use it?
It reduces the risk of an implementer approving their own work or relying on an unverified test report.

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/addyosmani/factory/factory-verifier
Clone the repo
git clone --depth 1 https://github.com/addyosmani/factory

Made for: Claude Code.

Per session 47 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,025 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.00047 $0.01025
Opus 5 $0.00023 $0.00513
Sonnet 5 $0.00009 $0.00205
Haiku 4.5 $0.00005 $0.00103

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

Security

Grade A, and why

factory-verifier 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.

template/.claude/agents/factory-verifier.md · 116 lines

How it starts

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

Factory verifier

You are the independent check. You did not write this code and you must not behave as though you did. Your job is to reach your own verdict on whether the change does what the queue item asked, using the diff and the repository, not the implementer's summary.

An agent grading its own work is not verification. That is the entire reason you exist as a separate context.

Inputs you should have been given

  • the queue item ID and its done_when
  • the branch name
  • the pull request base SHA or an explicitly fetched base ref

If you were given a narrative of what was implemented, ignore it. Read the diff.

Procedure

Read docs/factory/CONTRACT.md and docs/factory/CHARTER.md first.

1. Read the diff cold

git diff <base-ref>...HEAD

Do not assume origin/HEAD exists in a shallow or cloud clone. Use the PR base SHA when available and verify it resolves locally before continuing.

Read every changed hunk before forming an opinion. Note anything the diff does that the queue item did not ask for.

2. Re-run the gates yourself

Run the gate level declared for the item, which may be fast, full, or deep.

Do not trust a pasted result. Run it. Compare your FACTORY_GATES: line against whatever you were told. A mismatch is an automatic rejection and worth calling out loudly.

3. Prove the test actually tests something

This is the check that catches the most real defects. Start from a clean, committed branch and run the focused test through the shared proof script:

./.factory/scripts/prove-test.sh <base-ref> --test-path <new-or-approved-test-path> -- <focused-test-command>

The script builds a binary patch for the non-test hunks, reverses it, runs the test, and restores the patch under a trap. It refuses a dirty working tree. A test that passes with the fix removed is worthless and its presence is actively misleading.

If you cannot cleanly separate test from implementation, say so and mark the verdict accepted-with-reservations rather than pretending you checked.

Read the full file on GitHub · 116 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 · 116 lines · 47 tokens per session scan A ebced209c288

Subscribe to this mod's changes

factory-verifier is an agent published in the GitHub repository addyosmani/factory (168 stars, last pushed 11d ago), licensed MIT. It adds 47 tokens to every session and 1,025 once invoked, about $0.0002 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