Prompt Change Gate — Catch Prompt Regressions Early

    by LINH RATHHENRY

    1

    Give your agent a discipline: golden cases before and after every prompt change, and a regression-first report it must not ignore.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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

    CategoryCountCase IDs
    Regressions1inv-date-format
    Fixed1inv-missing-vendor
    Unchanged (Fail)1inv-intl-chars
    Unchanged (Pass)7inv-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.py to ensure ISO-8601 compliance.
    • Investigate the inv-intl-chars case 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed10 days ago
    Updated8 days ago

    What's inside

    Creator

    LINH RATHHENRY

    LINH RATHHENRY

    7 skills on Agensi

    Frequently Asked Questions

    This skill is a testing framework that compares a baseline prompt against a candidate prompt to detect 'regressions'—instances where a previously successful extraction now fails due to a prompt change.

    It is compatible with any model or agent (OpenAI, Anthropic, or local LLMs) as long as you can trigger the model's output via a shell command or script.

    Unlike LLM-based evaluators which are non-deterministic, this tool uses rule-based matching with flexible tolerances for numbers and strings to provide 100% consistent, reliable results.

    The tool is designed for structured JSON extraction; it currently requires the model to output at least one complete JSON object and does not support testing for creative writing or open-ended chat.

    Yes, the tool uses standard exit codes and outputs Markdown reports, making it easy to integrate into your existing GitHub Actions, GitLab CI, or Jenkins pipelines to block unstable builds.

    You will receive the local Python-based tool, documentation on defining 'golden' test cases, and instructions for integrating the gate into your development environment.

    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.