Prompt Regression — Testing skill for Claude Code
Snapshot & regression testing for LLM prompts in CI: YAML cases, pytest plugin + CLI, exact/regex/JSON-Schema/semantic/LLM-judge assertions, HTML diff report.
How to install Prompt Regression
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mohammadhadijavidi/prompt-regression and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Prompt Regression does
Snapshot & regression testing for LLM prompts in CI: YAML cases, pytest plugin + CLI, exact/regex/JSON-Schema/semantic/LLM-judge assertions, HTML diff report. OpenAI, Anthropic, Ollama, OpenRouter, Groq, mock.
Alternatives in Testing
- Gstack — 15,000+ Garry Tan's exact Claude Code setup: 6 opinionated tools that serve as CEO, Eng Manager, Release Manag 33.9k ★
- Claude Codepro — by Max Ritter - Professional development environment for Claude Code with spec-driven workflow, TDD enforcemen 1.6k ★
- Mda — MDA Open Spec — a Markdown superset for agent-facing documents 615 ★
README
prompt-regression
**Snapshot and regression testing for LLM prompts, built to run in CI.** Write test cases in YAML. Run them with `pytest` or the CLI. Compare outputs with exact, regex, JSON Schema, semantic-similarity and LLM-as-judge checks. Get an HTML diff report showing exactly what changed when a prompt or model update breaks something.
[](https://github.com/mohammadhadijavidi/prompt-regression/actions/workflows/ci.yml) [](LICENSE) [](pyproject.toml) [](#pytest-plugin)

The image above is a real screenshot of the HTML report from `examples/regression_demo.py`. The outputs come from the offline **mock** provider, which returns hand-written sample responses, not answers from a real model.
Why
Changing one line of a prompt, or switching `gpt-4o` to a cheaper model, can quietly break things that worked yesterday. A classifier starts answering `Billing` instead of `billing`. An extraction step invents a new enum value. A support bot starts promising refunds. Unit tests usually miss these failures, because LLM output is text with no fixed shape.
prompt-regression handles this the way snapshot testing does for UI code:
- Record a known-good output for each case (a snapshot, stored as JSON next to your suite and reviewed in PRs).
- Assert the things that must always hold, such as format, schema, forbidden phrases and tone.
- Compare each new output with its snapshot, using a tolerance that fits the case: byte-exact for labels, parsed-JSON equality for structured output, and a similarity threshold for free text.
Related Skills
AI Test Agent Playwright
I layer on Playwright (JavaScript): a Writer Agent that writes tests from plain English and a Healer Agent tha
Sit
⚙️ [Skill] A Git-native semantic safety layer for AI agents editing Skill packages — validates, diffs, reviews
Kb Validate
Validate a ckb.json against the CKB spec (JSON Schema + semantic rules R1–R7) and report freshness and report
AI Review Pipeline
AI code review pipeline — review, auto-fix, test generation & HTML report in one command. Zero dependencies, 6
Vi Chan Terminal
♡ Vi-Chan Terminal: a kawaii, Claude-Code-style AI agent for your terminal. Bring any API key (OpenAI, Gemini,
AI Browserguard
A firewall for browser agents. Chrome extension that detects, monitors, and controls AI agents in your browser
Related Agents
LLM Orchestrator
Use this agent for LLM integration work — prompt engineering, multi-provider abstraction (OpenRouter, Gemini,
AI ML
AI/ML 통합 전문가 + LLM API 최신 모델/SDK 코딩 가이드. RAG 시스템, 문서 분석, OpenAI/Anthropic/Gemini/Ollama 최신 API 보장. "AI integra
LLM Integrator
LLM integration specialist who connects to OpenAI/Anthropic/Ollama APIs, designs prompt templates, implements