# Fix Failing Prompts: Audit, Schema & Eval Kit

> Stop shipping flaky, hallucinating, or schema-breaking prompts. Audits any system prompt across 6 production failure modes (12-point scorecard) and outputs a constraint-locked hardened prompt, strict JSON Schema, and 8-case eval matrix.

Fix Failing Prompts: Audit, Schema & Eval Kit is a free AI agent skill on Agensi by ClumsyMoney, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [ClumsyMoney](https://www.agensi.io/creators/clumsymoney)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/fix-failing-prompts-audit-schema-eval-kit
- Tags: prompt-skill-engineering, llm-ops, code-quality-review, security

## About this skill

Production LLM features break for predictable reasons: ambiguous roles, conflicting rules, ungrounded hallucinations, missing fallback states, loose JSON formatting, and prompt injection inside untrusted user or RAG data.

**Fix Failing Prompts: Audit, Schema & Eval Kit** turns a brittle draft prompt into a production-ready specification in four deterministic phases:

1. **Intake & Constraint Extraction**: Breaks your original prompt into numbered clauses (`C-01`, `C-02`, ...) so zero business rules or negative constraints get lost during refactoring.
2. **6-Axis Deterministic Audit (12-Point Scorecard)**: Scores Role & Scope Ambiguity, Conflicting Instructions, Missing Refusal & Fallback Rules, Prompt-Injection & Delimiter Vulnerabilities, Ungrounded Claim Drift, and Output-Format Looseness. Any failure on Injection or Output-Format Looseness automatically flags the prompt as `NOT PRODUCTION-READY`.
3. **Hardening & Output Contract Wrapping**: Produces a 1:1 Constraint Traceability Table, a hardened prompt with explicit `<untrusted_input>` delimiters, `INSUFFICIENT_DATA` / `null` fallback handling, non-leaking refusal behavior, and an OpenAI `strict: true` compatible JSON Schema (`additionalProperties: false`, 100% keys in `required`, nullable types, and `status` enum).
4. **8-Case Evaluation Matrix**: Generates 8 ready-to-run test payloads covering 3 Golden Happy-Path cases, 3 Boundary/Missing-Input cases, 1 Direct Injection attack, and 1 Indirect Injection attack hidden inside untrusted data.

Zero external dependencies, zero API keys, and 100% portable across any agent or LLM workflow.

## Requires

Nothing beyond your AI agent.

## Known limitations

Pure workflow skill: generates the 8-case eval matrix and strict schema specification but does not execute live LLM API calls or Python/pytest test runners. Prompts shorter than 10 words without task context trigger a 3-question clarification halt before Phase 3 hardening.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Fix Failing Prompts: Audit, Schema & Eval Kit skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does this skill run Python or pytest scripts to execute the evals?

No. It is a pure workflow skill with zero runtime dependencies. It produces the complete audit, hardened prompt, strict JSON Schema, and 8-case eval matrix as structured output ready for your codebase or eval runner.

### Will the hardened JSON Schema work with OpenAI Structured Outputs (strict: true)?

Yes. Every generated JSON Schema enforces `additionalProperties: false` on all objects, lists 100% of property keys in `required`, uses `["<type>", "null"]` for nullable fields, and includes an explicit `status` enum (`OK`, `INSUFFICIENT_DATA`, `REFUSED`).

### What happens if I only paste a short idea instead of a full system prompt?

If your input is under 10 words without task context or lacks untrusted-input and output-format details, the skill halts before rewriting and asks up to 3 targeted clarifying questions so it never invents requirements.

### Can I request an XML or Markdown output contract instead of JSON Schema?

Yes. Strict JSON Schema is the default for machine-parsed pipelines, but if you specify XML or Markdown, Phase 3 wraps your hardened prompt in the corresponding deterministic contract.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
