Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Llm Evals

ASecurity

Build evaluation suites for LLM applications: golden datasets, metrics, LLM-as-judge, regression gates, and CI integration. Use for trustworthy model behavior.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentspythonrustgobashtesting

Works with

cli

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned 9/29/2026

$npx -y skills add ssrjkk/claude-skills --skill llm-evals --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Llm Evals?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Llm Evals
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ssrjkk-llm-evals/badge)](https://www.skillsdirectory.com/skills/ssrjkk-llm-evals)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: llm-evals
description: "Build evaluation suites for LLM applications: golden datasets, metrics, LLM-as-judge, regression gates, and CI integration. Use for trustworthy model behavior."
category: ai
tags: [llm-evals, evaluation, metrics, judge, testing, llm, regression]
models: [sonnet, opus, gpt-5, gemini-2.5, glm-4.6]
version: 1.0.0
created: 2026-09-25
updated: 2026-09-28
author: ssrjkk
---
# LLM Evals

> Measuring and guarding LLM application quality with evaluation suites.

## Quick Start
```bash
pip install pytest openai
# collect a golden set, score answers, gate releases in CI
```

## When to Use
- Tracking prompt and model quality over time
- Comparing prompt variants and model versions
- Catching regressions before release
- Building confidence in production agents and RAG

## Best Practices

### Golden Datasets
- Cover happy paths, edge cases, and adversarial inputs
- Use real user queries plus synthetic variations
- Include expected answers or rubrics per case
- Keep the set small (20-100) and maintainable

### Metrics
- Use exact-match for structured outputs (JSON, codes)
- Use similarity for free text (semantic or lexical)
- Prefer LLM-as-judge with a rubric for subjective quality
- Track per-metric scores and aggregate over the set

### LLM-as-Judge
- Give the judge an explicit scoring rubric
- Provide reference answers where possible
- Use a different model than the one evaluated
- Calibrate: spot-check judge vs human labels

### CI Gating
- Run evals on every PR for changed prompts/models
- Set pass thresholds; fail on regressions
- Keep flaky checks out of the blocking path
- Report diffs against the baseline

## Dependencies
```bash
pip install pytest openai numpy
# optional: ragas, promptfoo, deepeval
```

## Examples
```python
import json
import openai

client = openai.OpenAI()

def run_case(prompt: str, user_input: str) -> str:
    resp = client.chat.completions.create(
        model="gpt-5",
        messages=[
            {"role": "system", "content": prompt},
            {"role": "user", "content": user_input},
        ],
    )
    return resp.choices[0].message.content
```
```python
# Golden set with expected structured output
GOLDEN = [
    {
        "input": "Alice works at Acme.",
        "expected": {"name": "Alice", "org": "Acme"},
    },
    {
        "input": "No company mentioned here.",
        "expected": {"name": None, "org": None},
    },
]

def exact_match(out: str, expected: dict) -> bool:
    try:
        return json.loads(out) == expected
    except json.JSONDecodeError:
        return False
```
```python
# LLM-as-judge with rubric
JUDGE_PROMPT = """Rate the answer 1-5 using this rubric:
5 = correct, complete, well-grounded. 1 = wrong or off-topic.
Return only the number."""

def judge(answer: str) -> int:
    resp = client.chat.completions.create(
        model="gpt-5",
        messages=[
            {"role": "system", "content": JUDGE_PROMPT},
            {"role": "user", "content": answer},
        ],
    )
    return int(resp.choices[0].message.content)
```
```python
# Regression gate
def run_suite() -> float:
    scores = []
    for case in GOLDEN:
        out = run_case(PROMPT, case["input"])
        scores.append(1.0 if exact_match(out, case["expected"]) else 0.0)
    return sum(scores) / len(scores)

def test_no_regression():
    assert run_suite() >= 0.9, "Eval score dropped below threshold"
```

## Step-by-Step
1. Define what "good" means: correct format, factuality, helpfulness.
2. Build a golden dataset with rubrics or expected answers.
3. Choose metrics: exact-match, similarity, or LLM-as-judge.
4. Implement the scoring harness and aggregate results.
5. Establish a baseline score on the current prompt/model.
6. Add a regression gate in CI with a threshold.
7. Review judge quality against human labels.
8. Extend the set as you find failure modes in production.

## Validation
1. Evals run deterministically on the same inputs
2. Threshold gate blocks clear regressions
3. Judge scores correlate with human judgment
4. Golden set covers the main failure modes
5. Run time is practical for every PR

## Troubleshooting
- Judge drift: recalibrate rubric and spot-check labels.
- Flaky scores: fix nondeterminism (temperature, model, seed).
- Too many cases: prioritize high-signal inputs and trim duplicates.

Attribution

ssrjkkssrjkk
View sourceSee grades on GitHubMore from ssrjkk →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →