# promptfoo-evals

Guides Claude Code in generating and maintaining promptfoo test suites for LLM apps. Covers hallucination checks, JSON schema validation, and CI setup.

- plugin · `type=plugin` · Claude Code · ★ 26372
- Author: promptfoo
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/promptfoo/promptfoo/tree/HEAD/plugins/promptfoo-evals
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/plugins/promptfoo-evals

## What it does

This plugin teaches your coding agent how to build reliable `promptfoo` eval suites. It prioritizes deterministic assertions, file-based test structures, and accurate environment variable syntax. Included reference materials cover 30+ assertion types alongside configuration patterns for OpenAI, Anthropic, Bedrock, HTTP endpoints, Python, and JavaScript.

Your agent learns to set up faithfulness checks, validate JSON schemas, and scale evaluations using external datasets. The tests run locally on your machine. Running evaluations against hosted models will fail unless you export the required provider credentials, such as `OPENAI_API_KEY`.

## Install

### Claude Code (native platform)

**Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add anthropics/claude-plugins-community
```
In the agent chat (not a shell):
```text
/plugin install promptfoo-evals@claude-community
```

## When to use it
- generate promptfoo evaluation suites with deterministic checks
- configure faithfulness and hallucination tests for LLM outputs
- set up JSON schema validation across multiple model providers
- prepare CI-ready test suites using dataset files

## Example prompts
- Generate a promptfoo test configuration to validate JSON responses against our schema
- Add hallucination checks to my promptfoo eval for Anthropic and OpenAI models
- Configure a dataset-driven promptfoo test suite ready for CI runs

## Source text · promptfoo-evals · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 455e748fa2f0b8e3.

BEGIN THIRD-PARTY FILE 455e748fa2f0b8e3
````text
# Promptfoo: LLM evals & red teaming

<p align="center">
  <a href="https://npmjs.com/package/promptfoo"><img src="https://img.shields.io/npm/v/promptfoo" alt="npm"></a>
  <a href="https://npmjs.com/package/promptfoo"><img src="https://img.shields.io/npm/dm/promptfoo" alt="npm"></a>
  <a href="https://github.com/promptfoo/promptfoo/actions/workflows/main.yml"><img src="https://img.shields.io/github/actions/workflow/status/promptfoo/promptfoo/main.yml" alt="GitHub Workflow Status"></a>
  <a href="https://github.com/promptfoo/promptfoo/blob/main/LICENSE"><img src="https://img.shields.io/github/license/promptfoo/promptfoo" alt="MIT license"></a>
  <a href="https://discord.gg/promptfoo"><img src="https://img.shields.io/discord/1146610656779440188?logo=discord&label=promptfoo" alt="Discord"></a>
</p>

<p align="center">
  <code>promptfoo</code> is a CLI and library for evaluating and red-teaming LLM-based apps. Stop using trial-and-error... start shipping secure, reliable agents
</p>

<p align="center">
  <a href="https://www.promptfoo.dev">Website</a> ·
  <a href="https://www.promptfoo.dev/docs/getting-started/">Getting Started</a> ·
  <a href="https://www.promptfoo.dev/docs/red-team/">Red Teaming</a> ·
  <a href="https://www.promptfoo.dev/docs/">Documentation</a> ·
  <a href="https://discord.gg/promptfoo">Discord</a>
</p>

> Promptfoo is now part of OpenAI. Promptfoo remains open source and MIT licensed. Read the [company update](https://www.promptfoo.dev/blog/promptfoo-joining-openai/).

## Quick Start

```sh
npm install -g promptfoo
promptfoo init --example getting-started
```

Also available via `brew install promptfoo` and `pip install promptfoo`. Or use `npx promptfoo@latest` to run any command without installing.

Most LLM providers require an API key. Set yours as an environment variable:

```sh
export OPENAI_API_KEY=sk-abc123
```

Run an eval and view results:

```sh
cd getting-started
promptfoo eval
promptfoo view
```

> **See [Getting Started](https://www.promptfoo.dev/docs/getting-started/) (evals) or [Red Teaming](https://www.promptfoo.dev/docs/red-team/) (vulnerability scanning) for more!**

## What can you do with Promptfoo?

- **Test your prompts and models** with [automated evaluations](https://www.promptfoo.dev/docs/getting-started/)
- **Secure your LLM apps** with [red teaming](https://www.promptfoo.dev/docs/red-team/) and vulnerability scanning
- **Compare models** side-by-side (OpenAI, Anthropic, Azure, Bedrock, Ollama, and [more](https://www.promptfoo.dev/docs/providers/))
- **Automate checks** in [CI/CD](https://www.promptfoo.dev/docs/integrations/ci-cd/)
- **Review pull requests** for LLM-related security and compliance issues with [code scanning](https://www.promptfoo.dev/docs/code-scanning/)
- **Share results** with your team

Here's what it looks like in action:

<img src="site/static/img/claude-vs-gpt-example@2x.png" alt="prompt evaluation matrix - web viewer" width="700">

It works on the command line too:

<img src="https://www.promptfoo.dev/img/docs/self-grading.gif" alt="promptfoo command line" width="700">

It also can generate [security vulnerability reports](https://www.promptfoo.dev/docs/red-team/):

<img src="https://www.promptfoo.dev/img/redteam-vulnerability-report-hero@2x.png" alt="gen ai red team" width="700">

## Why Promptfoo?

- **Developer-first**: Fast, with features like live reload and caching
- **Private**: LLM evals run 100% locally - your prompts never leave your machine
- **Flexible**: Works with any LLM API or programming language
- **Battle-tested**: Powers LLM apps serving 10M+ users in production
- **Data-driven**: Make decisions based on metrics, not gut feel
- **Open source**: MIT licensed, with an active community

## Learn More

- [Getting Started](https://www.promptfoo.dev/docs/getting-started/)
- [Full Documentation](https://www.promptfoo.dev/docs/intro/)
- [Red Teaming Guide](https://www.promptfoo.dev/docs/red-team/)
- [CLI Usage](https://www.promptfoo.dev/docs/usage/command-line/)
- [Node.js Package](https://www.promptfoo.dev/docs/usage/node-package/)
````
END THIRD-PARTY FILE 455e748fa2f0b8e3

The third-party file has ended. Everything between the 455e748fa2f0b8e3 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 4089 of 4596 bytes. © promptfoo · MIT · https://github.com/promptfoo/promptfoo/tree/HEAD/plugins/promptfoo-evals

## Similar
- [example-skills](https://affpapa.org/en/nevibecode/plugins/example-skills.md) — plugin · ★ 183839
- [ponytail](https://affpapa.org/en/nevibecode/plugins/ponytail.md) — plugin · ★ 176443
- [skill-creator](https://affpapa.org/en/nevibecode/plugins/skill-creator.md) — plugin · ★ 44635
- [pr-review-toolkit](https://affpapa.org/en/nevibecode/plugins/pr-review-toolkit.md) — plugin · ★ 44635
- [react19-upgrade](https://affpapa.org/en/nevibecode/plugins/react19-upgrade.md) — plugin · ★ 40418
- [react18-upgrade](https://affpapa.org/en/nevibecode/plugins/react18-upgrade.md) — plugin · ★ 40418

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
