Skip to main content
subagent CX Codex

comparator — Claude Code subagent: what it does, how to install

comparator runs blind comparisons between two AI outputs against the original prompt. Identifies the stronger result without knowing which skill produced each file.

no license ★ 406 updated 2026-06-25

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/comparator.md
Open on GitHub

What comparator does

The subagent receives paths to two outputs, the initial task prompt, and optional assertion checks. It inspects outputs as plain files or directory trees. Crucially, it never sees which system generated artifact A or B.

Evaluation uses two distinct scales from 1 to 5: content quality and document structure. The agent checks correctness, completeness, schema accuracy, and overall layout. If you pass specific assertions, it calculates pass rates as secondary validation points. Draws remain an exception.

All findings write out to comparison.json or a chosen target path. You get numerical scores on a 10-point scale alongside explicit lists of strengths and flaws for both candidates.

What it helps with

  • pick the stronger output between two AI runs
  • build a task-specific grading rubric for content and structure
  • score candidate files against a checklist of assertions
  • generate a structured JSON summary with strengths and weaknesses

Example prompts for the agent

  • Compare artifacts in output_a and output_b against the goal in prompt.txt
  • Run a blind evaluation between report_a.md and report_b.md and save the verdict to comparison.json
  • Judge outputs A and B with expectations loaded from checklist.json

How to install comparator

Manually: put the files in place

.claude/agents/comparator.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about comparator

How do I install comparator in Claude Code?

Place the subagent file at .claude/agents/comparator.md inside your workspace directory.

What does comparator do?

It provides blind evaluation between two alternative outputs created for the same prompt. It scores content and structure separately to select the winning artifact without bias.

Where does comparator store evaluation results?

It writes the output details to comparison.json or a designated custom file path in JSON format.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set26

The whole set →
get-to-know get-to-know is a Claude Code command that initializes project context by gathering stack, structure, and conventions, creating a project map, and configuring the environment. CX Codex +1 ★ 406repo stars adversarial-review adversarial-review subjects fresh builds to hostile inspection using isolated reviewer contexts and mandates empirical reproduction on the running system. CX Codex +1 ★ 406repo stars human-writing The human-writing skill guides an agent to shape prose around its language, voice, and format. Use it for articles, posts, headlines, and other writing tasks. CX Codex +1 ★ 406repo stars qa-manual-tester qa-manual-tester takes over a real browser and pokes at your app the way a tester would: clicks, typing, screenshots, console reads. Handy when a feature needs a hands-on pass. CX Codex ★ 406repo stars code-review code-review — a subagent for Claude Code that reviews a pull request through gh and posts a comment listing confirmed bugs. Skips closed, draft, or already-reviewed PRs without prompting. CX Codex ★ 406repo stars change-core-self change-core-self asks you about the project, works out a fitting identity for the agent from scratch, and stores it as a rule file loaded on every session. CX Codex +1 ★ 406repo stars grader grader assesses agent execution transcripts and generated files against expectations, flags superficial passes, and critiques test assertions. CX Codex ★ 406repo stars create-phase The create-phase command clarifies a development phase through Q&A, then creates an HTML wireframe with the decisions needed for implementation in Claude Code plan mode. CX Codex +1 ★ 406repo stars

Project sponsors

Companies that keep this analytics open