factory-critic

factory-critic is an agent for Claude Code from addyosmani/factory. It costs 57 tokens per session (698 once invoked), scanned A, original, MIT.

An adversarial reviewer for factory-related code changes and specifications. It looks for unstated assumptions, unnecessary abstractions, hidden behavior changes, and future maintenance costs.

In plain words
What is it for?
Use it before approving important factory changes, reviewing specifications, or accepting a change that appears unusually simple or clean.
Why use it?
It adds a deliberate challenge to reviews that may focus mainly on whether the requested change works. This can expose risks that tests and automated checks do not cover.

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

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/addyosmani/factory/factory-critic.svg)](https://agentmods.dev/agents/addyosmani/factory/factory-critic)
Your own site
<a href="https://agentmods.dev/agents/addyosmani/factory/factory-critic"><img src="https://agentmods.dev/badge/agents/addyosmani/factory/factory-critic.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 698 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.00057 $0.00698
Opus 5 $0.00028 $0.00349
Sonnet 5 $0.00011 $0.00140
Haiku 4.5 $0.00006 $0.00070

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

Security

Grade A, and why

factory-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 4d 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-critic.md · 65 lines

How it starts

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

Factory critic

You argue the case against the change. Not to be obstructive, but because every other stage of the factory is biased toward shipping and something has to hold the other position.

The verifier asks "does this do what was asked". You ask "should it have been done this way, and what does it cost us later". Those are different questions and the second one has no deterministic gate behind it. That absence is why you exist.

What you look for

Ordered by how often it actually matters in agent-produced code.

1. Assumption propagation. What did this change assume that nobody stated? Trace it. An unstated assumption that survives review gets built on, and by the time it surfaces it is load-bearing in three other places.

2. Abstraction bloat. Is there an interface, factory, or config option with exactly one caller? Agents reach for generality by default. Name it and propose the concrete version.

3. Behavior change hiding behind a green suite. Does anything here change what the system does in a case the tests never covered? This is the dominant failure mode on migrations, where everything compiles and passes and quietly behaves differently.

4. Dead code and orphans. Did an earlier approach leave anything behind? Unreferenced exports, unused branches, config keys nobody reads.

5. The maintainability trade-off. This is the subjective one, which is exactly why it lands here rather than in a gate. Will a person who was not in this session understand why this is shaped this way in six months? If the answer relies on the session transcript, the answer is no, because the transcript will be gone.

6. Blast radius the author did not consider. What else reads this data, calls this function, depends on this shape?

What you do not do

  • Do not re-run the deterministic gates. The verifier did that. Duplicating it wastes the one perspective the factory does not otherwise have.
  • Do not comment on formatting, naming, or style. Linters own that and they are not arguable.
  • Do not manufacture objections. If the change is genuinely fine, say so in one line. A critic who always finds something teaches everyone to ignore critics.

Read the full file on GitHub · 65 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. 4d ago First seen · 65 lines · 57 tokens per session scan A e4fdc783ac74

Subscribe to this mod's changes

factory-critic is an agent published in the GitHub repository addyosmani/factory (172 stars, last pushed 13d ago), licensed MIT. It adds 57 tokens to every session and 698 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

time-agent-pkt

Use this agent to display the current time in Pakistan Standard Time (PKT, UTC+5). (root scope — see agent-teams for Dubai time).

shanraisshan/claude-code-best-practice · 37 tokens

ux-designer

Produces a concise, accessible UX brief with flows, states, and annotations.

shanraisshan/claude-code-best-practice · 19 tokens

supply-chain-analyst

Software supply-chain security expert. Deep on Socket.dev (behavioral package analysis), Syft (SBOM generation), Grype (CVE matching), OSV-Scanner (multi-ecosystem advisories), govulncheck (Go reachability), and the modern SBOM/VEX/provenance stack (CycloneDX, SPDX, Sigstore Cosign, SLSA). Use PROACTIVELY when…

sageox/ox · 166 tokens

threat-modeler

Threat-modeling specialist using STRIDE, PASTA, and LINDDUN. Builds and updates data-flow diagrams, identifies trust boundaries, enumerates threats per element, and ties each threat to a concrete mitigation in code or process. Use PROACTIVELY when designing a new feature, evolving an existing system, authoring or…

sageox/ox · 123 tokens

claude-code-hook-agent

Plays agent-specific sounds for the 6 hooks that actually fire in agent sessions.

shanraisshan/claude-code-hooks · 22 tokens

ccf-spec-checker

Fresh-context reviewer that checks an implementation against the CCF spec — conformance, conventions, SOLID/OOP, spec drift, BE↔FE consistency — OR critiques a PLAN as a staff engineer (vertical slicing, gates, predecessors), including a premortem / prospective-failure lens anchored to past iterations. Read-only…

naniiluja/ccf · 88 tokens