Xpersona
L

Llm Judge

CLAWHUB · Unverified

Use when comparing two or more code implementations against a spec or requirements doc. Triggers on "which repo is better", "compare these implementations",... Skill: Llm Judge Owner: anderskev Summary: Use when comparing two or more code implementations against a spec or requirements doc. Triggers on "which repo is better", "compare these implementations",... Tags: latest:1.0.4 Version history: v1.0.4 | 2026-06-01T02:21:53.745Z | auto llm-judge 1.0.4 - Simplified and clarified workflow steps for both parallel and sequential operation; instructions now adapt based on agent

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17b1fzefm8nj8j1sdkzrze7gn83pfrg:llm-judge
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-llm-judge/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

122,983 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

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

_meta.json

{
  "ownerId": "kn79190nfmdb20hk6xjhzt2zv583844x",
  "slug": "llm-judge",
  "version": "1.0.4",
  "publishedAt": 1780280513745
}

references/fact-schema.md

# Fact Schema

JSON schema for structured facts gathered by Phase 1 Repo Agents.

## Full Schema

```json
{
  "repo_label": "string - Display name for this repo",
  "repo_path": "string - Absolute path to repo",
  "git_info": {
    "branch": "string - Current branch name",
    "base": "string - Base branch (usually main)",
    "files_changed": "number - Count of changed files",
    "additions": "number - Lines added",
    "deletions": "number - Lines deleted",
    "diff_summary": "string - Brief description of changes"
  },
  "functionality": {
    "spec_requirements": ["array of requirement strings extracted from spec"],
    "implemented": ["array of requirements found implemented"],
    "missing": ["array of requirements not found"],
    "partially_implemented": ["array of requirements with incomplete implementation"],
    "test_results": {
      "ran": "boolean - Whether tests were executed",
      "framework": "string - pytest, jest, go test, etc.",
      "passed": "number",
      "failed": "number",
      "skipped": "number",
      "error_summary": "string - Brief description of failures if any"
    }
  },
  "security": {
    "findings": [
      {
        "file": "string - File path",
        "line": "number - Line number",
        "issue": "string - Description of security issue",
        "severity": "high | medium | low",
        "category": "string - OWASP category if applicable"
      }
    ],
    "patterns_observed": ["array of positive security patterns found"]
  },
  "tests": {
    "test_count": "number - Total test count",
    "coverage_estimate": "none | low | moderate | high",
    "dry_violations": [
      {
        "file": "string",
        "line": "number",
        "description": "string"
      }
    ],
    "mocking_approach": "string - Description of mocking strategy",
    "test_quality_notes": "string - General observations"
  },
  "overengineering": {
    "abstractions": [
      {
        "file": "string",
        "line": "number",
        "issue": "string - Description of over-abstraction"
      }
    ],
    "defensive_code": [
      {
        "file": "string",
        "line": "number",
        "issue": "string"
      }
    ],
    "config_complexity": "low | medium | high"
  },
  "dead_code": {
    "unused_imports": ["array of file:line references"],
    "unused_functions": ["array of file:line references"],
    "unused_variables": ["array of file:line references"],
    "todo_comments": "number - Count of TODO/FIXME",
    "commented_code_blocks": "number - Count of commented code"
  }
}
```

## Example

```json
{
  "repo_label": "Claude",
  "repo_path": "/path/to/repo-a",
  "git_info": {
    "branch": "main",
    "base": "main",
    "files_changed": 42,
    "additions": 1250,
    "deletions": 380,
    "diff_summary": "Adds auth flow and data export features"
  },
  "functionality": {
    "spec_requirements": ["auth flow", "data export", "rate limiting"],
    "implemented": ["auth flow", "data export"],
    "missing": ["rate l

references/judge-agents.md

# Judge Agent Instructions

Instructions for Phase 2 agents that score implementations on a single dimension.

## Role

You are a scoring judge. You receive facts gathered from ALL repositories and score each one on YOUR specific dimension using the rubrics in [scoring-rubrics.md](scoring-rubrics.md).

## Inputs You Receive

1. **Spec Document**: The original requirements
2. **Facts Array**: JSON facts from all repos (output of Phase 1)
3. **Your Dimension**: One of: functionality, security, tests, overengineering, dead_code

## Your Task

Produce a JSON object with scores and justifications for each repo.

## Output Schema

```json
{
  "dimension": "functionality",
  "scores": {
    "RepoLabel1": {
      "score": 4,
      "justification": "Clear explanation of why this score was assigned",
      "evidence": ["Specific facts that support this score"]
    },
    "RepoLabel2": {
      "score": 5,
      "justification": "...",
      "evidence": ["..."]
    }
  },
  "ranking": ["RepoLabel2", "RepoLabel1"],
  "notes": "Optional comparative notes"
}
```

## Scoring Process

1. Read the rubric for your dimension from [scoring-rubrics.md](scoring-rubrics.md)
2. For each repo's facts:
   - Extract the relevant section (e.g., `facts.functionality` for functionality judge)
   - Apply the rubric criteria
   - Assign a 1-5 score
   - Write a clear justification citing specific evidence
3. Rank the repos by score (highest first)

## Dimension-Specific Instructions

### Functionality Judge

Focus on `facts.functionality`:
- Compare `spec_requirements` to `implemented` and `missing`
- Weight test results heavily (`test_results.passed` vs `failed`)
- Consider `partially_implemented` as half credit

### Security Judge

Focus on `facts.security`:
- Count and weight `findings` by severity
- High severity = major deduction
- Positive `patterns_observed` can offset minor issues

### Tests Judge

Focus on `facts.tests`:
- Evaluate `coverage_estimate`
- Count `dry_violations` (more = worse)
- Consider `mocking_approach` quality
- Raw `test_count` relative to codebase size

### Overengineering Judge

Focus on `facts.overengineering`:
- Count `abstractions` issues
- Count `defensive_code` issues
- Consider `config_complexity`
- FEWER issues = HIGHER score (inverse)

### Dead Code Judge

Focus on `facts.dead_code`:
- Sum all unused items
- Weight `unused_functions` > `unused_imports`
- Count `todo_comments` and `commented_code_blocks`
- FEWER issues = HIGHER score (inverse)

## Important Rules

1. **Use the rubric** - Don't invent criteria
2. **Be consistent** - Apply the same standards to all repos
3. **Cite evidence** - Every score needs justification from facts
4. **Be comparative** - Rankings should reflect relative quality
5. **Valid JSON only** - Output must be parseable

references/repo-agent.md

# Repo Agent Instructions

Instructions for Phase 1 agents that gather facts from a single repository.

## Role

You are a fact-gathering agent. Your job is to explore a repository and extract structured facts WITHOUT making judgments or assigning scores. Scoring happens in Phase 2 by separate judge agents.

## Inputs You Receive

1. **Spec Document**: The requirements/plan that was given to the LLM to implement
2. **Repo Path**: Absolute path to the repository you're analyzing
3. **Repo Label**: Display name for this repo (e.g., "Claude", "GPT-4")
4. **Branch Info**: Which branch to compare (default: current vs main)

## Your Task

Produce a JSON object following the schema in [fact-schema.md](fact-schema.md).

## Step-by-Step Process

### 1. Gather Git Info

```bash
# Get branch name
git -C $REPO_PATH rev-parse --abbrev-ref HEAD

# Get diff stats
git -C $REPO_PATH diff --stat main...HEAD

# Count files changed
git -C $REPO_PATH diff --name-only main...HEAD | wc -l
```

### 2. Analyze Functionality

1. Read the spec document carefully
2. Extract discrete requirements as a list
3. Explore the codebase to determine which requirements are implemented
4. Run tests if available:

```bash
# Detect and run tests
cd $REPO_PATH

# Python
if [ -f pytest.ini ] || [ -f pyproject.toml ] || [ -d tests ]; then
  pytest --tb=short 2>&1
fi

# JavaScript/TypeScript
if [ -f package.json ]; then
  npm test 2>&1 || yarn test 2>&1
fi

# Go
if [ -f go.mod ]; then
  go test ./... 2>&1
fi
```

### 3. Analyze Security

Look for common vulnerabilities:
- SQL injection (string concatenation in queries)
- Command injection (unsanitized shell commands)
- XSS (unsanitized user input in HTML)
- Hardcoded secrets (API keys, passwords)
- Missing input validation
- Insecure deserialization

Also note positive patterns:
- Input validation present
- Parameterized queries
- Authentication checks
- Rate limiting

### 4. Analyze Tests

- Count test files and test functions
- Look for DRY violations (repeated setup code)
- Assess mocking strategy
- Estimate coverage (file count ratio, critical paths tested)

### 5. Analyze Overengineering

Use patterns from the **llm-artifacts-detection** skill ([../../../../beagle-core/skills/llm-artifacts-detection/SKILL.md](../../../../beagle-core/skills/llm-artifacts-detection/SKILL.md)):
- Unnecessary abstractions (interfaces with single impl)
- Factory patterns for simple objects
- Excessive defensive coding
- Over-configuration

### 6. Analyze Dead Code

- Unused imports (grep for imports, check usage)
- TODO/FIXME comments
- Commented-out code blocks
- Unused functions/variables

## Output Format

Return ONLY the JSON object. No markdown, no explanations. The JSON must be valid and follow [fact-schema.md](fact-schema.md).

## Important Rules

1. **Do not score** - Only gather facts
2. **Be thorough** - Check all changed files
3. **Be specific** - Include file:line references
4. **Be objective** - Report what you find, not opinions
5. **Use the 

Sponsored

Ads related to Llm Judge and adjacent AI workflows.