Works with the AI Agents you already use
LLM JSON Contract — Validate, Locate, Repair
by SHUN
A model that returns JSON returns approximately JSON: a fence, an apology, a trailing comma, a renamed key.
Free
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
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
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
What's inside
Frequently Asked Questions
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.