promptfoo-evals

promptfoo-evals is a skill for Claude Code, Codex from JustineDevs/premortem. It costs 71 tokens per session (1,836 once invoked), scanned A, a copy of promptfoo-evals, Apache-2.0.

A guide to writing and running promptfoo evaluation suites for AI prompts, agents, endpoints, and retrieval systems. An evaluation suite is a repeatable set of checks for whether an AI system gives acceptable results.

In plain words
What is it for?
Use it to define test cases, assertions, model comparisons, and continuous-integration checks for AI prompts and workflows.
Why use it?
It helps catch changes that make an AI system's responses worse or break expected behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to define test cases, assertions, model comparisons, and continuous-integration checks for AI prompts and workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justinedevs/premortem/promptfoo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JustineDevs/premortem --skill promptfoo
Clone the repo
git clone --depth 1 https://github.com/JustineDevs/premortem

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for promptfoo-evals

README.md
[![agentmods](https://agentmods.dev/badge/skills/justinedevs/premortem/promptfoo/github.svg)](https://agentmods.dev/skills/justinedevs/premortem/promptfoo)
Your own site
<a href="https://agentmods.dev/skills/justinedevs/premortem/promptfoo"><img src="https://agentmods.dev/badge/skills/justinedevs/premortem/promptfoo/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for promptfoo-evals

Your own site · 80×15
<a href="https://agentmods.dev/skills/justinedevs/premortem/promptfoo"><img src="https://agentmods.dev/badge/skills/justinedevs/premortem/promptfoo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01836
Opus 5 $0.00036 $0.00918
Sonnet 5 $0.00014 $0.00367
Haiku 4.5 $0.00007 $0.00184

Measured 9d ago against content hash f695285dac99, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

promptfoo-evals scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to promptfoo-evals — 32 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/llm-ops/promptfoo/SKILL.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Promptfoo Evals (Premortem)

Repo entrypoints

  • Config: packages/evals/promptfoo/promptfooconfig.yaml
  • Provider adapter: packages/evals/promptfoo/provider.ts
  • Run gate: pnpm run eval:prompts (root package.json)
  • Dev dependency: root promptfoo package

Extend existing suites before creating new configs elsewhere.

Premortem workflow

pnpm run eval:prompts
# or, when credentials are configured:
pnpm exec promptfoo eval -c packages/evals/promptfoo/promptfooconfig.yaml --max-concurrency 1 --no-cache

Requires LLM credentials (GEMINI_API_KEY or Azure OpenAI vars). If unset, package build and config validation still pass; live eval is skipped.


Writing Promptfoo Evals

You produce maintainable promptfoo eval suites: clear test cases, deterministic assertions where possible, model-graded only when needed.

See references/cheatsheet.md for the full assertion and provider reference. For deep questions about promptfoo features, consult https://www.promptfoo.dev/llms-full.txt

Inputs (infer from repo context if not provided)

  • What is being evaluated (prompt, agent, endpoint, RAG pipeline)?
  • What are the inputs and outputs (text, JSON, multi-turn chat, tool calls)?
  • What does "good" look like (acceptance criteria, failure modes)?

If context is insufficient, scaffold with TODO markers and starter tests.

Workflow

1. Find or create the eval suite

Search for existing configs: promptfooconfig.yaml, promptfooconfig.yml, or any promptfoo/evals folder. Extend existing suites when possible.

For new suites, use this layout (unless the repo uses another convention):

evals/<suite-name>/
  promptfooconfig.yaml
  prompts/
  tests/

Always add # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json at the top of config files.

2. Write prompts

  • Put prompts in prompts/*.txt (plain) or prompts/*.json (chat format)
  • Reference via file://prompts/main.txt
  • Use {{variable}} for test inputs
  • If the app builds prompts dynamically, use a JS/Python provider instead of duplicating logic

Read the full file on GitHub · 245 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 245 lines · 71 tokens per session scan A f695285dac99

Subscribe to this mod's changes

promptfoo-evals is a skill published in the GitHub repository JustineDevs/premortem (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,836 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to promptfoo-evals, differing in 32 lines, and is treated as a copy.

Related

Other skills, from other repositories

dup-classes

Verify whether generated Java classes duplicate openai-java models by comparing fields/types (names may differ). Use when checking for duplicate model coverage.

Azure/azure-sdk-for-java · 31 tokens

llm-as-judge-evaluation

Evaluate LLM outputs using frontier models as judges. Use for pairwise model comparison, quality scoring with custom rubrics, and automated evaluation pipelines. Covers position bias mitigation, statistical significance, and generating preference data for DPO/RLHF.

synthetic-sciences/openscience · 56 tokens

agent-eval

Use when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual recall) or agent trajectories (tool correctness, completion), or picking an eval framework. NOT building the agent loop, tools or RAG…

ericrisco/rsc-harness · 79 tokens

code-review-pi

Review code for quality, run linters, check test coverage, fix issues, and enforce gates. Save the final report to ./specs/issues/003-code-review-pi/PROMPT.md. Use before committing changes.

dimetron/pi-go · 50 tokens

goal-test

A local experiment for testing a goal command that keeps an AI coding session working until a stated condition is judged complete. It uses a separate language model to evaluate the conversation after each assistant turn.

restarter/lets-workflow · 137 tokens

hatch3r-ai-feature

Eval-driven development workflow for shipping AI features — write eval before prompt, measure, iterate, ship with caching + cost telemetry + model fallback + hallucination SLI.

hatch3r/hatch3r · 39 tokens