- Home
- Skills
- Prompt & Skill Engineering
- Prompt Change Gate — Catch Prompt Regressions Early
Prompt Change Gate — Catch Prompt Regressions Early
Give your agent a discipline: golden cases before and after every prompt change, and a regression-first report it must not ignore.
$12
Prompt Change Gate — Catch Prompt Regressions Early
Example session with this skill installed
Run a regression test on my invoice extractor using the cases in fixtures/test_suite.json, comparing the current v1 script against the new v2 prompt wrapper.
- Read your context and instructions
- Compiled the prompt change gate
I have executed the prompt regression test comparing wrappers/invoice_v1.py and wrappers/invoice_v2.py. The candidate prompt introduced 1 regression and 1 fix across 10 test cases.
Prompt Gate Comparison Report
| Category | Count | Case IDs |
|---|---|---|
| Regressions | 1 | inv-date-format |
| Fixed | 1 | inv-missing-vendor |
| Unchanged (Fail) | 1 | inv-intl-chars |
| Unchanged (Pass) | 7 | inv-standard, inv-multi-line, ... |
Regression Details: inv-date-format
- Status: REGRESSION
- Failure: Value mismatch for 'date': expected '2026-03-04', got '03/04/2026'
- Candidate Output:
{
"invoice_number": "INV-9901",
"vendor": "Acme Corp",
"date": "03/04/2026",
"total": 150.00
}
Fix Details: inv-missing-vendor
- Status: FIXED
- Improvement: Field 'vendor' now correctly extracted. Previously returned
null.
Next steps
- Review the date formatting logic in
wrappers/invoice_v2.pyto ensure ISO-8601 compliance. - Investigate the
inv-intl-charscase in the backlog to see if the new prompt can be adjusted to handle non-ASCII characters. - Merge the candidate prompt if the date format change is an intentional schema update.
Connects securely to your tools. The creator never sees your data.
About this skill
The product here is a workflow for your agent, packaged as a skill — the small local tool underneath is just its engine. SKILL.md teaches your agent a habit most teams never build: before any prompt, model, or extraction-schema change ships, run a set of golden cases (input text → the JSON that must come back) through the old prompt and the new one, and read a report that leads with regressions — cases that passed before and fail now. The skill states the rule plainly: never ship a prompt change with regressions nobody has reviewed. What the engine does: golden cases in one JSON file (input text, the fields and values that must come back, forbidden substrings that must never appear); provider-neutral (runs any command that reads text on stdin and prints the model's raw output); real-world output shapes (extracts JSON embedded in prose or code fences; valid JSON of the wrong shape still fails); recursive value matching with a forgiving normalizer (trimmed case-insensitive strings, numeric tolerance, "$1,234.56" = 1234.56) at every level; a gate that cannot pass vacuously (empty case file or duplicate case IDs are setup errors, exit 2); CI-ready exit codes, with a GitHub Actions example included. Honest scope: zero-install (standard-library Python only), extraction-focused, agent-native; checks structured output, not open-ended generation quality; runs entirely on your machine. Includes a full working demo with no API calls: a good fake model and a "broken" one simulating a prompt change that dropped a field and changed the date format — the gate catches all 8 bundled invoice cases as regressions. What's inside: SKILL.md; prompt_gate/ engine; fixtures/invoice_cases.json (8 invoice-extraction golden cases); demo/ with generated reports; examples/github-actions.yml; tests/ (39 pytest tests); README. Requirements: Python 3.10+.
Only supports JSON object extraction. Not suitable for open-ended creative writing. Requires a local Python environment and model wrapper scripts that handle stdin/stdout.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Prompt & Skill Engineering
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Prompt & Skill Engineering.