agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when measuring the quality of an LLM feature. Covers building an evaluation set, choosing metrics, LLM-as-judge and its pitfalls, regression testing prompts, and evaluating in production.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill llm-evaluation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/llm-evaluationContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when measuring the quality of an LLM feature. Covers building an evaluation set, choosing metrics, LLM-as-judge and its pitfalls, regression testing prompts, and evaluating in production.
name: llm-evaluation description: Use when measuring the quality of an LLM feature. Covers building an evaluation set, choosing metrics, LLM-as-judge and its pitfalls, regression testing prompts, and evaluating in production. metadata: category: ai version: 1.0.0 tags: [evaluation, eval, llm-judge, testing, metrics]
Know whether an LLM feature is getting better or worse. Without evaluation, every prompt change is a guess, and the confidence that a change helped is indistinguishable from the confidence that it did not.
1. **Build the set from real usage** — Fifty to two hundred real inputs, including the failures. An evaluation set of invented examples measures your imagination, not the system. 2. **Define correct precisely** — For extraction, the exact expected output. For open-ended generation, a rubric with concrete criteria. "A good summary" is not a criterion; "mentions all three decisions and no facts absent from the source" is. 3. **Choose the cheapest sufficient metric** — Exact match where possible. String or semantic similarity next. LLM-as-judge only where the output is genuinely open-ended. 4. **Validate the judge** — Have a human grade fifty cases. If the judge disagrees with the human more than about 15% of the time, the judge is not measuring what you think. 5. **Baseline, then change one thing** — Measure. Change one variable. Measure again on the same set. Anything else is not evidence. 6. **Gate in CI** — A prompt change that drops the score below the threshold fails the build, exactly like any other regression.
**A rubric-based judge, validated against humans:**
JUDGE_PROMPT = """\
You are grading a customer support summary against the original conversation.
Score each criterion independently, 0 or 1:
1. COMPLETE: Every action item in the conversation appears in the summary.
2. GROUNDED: Every statement in the summary is supported by the conversation.
A single invented fact scores 0.
3. RESOLUTION: The summary correctly states whether the issue was resolved.
4. CONCISE: The summary is under 100 words and contains no filler.
Conversation:
{conversation}
Summary:
{summary}
Respond with JSON only:
{{"complete": 0|1, "grounded": 0|1, "resolution": 0|1, "concise": 0|1, "notes": "<brief>"}}"""
# The judge must be validated before it is trusted.
def validate_judge(human_graded: list[Case]) -> float:
agreement = sum(
judge(c.conversation, c.summary) == c.human_score for c in human_graded
) / len(human_graded)
if agreement < 0.85:
raise ValueError(
f"Judge agrees with humans only {agreement:.0%} of the time. "
"It is measuring something else. Fix the rubric before using it."
)
return agreement**A regression gate that stops a bad prompt from shipping:**
def test_summarization_quality_has_not_regressed():
results = [evaluate(case) for case in load_eval_set("support-summaries-v3")]
grounded = mean(r.grounded for r in results)
complete = mean(r.complete for r in results)
# Hallucination is the failure that matters most: it is a hard floor.
assert grounded >= 0.98, f"Grounding regressed to {grounded:.2%} (floor: 98%)"
assert complete >= 0.90, f"Completeness regressed to {complete:.2%} (floor: 90%)"
# And the breakdown, because an average hides a category collapse.
by_category = group_by(results, key=lambda r: r.case.category)
for category, group in by_category.items():
score = mean(r.overall for r in group)
assert score >= 0.85, f"Category '{category}' regressed to {score:.2%}"A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…