hyderhusainarastu

LLM Routing And Judge Eval Harness Pattern — AI skill for Claude Code

AI community

Pattern guide for provider-agnostic LLM routing with deterministic offline fallback, plus a runnable LLM-as-judge evaluation harness: gold sets, scoring, agreement metrics and promotion gates for deci.

How to install LLM Routing And Judge Eval Harness Pattern

This entry records only its repository, not the path inside it, so there is no exact command to give. Open hyderhusainarastu/llm-routing-and-judge-eval-harness-pattern and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What LLM Routing And Judge Eval Harness Pattern does

Pattern guide for provider-agnostic LLM routing with deterministic offline fallback, plus a runnable LLM-as-judge evaluation harness: gold sets, scoring, agreement metrics and promotion gates for deciding whether a prompt or model change is an improvement.

Alternatives in AI

  • Ccstatusline — by sirmalloc - A highly customizable status line formatter for Claude Code CLI that displays model info, git b 5.5k ★
  • UltraCode Shim — Give Claude Code's ultracode mode to ANY model you already pay for 422 ★
  • Buyer Eval Skill — B2B software vendor evaluation skill for Claude Code — domain-expert questions, vendor AI agent conversations 67 ★

README

LLM Routing and Judge-Eval Harness Pattern

A methodology, not a library: how to wire LLM calls into a product so the product still works with zero API keys configured, can swap or add providers without touching business logic, and has a repeatable, evidence-gated way to decide whether a prompt/model/output-mode change is actually an improvement before it ships.

What it does

This package documents two patterns that pair well together for any app that calls LLMs for classification and judgment tasks:

  1. **Provider-agnostic routing with a deterministic fallback.** Business logic depends on one small `LLMProvider` interface, never a vendor SDK. A routing table picks the cheapest viable model per task, in a preferred → alternate provider order based on which API key is actually configured. When no key is configured at all, a small deterministic, offline heuristic stands in — same output shape, honestly flagged as a stub, fully unit-testable without a network.

  2. **An LLM-as-judge evaluation harness.** A hand-labeled gold set, a validating parser, a deterministic train/test split, standard classification metrics (confusion matrix, per-class P/R/F1, macro-F1, Cohen's kappa, a named critical-class recall), a cost ledger with an enforced budget ceiling, and named promotion gates that a prompt/model/output-mode change must clear before shipping — including a stricter four-part gate for deciding whether a domain-specific prompt addition earns its complexity, and a "separation" honesty-guard check for any numeric threshold used to gate what reaches an LLM at all.

Read `SKILL.md` for the full, self-contained playbook — it's written so an agent (or a person) with no other context can execute the whole methodology end to end. `references/` holds fuller worked pseudocode for each half of the pattern, and `examples/` holds a small synthetic gold set and a synthetic example of the write-up the harness produces.

Works with

| Su