К основному содержанию
скилл CX Codex

llm-judge — скилл для Claude Code: сравнение кода по спецификации

Скилл llm-judge сравнивает две и более реализации одной задачи по файлу спецификации: собирает факты, ставит оценки по пяти измерениям и выдаёт отчёт с победителем.

Apache-2.0 141 установок ★ 89 обновлён 2026-09-15

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add existential-birds/beagle --skill llm-judge -a claude-code
Открыть на GitHub

Что делает llm-judge

Скилл берёт путь к файлу спецификации и два и более путей к репозиториям. Вызов выглядит как /llm-judge <spec> <repo1> <repo2>. Метки репозиториев по умолчанию берутся из имён каталогов, их можно переопределить через --labels, веса через --weights, ветку для сравнения через --branch.

Работа идёт в две фазы с проверками между ними. Сначала по каждому репозиторию собираются факты, без оценок. Потом пять судейских проходов, по одному на измерение: functionality, security, tests, overengineering, dead_code. Веса по умолчанию — 30, 25, 20, 15 и 10. Итог складывается в .beagle/llm-judge-report.json, файл проверяется через python3 -c и json.load, и только после этого показывается сводка.

Каждый путь должен быть git-репозиторием, в каталоге обязан лежать .git. Если его нет, проверка входов останавливает работу до всякого анализа. Это инструмент для сравнения конкурирующих реализаций, а не для ревью одной кодовой базы.

Какие задачи решает

  • выбрать между двумя PR, решающими одну задачу
  • сравнить ответы вендоров на один запрос по спецификации
  • посчитать взвешенный балл по функциональности, безопасности и тестам
  • получить JSON с обоснованием каждой оценки
  • найти переусложнение и мёртвый код в чужой кодовой базе

Примеры запросов агенту

  • /llm-judge docs/spec.md ./vendor-a ./vendor-b — сравни обе реализации по спецификации и скажи, кто выиграл.
  • /llm-judge spec.md ./ours ./theirs --labels=ours,theirs --weights=functionality:50,security:30,tests:20
  • /llm-judge requirements.md ./pr-120 ./pr-131 --branch=develop — сравни ветки develop двух репозиториев.

Как установить llm-judge

1Через Skills CLI (Vercel)

npx skills add existential-birds/beagle --skill llm-judge -a claude-code

2Вручную: положить файлы

~/.claude/skills/llm-judge/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/llm-judge/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о llm-judge

Как установить llm-judge в Claude Code?

Выполни npx skills add existential-birds/beagle --skill llm-judge -a claude-code, скилл появится по пути ~/.claude/skills/llm-judge/SKILL.md.

Что делает llm-judge?

Собирает факты по каждой реализации, оценивает их по пяти измерениям с учётом весов и выдаёт отчёт с ранжированием и вердиктом.

Что нужно, чтобы скилл сработал?

Файл спецификации и минимум два пути к репозиториям. В каждом каталоге должен быть .git, иначе валидация входов прерывает работу.

Исходный текст

SKILL.md · Apache-2.0
---
name: llm-judge
description: "Use when comparing two or more code implementations against a spec or requirements doc. Triggers on \"which repo is better\", \"compare these implementations\", \"evaluate both solutions\", \"rank these codebases\", or \"judge which approach wins\". Also covers choosing between competing PRs or vendor submissions solving the same problem. Does NOT review a single codebase for quality \u2014 use code review skills instead. Does NOT evaluate strategy docs \u2014 use strategy-review. Requires a spec file and 2+ repo paths."
disable-model-invocation: true
---

# LLM Judge

Compare code implementations across multiple repositories using structured evaluation.

## Usage

```text
llm-judge <spec> <repo1> <repo2> [repo3...] [--labels=...] [--weights=...] [--branch=...]
```

## Arguments

| Argument | Required | Description |
|----------|----------|-------------|
| `spec` | Yes | Path to spec/requirements document |
| `repos` | Yes | 2+ paths to repositories to compare |
| `--labels` | No | Comma-separated labels (default: directory names) |
| `--weights` | No | Override weights, e.g. `functionality:40,security:30` |
| `--branch` | No | Branch to compare against main (default: `main`) |

## Workflow

1. Parse `$ARGUMENTS` into `spec_path`, `repo_paths`, `labels`, `weights`, and `branch`.
2. Validate the spec file, each repo path, and the minimum repo count.
3. Read the spec document into memory.
4. Load this skill and the supporting reference files.
5. Gather facts per repository (one Phase 1 unit per repo) — facts only, no scoring.
6. Validate the repo-agent JSON results before proceeding.
7. Score each dimension (one Phase 2 unit per dimension).
8. Aggregate scores, compute weighted totals, rank repos, and write the report.
9. Display the markdown summary and verify the JSON report.

## Hard gates

Sequenced workflow: **do not start the next phase until the current gate passes.** Each pass condition must be checkable (file on disk, non-empty content, or `json.load` succeeds)—not “I reviewed internally.”

| Gate | Pass condition | Unblocks |
|------|----------------|----------|
| **A — Inputs** | `spec_path` is a readable file and non-empty; `len(repo_paths) ≥ 2`; each path contains `.git`. | Phase 1 repo agents |
| **B — Phase 1 facts** | For **each** repo agent output: stdin/stdout parses as JSON; required keys/shape match `references/fact-schema.md`. | Phase 2 judge agents |
| **C — Phase 2 scores** | **Five** judge outputs (one per dimension) each parse as JSON; each includes a score (and justification) for **every** repo label. | Aggregation |
| **D — Report file** | `.beagle/llm-judge-report.json` exists; `python3 -c "import json; json.load(open('.beagle/llm-judge-report.json'))"` exits 0. | Markdown summary to the user |
| **E — Consistency** | Summary table and verdict use the same labels, weights, and per-dimension scores as the JSON report. | Mark task complete |

Parallelism is allowed **within** a phase (all Phase 1 tasks together; all Phase 2 tasks together), but Phase 2 must not start until Gate B passes, and the user-visible summary must not precede Gate D.

## Command Workflow

### Step 1: Parse Arguments

Parse `$ARGUMENTS` to extract:
- `spec_path`: first positional argument
- `repo_paths`: remaining positional arguments (must be 2+)
- `labels`: from `--labels` or derived from directory names
- `weights`: from `--weights` or defaults
- `branch`: from `--branch` or `main`

**Default Weights:**

```json
{
  "functionality": 30,
  "security": 25,
  "tests": 20,
  "overengineering": 15,
  "dead_code": 10
}
```

### Step 2: Validate Inputs

```bash
[ -f "$SPEC_PATH" ] || { echo "Error: Spec file not found: $SPEC_PATH"; exit 1; }

for repo in "${REPO_PATHS[@]}"; do
  [ -d "$repo/.git" ] || { echo "Error: Not a git repository: $repo"; exit 1; }
done

[ ${#REPO_PATHS[@]} -ge 2 ] || { echo "Error: Need at least 2 repositories to compare"; exit 1; }
```

### Step 3: Read Spec Document

```bash
SPEC_CONTENT=$(cat "$SPEC_PATH") || { echo "Error: Failed to read spec file: $SPEC_PATH"; exit 1; }
[ -z "$SPEC_CONTENT" ] && { echo "Error: Spec file is empty: $SPEC_PATH"; exit 1; }
```

### Step 4: Load the Skill

Load this **llm-judge** skill and its reference files into context.

### Step 5: Phase 1 - Gather Facts Per Repo

**If the agent supports subagents**, dispatch one Phase 1 repo agent per repository in parallel; **otherwise** run the same fact-gathering steps sequentially, one repo at a time — the output is identical either way. Give each unit this brief:

```text
You are a Phase 1 Repo Agent for the LLM Judge evaluation.

**Your Repo:** $LABEL at $REPO_PATH

**Spec Document:**
$SPEC_CONTENT

**Instructions:**
1. Load the **llm-judge** skill's references/repo-agent.md for detailed instructions
2. Follow references/fact-schema.md for the output format
3. Load the **llm-artifacts-detection** skill ([../../../beagle-core/skills/llm-artifacts-detection/SKILL.md](../../../beagle-core/skills/llm-artifacts-detection/SKILL.md), if available) for dead-code/overengineering analysis

Explore the repository and gather facts. Return ONLY valid JSON following the fact schema.

Do NOT score or judge. Only gather facts.
```

Collect all repo outputs into `ALL_FACTS`.

### Step 6: Validate Phase 1 Results

```bash
echo "$FACTS" | python3 -c "import json,sys; json.load(sys.stdin)" 2>/dev/null || { echo "Error: Invalid JSON from $LABEL"; exit 1; }
```

### Step 7: Phase 2 - Score Per Dimension

**If the agent supports subagents**, dispatch one judge agent per dimension (five total) in parallel; **otherwise** score each dimension sequentially — identical output. Give each unit this brief:

```text
You are the $DIMENSION Judge for the LLM Judge evaluation.

**Spec Document:**
$SPEC_CONTENT

**Facts from all repos:**
$ALL_FACTS_JSON

**Instructions:**
1. Load the **llm-judge** skill's references/judge-agents.md for detailed instructions
2. Follow references/scoring-rubrics.md for the $DIMENSION rubric

Score each repo on $DIMENSION. Return ONLY valid JSON with scores and justifications.
```

### Step 8: Aggregate Scores

```python
for repo_label in labels:
    scores[repo_label] = {}
    for dimension in dimensions:
        scores[repo_label][dimension] = judge_outputs[dimension]['scores'][repo_label]

    weighted_total = sum(
        scores[repo_label][dim]['score'] * weights[dim] / 100
        for dim in dimensions
    )
    scores[repo_label]['weighted_total'] = round(weighted_total, 2)

ranking = sorted(labels, key=lambda l: scores[l]['weighted_total'], reverse=True)
```

### Step 9: Generate Verdict

Name the winner, explain why they won, and note any close calls or trade-offs.

### Step 10: Write JSON Report

```bash
mkdir -p .beagle
```

Write `.beagle/llm-judge-report.json` with version, timestamp, repo metadata, weights, scores, ranking, and verdict.

### Step 11: Display Summary

Render a markdown summary with the scores table, ranking, verdict, and detailed justifications.

### Step 12: Verification

```bash
python3 -c "import json; json.load(open('.beagle/llm-judge-report.json'))" && echo "Valid report"
```

### Output Shape

The generated report should include:

- repo labels and paths
- per-dimension scores and justifications
- weighted totals and ranking
- a verdict explaining the winner

## Reference Files

| File | Purpose |
|------|---------|
| [references/fact-schema.md](references/fact-schema.md) | JSON schema for Phase 1 facts |
| [references/scoring-rubrics.md](references/scoring-rubrics.md) | Detailed rubrics for each dimension |
| [references/repo-agent.md](references/repo-agent.md) | Instructions for Phase 1 agents |
| [references/judge-agents.md](references/judge-agents.md) | Instructions for Phase 2 judges |

## Scoring Model

| Dimension | Default Weight | Evaluates |
|-----------|----------------|-----------|
| Functionality | 30% | Spec compliance, test pass rate |
| Security | 25% | Vulnerabilities, security patterns |
| Test Quality | 20% | Coverage, DRY, mock boundaries |
| Overengineering | 15% | Unnecessary complexity |
| Dead Code | 10% | Unused code, TODOs |

## Scoring Scale

| Score | Meaning |
|-------|---------|
| 5 | Excellent - Exceeds expectations |
| 4 | Good - Meets requirements, minor issues |
| 3 | Average - Functional but notable gaps |
| 2 | Below Average - Significant issues |
| 1 | Poor - Fails basic requirements |

## Phase 1: Gathering Facts Per Repo

For each repository (in parallel via subagents if supported, otherwise sequentially), run a fact-gathering unit with:

```text
You are a Phase 1 Repo Agent for the LLM Judge evaluation.

**Your Repo:** $REPO_LABEL at $REPO_PATH
**Spec Document:**
$SPEC_CONTENT

**Instructions:** Follow the **llm-judge** skill's references/repo-agent.md

Gather facts and return a JSON object following the schema in references/fact-schema.md.

Load the **llm-artifacts-detection** skill ([../../../beagle-core/skills/llm-artifacts-detection/SKILL.md](../../../beagle-core/skills/llm-artifacts-detection/SKILL.md), if available) for dead code and overengineering analysis.

Return ONLY valid JSON, no markdown or explanations.
```

Collect all repo-agent outputs into `ALL_FACTS`.

## Phase 2: Scoring Per Dimension

After all Phase 1 facts are collected, score the five dimensions (in parallel via subagents if supported, otherwise sequentially), one unit per dimension:

```text
You are the $DIMENSION Judge for the LLM Judge evaluation.

**Spec Document:**
$SPEC_CONTENT

**Facts from all repos:**
$ALL_FACTS_JSON

**Instructions:** Follow the **llm-judge** skill's references/judge-agents.md

Score each repo on $DIMENSION using the rubric in references/scoring-rubrics.md.

Return ONLY valid JSON following the judge output schema.
```

## Aggregation

1. Collect the five judge outputs.
2. Compute each repo's weighted total with the configured weights.
3. Rank repos by weighted total in descending order.
4. Generate a verdict that explains the result and any close calls.
5. Write `.beagle/llm-judge-report.json`.

## Output

Display a markdown summary with scores, ranking, verdict, and detailed justifications.

## Verification

Before completing (maps to **Hard gates** D and E):

1. **Gate D:** `.beagle/llm-judge-report.json` exists and `json.load` succeeds.
2. **Gate E / completeness:** Every repo label has scores for every dimension; each `weighted_total` equals the sum over dimensions of `(score × weight / 100)` using the configured weights; markdown summary matches the JSON report.

## Rules

- Always validate inputs before proceeding
- Complete all Phase 1 fact-gathering before any Phase 2 scoring (parallel within a phase if subagents are supported, otherwise sequential)
- Run one Phase 2 unit per dimension
- Every score must have a justification
- Write the JSON report before displaying the summary

© existential-birds · Apache-2.0 · existential-birds/beagle

Похожие скиллы

Все скиллы по теме «Код-ревью и рефакторинг» →
judge-with-debate NeoLabHQ Скилл judge-with-debate для Claude Code запускает трёх независимых судей, которые спорят об оценке решения, пока не сойдутся в выводах. Оценивает код и документы без одиночного мнения. CX Codex +1 1 400установок eval-judge Seth Hobson Субагент eval-judge оценивает скиллы плагинов по четырём критериям качества и возвращает структурированный JSON с баллами от 0.0 до 1.0. CX Codex ★ 42 780звёзд репо om-judge-agent-session open-mercato Скилл om-judge-agent-session для Claude Code проверяет сессии кодинг-агента и результаты eval-harness по доказательствам и правилам репозитория. Выносит вердикт pass, fail или inconclusive. CX Codex +1 954установок skill-judge softaworks Плагин skill-judge для Claude Code проверяет скиллы по официальным стандартам и лучшим практикам. Запускается при рецензировании SKILL.md файлов и пакетов скиллов, чтобы найти несоответствия в структуре и оформлении. ★ 2 707звёзд репо mcp-as-a-judge OtherVibes MCP-сервер mcp-as-a-judge ставит между ассистентом и моделью проверяющий слой: план, дифф и тесты проходят оценку, прежде чем задача закроется. CX Codex +1 ★ 17звёзд репо the-judge Felipe Rodrigues - github.com/felipfr Скилл the-judge проводит ревью пуллреквестов в GitHub через gh CLI с обязательными доказательствами для каждого замечания и публикует единый вердикт. CX Codex +1 ★ 7 191звёзд репо

Из того же набора68

Весь набор →
go-testing-code-review Скилл go-testing-code-review ревьюит тесты Go: табличные кейсы, сообщения об ошибках, параллельность и покрытие. Замечания отдаёт с файлом, строкой и важностью. CX Codex +1 148установок pydantic-ai-testing Скилл pydantic-ai-testing помогает писать тесты для агентов PydanticAI: подменять ответы модели, проверять вызовы инструментов и воспроизводить записанные API-запросы. CX Codex +1 146установок adr-decision-extraction Скилл adr-decision-extraction извлекает архитектурные решения из чатов и расшифровок, чтобы подготовить материал для ADR. Он распознаёт выбор технологий, компромиссы и явные метки. CX Codex +1 144установок deepagents-implementation Скилл deepagents-implementation для Claude Code даёт рецепты сборки агентов на Deep Agents: фабрика create_deep_agent, файловые бэкенды, субагенты и стриминг LangGraph. CX Codex +1 142установок pydantic-ai-dependency-injection Скилл pydantic-ai-dependency-injection показывает, как передавать базы данных, API-клиенты и контекст пользователя в PydanticAI через RunContext и deps_type. CX Codex +1 141установок watchos-code-review Скилл watchos-code-review для Claude Code проверяет watchOS-код на ошибки жизненного цикла, осложнений, WatchConnectivity и ограничения производительности. CX Codex +1 137установок swiftdata-code-review Скилл swiftdata-code-review проверяет код SwiftData на ошибки в моделях, предикатах, миграциях и конкурентности. Запускается при ревью файлов со связками @Model и @Query. CX Codex +1 136установок howto-docs Скилл howto-docs помогает писать пошаговые how-to-гайды под конкретную задачу: с предусловиями, шагами, проверкой результата и разбором типичных проблем. CX Codex +1 135установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой