evals-write-spec
Skill by elastic
Guides developers in writing LLM evaluation spec files for Kibana with the @kbn/evals Playwright fixture. It covers datasets, tasks, evaluators, tags, concurrency and local runs. Aimed at engineers adding or debugging evals.
Install evals-write-spec
Built from the published package, never by AI.
git clone --depth 1 https://github.com/elastic/kibana /tmp/kibana && mkdir -p ~/.claude/skills && cp -r /tmp/kibana/.agents/skills/evals-write-spec ~/.claude/skills/evals-write-specRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/elastic/kibana /tmp/kibana && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/kibana/.agents/skills/evals-write-spec ~/.gemini/antigravity-cli/skills/evals-write-specAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to write LLM evaluation spec files using the evaluate Playwright fixture from @kbn/evals. It describes the spec file structure, required suite tags, and how to define datasets of examples with input, expected output and metadata. It also covers tasks that produce the output being scored.
The skill lists the evaluator types available: inline CODE evaluators, LLM-as-judge criteria, correctness and groundedness analysis, trace-based evaluators, and IR evaluators. It documents the fixtures a spec can use, how to set concurrency, a reusable evaluateDataset helper pattern, setup and teardown, and commands for running evals locally. It is aimed at developers working on evaluation suites.
Written from the project's SKILL.md and checked against it.
What it can do
- Spec file structureShows how to write an evaluate.describe suite with beforeAll, afterAll and runExperiment calls.
- DatasetsDefines typed examples with input, expected output and optional metadata for an eval.
- TasksDescribes a task function that calls a Kibana API and returns output to be scored.
- CODE evaluatorsCovers deterministic binary checks that do not call an LLM.
- LLM-as-judge criteriaCovers judge LLM scoring of subjective quality checks against a list of criteria.
- Correctness and groundednessCovers evaluators that compare output to an expected answer or to provided context.
- Trace-based evaluatorsCovers token usage, tool call count and span latency evaluators that read from the tracing cluster.
- IR evaluatorsCovers information retrieval metrics such as Precision@K, Recall@K, NDCG@K and MRR@K.
- Concurrency controlExplains how to set a suite limit while letting the --concurrency flag lower or raise it.
- Local runsLists commands to start evals, filter with --grep, and run against existing services.
What you need
- A Kibana repository with the @kbn/evals package
- A model connector to evaluate
- A judge connector for LLM-based evaluators
- EDOT running for trace-based evaluators
Try asking
- Write an eval spec for my observability suite with a small dataset
- Add a groundedness evaluator to my existing search eval spec
- Help me debug a failing evaluate test using --grep
Good to know
- Trace-based evaluators read from the tracing ES cluster and need EDOT running.
- Spec files must use the evaluate fixture, not the Playwright test fixture.
- Every evaluate.describe block must have a tag, and Scout validates tags at runtime.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/evals-write-spec/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to evals-write-spec
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
evals-write-spec: common questions
What is the evaluate fixture used for in these specs?
The evaluate Playwright fixture provides the evals-specific wiring for writing eval specs. The source says to use it instead of test.
Which evaluators can I use with runExperiment?
The source lists CODE evaluators, LLM-as-judge criteria, correctness analysis, groundedness analysis, trace-based evaluators and IR evaluators. Evaluators can be passed as an inline array or through selectEvaluators.
How do I run only one eval during local iteration?
Use the --grep flag with node scripts/evals start, for example with the name of the test. This runs a subset of the suite instead of the full dataset.
How do I install evals-write-spec?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is evals-write-spec free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is evals-write-spec safe to use?
It scores 80 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to evals-write-spec?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
