Works with the AI Agents you already use

    LLM JSON Contract — Validate, Locate, Repair

    by SHUN

    1

    A model that returns JSON returns approximately JSON: a fence, an apology, a trailing comma, a renamed key.

    Free

    Security scanned
    LLM JSON Contract — Validate, Locate, Repair

    LLM JSON Contract — Validate, Locate, Repair

    Example session with this skill installed

    schema.json + a fenced response with a trailing comma, a bad enum, a negative amount and an extra key

    • Read your context and instructions
    • Compiled the llm json contract

    REPAIR 6 errors · $.status ENUM · $.items[0].qty MINIMUM · $.customer_email EXTRA_KEY · repair prompt ready to send

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A model that returns JSON returns approximately JSON: a fence, an apology, a trailing comma, a renamed key. Downstream code fails on a KeyError, the retry sends the same prompt, and the same failure comes back.

    This skill separates three failures that get treated as one:

    • formatting noise (fence, prose, trailing comma, Python literals, smart quotes) — stripped and recorded, then validated
    • contract violations — reported per JSON path with code, expected value and actual value
    • truncation — detected from brace counts and reported as "shorten the response", not "try again"

    Supported keywords: type, required, properties, additionalProperties, items, enum, pattern, minimum, maximum, minLength, maxLength, minItems, maxItems, allOf, oneOf, anyOf. It emits a repair prompt listing only the failing paths, states which fields to leave untouched, and advises a retry budget per failure category. Output: contract_check.md plus contract_check.json; exit codes 0/1/2 for PASS/REPAIR/FAIL.

    Subset only: no $ref, format, if/then, patternProperties, uniqueItems. Does not judge whether the content is true. Cannot fix prompt design or repair an unparseable syntax error it will not guess at.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 12 days ago

    • Free with an Agensi account

    Software
    Python 3.9+

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed12 days ago

    What's inside

    Frequently Asked Questions

    Validates a model's JSON response against a schema subset, recovers fenced or chatty output first, and returns the exact violating paths plus a repair prompt that fixes those paths and nothing else — with truncation diagnosed instead of retried.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use LLM JSON Contract — Validate, Locate, Repair on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Free