agentleFS
robusta-devrobusta-dev/holmesgpt/.claude/skills/create-eval/SKILL.md

create-eval

Skill3.7k starsChanged 8 months agoApache-2.0View on GitHub

This skill should be used when the user asks to "create an eval", "write an eval test", "add a new eval", "create a test case", "write a test for Holmes", or discusses LLM evaluation tests, eval fixtures, or test_case.yaml files for the HolmesGPT project.

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 11 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check existing tests to find the next available number:

    line 30
  2. Very specific:

    Only use tags that exist in pyproject.toml markers section.

    line 40
  3. Distinctive:

    When the test requires specific toolsets (Prometheus, Grafana, Elasticsearch, etc.):

    line 70
  4. Very specific:

    When a toolsets.yaml exists, only explicitly enabled toolsets are available to the LLM.

    line 82
  5. Very specific:

    Always start with set -e to fail on any error

    line 88
  6. Very specific:

    Use kubectl create namespace app-NNN --dry-run=client -o yaml | kubectl apply -f - for idempotent namespace creation

    line 89
  7. Very specific:

    Use exit 1 when verification fails to fail the test early

    line 90
  8. Distinctive:

    Every eval must be designed so the LLM cannot pass by guessing.

    line 108
  9. Distinctive:

    Test for specific values discoverable only by querying

    line 112
  10. Distinctive:

    Use neutral resource names that don't hint at the problem

    line 113
  11. Distinctive:

    Write prompts that test discovery ability, not domain knowledge

    line 114
  12. Distinctive:

    Always run evals before submitting when possible: Follow this sequence:

    line 120
  13. Distinctive:

    Verify setup completes without errors.

    line 136
  14. Very specific:

    Use --skip-setup to reuse the infrastructure from Phase 2.

    line 144
  15. Very specific:

    Should return NotFound after the test completes (unless --skip-cleanup was used).

    line 152
  16. Very specific:

    Namespace isolation: Every test uses app-<testid> namespace

    line 156
  17. Distinctive:

    Unique resource names: Never reuse pod/service names across tests

    line 157
  18. Very specific:

    No :latest tags: Always use specific container image versions

    line 158
  19. Distinctive:

    Secrets for scripts: Use Kubernetes Secrets for scripts, not ConfigMaps or inline

    line 159
  20. Very specific:

    No hints in names: Avoid broken-pod, crashloop-app — use neutral names

    line 160
  21. Distinctive:

    Sign commits: Always use git commit -s for DCO compliance

    line 161

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Creating HolmesGPT Eval Tests

This skill provides the complete workflow for creating LLM evaluation tests in the HolmesGPT project. Eval tests validate that Holmes can correctly answer questions by querying real infrastructure and services.

Test Structure

Each eval lives in its own directory under tests/llm/fixtures/test_ask_holmes/:

tests/llm/fixtures/test_ask_holmes/<NNN>_<descriptive_name>/
├── test_case.yaml          # Required: test definition
├── toolsets.yaml            # Optional: enable specific toolsets
├── manifest.yaml            # Optional: Kubernetes manifests
├── generate_*.py            # Optional: data generation scripts
└── other supporting files

Naming convention: <3-digit-number>_<snake_case_description> (e.g., 212_large_configmap_needle).

Creation Workflow

Step 1: Choose Test Number and Namespace

Check existing tests to find the next available number:

ls tests/llm/fixtures/test_ask_holmes/ | sort -n | tail -5

The namespace must be app-<testid> (e.g., app-212). All pod and resource names must be unique across all tests.

Step 2: Validate Tags

Only use tags that exist in pyproject.toml markers section. Using invalid tags causes test collection failures. Read pyproject.toml and check the [tool.pytest.ini_options] markers list before assigning tags. Ask the user before adding any new tag.

Step 3: Write test_case.yaml

Core fields:

user_prompt: "Specific question for Holmes to answer"

expected_output:
  - "Criterion 1: Must report exact value X"
  - "Criterion 2: Must include specific identifier Y"

tags:
  - kubernetes
  - question-answer
  - hard

before_test: |
  set -e
  # Setup infrastructure...

after_test: |
  kubectl delete namespace app-NNN --ignore-not-found

For the complete field reference and all available options, consult references/test-case-format.md.

Step 4: Write toolsets.yaml (if needed)

When the test requires specific toolsets (Prometheus, Grafana, Elasticsearch, etc.):

toolsets:
  kubernetes/core:
    enabled: true
  prometheus/metrics:
    enabled: true
    config:
      prometheus_url: http://localhost:10033

When a toolsets.yaml exists, only explicitly enabled toolsets are available to the LLM. All others are disabled.

Step 5: Write Setup Scripts

The before_test script runs from the test's directory via /bin/bash. Key rules:

  • Always start with set -e to fail on any error
  • Use kubectl create namespace app-NNN --dry-run=client -o yaml | kubectl apply -f - for idempotent namespace creation
  • Use exit 1 when verification fails to fail the test early
  • Clean up temp files at the end of before_test

Verification focus: verify the needle, not the haystack. The only verification that matters is that Holmes can discover the answer. Run the same kind of query Holmes would run and check that the expected value (the "smoking gun") is present. Do NOT exhaustively verify every piece of infrastructure — if the needle is queryable, the environment is working. Keep setup scripts short and readable.

# GOOD - verify the needle is discoverable (one targeted check)
kubectl get configmap platform-config -n app-212 \
  -o jsonpath='{.data.platform-config\.yaml}' | grep -q '7k3m9x'

# BAD - verifying everything (pod health, service endpoints, API responses, readiness...)
# This bloats the script without adding value

For retry loop patterns and other infrastructure details, consult references/infrastructure-patterns.md.

Step 6: Design Anti-Hallucination Measures

Every eval must be designed so the LLM cannot pass by guessing. This is the most critical aspect of eval design.

Key principles:

  • Embed unique random identifiers that cannot be guessed (e.g., 7k3m9x)
  • Test for specific values discoverable only by querying
  • Use neutral resource names that don't hint at the problem
  • Write prompts that test discovery ability, not domain knowledge

For detailed anti-hallucination patterns and examples, consult references/anti-hallucination.md.

Mandatory Testing Workflow

Always run evals before submitting when possible. Follow this sequence:

Phase 1: Verify Collection

poetry run pytest -k "test_name" --collect-only -q --no-cov

Confirm the test appears in the output. If not, check for tag or YAML errors.

Phase 2: Run Setup Only

poetry run pytest -k "test_name" --only-setup --no-cov

Verify setup completes without errors. Check that infrastructure is ready.

Phase 3: Run Full Test

poetry run pytest -k "test_name" --no-cov --skip-setup

Use --skip-setup to reuse the infrastructure from Phase 2. Verify the test passes.

Phase 4: Verify Cleanup

kubectl get namespace app-NNN

Should return NotFound after the test completes (unless --skip-cleanup was used).

Key Rules

  1. Namespace isolation: Every test uses app-<testid> namespace
  2. Unique resource names: Never reuse pod/service names across tests
  3. No :latest tags: Always use specific container image versions
  4. Secrets for scripts: Use Kubernetes Secrets for scripts, not ConfigMaps or inline
  5. No hints in names: Avoid broken-pod, crashloop-app — use neutral names
  6. Sign commits: Always use git commit -s for DCO compliance

Quick Reference: Common Patterns

PatternExample
Simple K8s testDeploy pod, ask about status
Log analysisGenerate logs via script, ask Holmes to analyze
Metrics queryDeploy Prometheus + exporters, query metrics
Large data needleCreate large ConfigMap/resource, find specific value
Cloud serviceTest against Elasticsearch/external API via env vars

Additional Resources

Reference Files

For detailed documentation, consult:

  • references/test-case-format.md — Complete test_case.yaml field reference with all options
  • references/anti-hallucination.md — Anti-cheat testing patterns and prompt design
  • references/infrastructure-patterns.md — Setup scripts, retry loops, port forwards, shared infra
  • references/running-evals.md — CLI flags, environment variables, model comparison, debugging

Download now (ZIP)

Trending

Steady talk.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 3 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the robusta-dev/holmesgpt repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about robusta-dev/holmesgpt

The biggest 5 of 55 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 55

Talked about on GitHub, Hacker News and Bluesky (55 times).

On GitHub · 50

45 more on GitHub
  • Other versions3 projects use a version of this.

    Word for word · 1

    1. HolmesGPT/holmesgpt★ 3.7k100% same

    Edited · 0

    None found.

    Wrote their own version · 2

    1. UKGovernmentBEIS/inspect_evals★ 731same name
    2. microsoft/skills-for-copilot-studio★ 486same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.