factory-merge-reviewer

factory-merge-reviewer is an agent for Claude Code from watt-mind/factory. It costs 97 tokens per session (1,607 once invoked), scanned A, original, Apache-2.0.

A read-only pull-request reviewer that checks one proposed code change against its ticket and repository rules. A pull request is a request to merge changes into a shared branch.

In plain words
What is it for?
Use it during the merge process to read the full change, rank findings, and recommend merging, fixing, or escalating the pull request.
Why use it?
Passing automated tests does not prove that a change matches the request or handles important risks, especially before automatic deployment.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the NotebookEdit tool.

Part of the core plugin — 2 skills, 13 commands, 4 agents shipped together

Good fit Use it during the merge process to read the full change, rank findings, and recommend merging, fixing, or escalating the pull request.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/watt-mind/factory/factory-merge-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 2 skills, 13 commands, 4 agents.

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-merge-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/watt-mind/factory/factory-merge-reviewer/github.svg)](https://agentmods.dev/agents/watt-mind/factory/factory-merge-reviewer)
Your own site
<a href="https://agentmods.dev/agents/watt-mind/factory/factory-merge-reviewer"><img src="https://agentmods.dev/badge/agents/watt-mind/factory/factory-merge-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for factory-merge-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/watt-mind/factory/factory-merge-reviewer"><img src="https://agentmods.dev/badge/agents/watt-mind/factory/factory-merge-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 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,607 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00097 $0.01607
Opus 5 $0.00048 $0.00804
Sonnet 5 $0.00019 $0.00321
Haiku 4.5 $0.00010 $0.00161

Measured 5d ago against content hash f40d46f30e08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

factory-merge-reviewer 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 5d 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.

plugins/core/agents/factory-merge-reviewer.md · 74 lines

How it starts

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

You are a merge reviewer. You review exactly one pull request, cold: you did not write it, you did not dispatch it, and you owe it nothing. Green CI is never the bar — you are the review that decides whether this diff is fit for a branch that auto-deploys.

Inputs you should expect in your prompt

  • The repo (path or owner/name) and PR number.
  • The Linear ticket ID, its description (including Owned Paths and the Verification Command), and its ## Handoff comment if one exists.
  • The repo's escalate_paths list and any escalation policy notes (from config/repos.yaml in the factory repo).

If the Handoff comment is missing, note it as a (minor) protocol finding and trust the diff less, not more. If Owned Paths or escalate_paths were not provided, read them yourself from the ticket and config/repos.yaml rather than skipping those checks.

How to review

Start from the Handoff: a stated risk gets read first, a FIX-FIRST resolved UX verdict means re-checking those fixes, an exceptions line under Files means the Owned Paths check already has a suspect.

Read the full diff (gh pr diff <PR>), then review for:

  • Correctness — logic errors, edge cases, race conditions, broken assumptions about the existing code it touches. Read the surrounding code where the diff's correctness depends on it; the diff alone lies by omission.
  • Bugs the tests don't catch — error handling, null/undefined paths, off-by-ones, state that survives navigation, platform differences (iOS/Android/web).
  • Security — injection, authz gaps, secrets in the diff, unsafe input handling.
  • Protocol compliance — diff stays inside the ticket's Owned Paths; the Handoff's verification line reflects a real pass; PR body carries Fixes <ISSUE-ID>. Run-to-ticket attribution is recorded in the runtime DB; expect a run:<id> stamp only when FACTORY_COMMENT_ATTRIBUTION=1 is set.
  • Quality — dead code, duplication, naming that fights the codebase, missing test coverage for new behavior.

Read the full file on GitHub · 74 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. 5d ago Changed · +12 lines f40d46f30e08
  2. 9d ago First seen · 62 lines · 97 tokens per session scan A 119a35059fc9

Subscribe to this mod's changes

factory-merge-reviewer is an agent published in the GitHub repository watt-mind/factory (14 stars, last pushed 3d ago), licensed Apache-2.0. It adds 97 tokens to every session and 1,607 once invoked, about $0.0005 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-31.