Check AI Replies Against a JSON Schema
by Shogun Labs
Check saved AI JSON replies against a stated subset of Draft 2020-12 JSON Schema and locate parse errors and violations locally. Structural check only; it does not judge whether an answer is correct.
$5
Works with the AI Agents you already use
Check AI Replies Against a JSON Schema
Example session with this skill installed
python3 scripts/check_ai_replies.py examples/reply.schema.json examples/replies.jsonl
- Read your context and instructions
- Compiled the check ai replies
REPLY line=1 VALID
REPLY line=2 INVALID violations=3
path=# keyword=required message='confidence' is a required property
path=#/answer keyword=type message=boolean is not of type 'string'
path=#/extra keyword=additionalProperties message=extra property 'extra'
REPLY line=3 PARSE-ERROR line 3: Expecting value: line 1 column 1 (char 0)
REPLY line=4 VALID
SUMMARY replies=3 parse_errors=1 unsupported_keywords=0
Connects securely to your tools. The creator never sees your data.
About this skill
AI developers who pass saved structured replies to later code can catch missing fields, wrong types, and undeclared properties before integration fails. This checker shows each reply's parse errors and schema violations so a developer can choose what to fix or retry. It reads files locally and calls no external service.
What it checks
- Reads one schema JSON file and one response file (one JSON value, a JSON array, or JSON Lines with one value per nonblank line).
- Marks each reply VALID, INVALID, or PARSE-ERROR. Invalid replies list a JSON Pointer path, the violated keyword, and a message.
- Implements a stated subset of Draft 2020-12 assertion keywords (type, enum, const, properties, required, additionalProperties, items, length/size and numeric bounds, pattern, uniqueItems).
- Names any keyword it does not implement in output as
UNSUPPORTED ... not evaluated(for example$ref,allOf,anyOf,oneOf,if/then/else,patternProperties,multipleOf,format, and the content keywords). A reply is not treated as passing when its schema uses an unsupported keyword. - A malformed JSONL line is reported while valid lines before and after it are still checked.
What it does not do
- It does not retry or regenerate replies, call a model, or reach the network.
- A clean result means only that the instance passes this schema evaluation; it does not establish that an AI answer is meaningful, factually correct, safe, or likely to pass a later application step.
patternuses Python regular expressions, which may differ from the ECMA-262 dialect JSON Schema describes.
Exit status
0 all parsed replies pass and no unsupported keyword found; 1 a parse error, schema violation, or unsupported keyword was reported; 2 the schema or command could not be processed.
Requirements
Python 3.9+ standard library only. No third-party packages.
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.
Does not assert format or content keywords. Structure only; no semantic validation. Unsupported keywords cause exit 1. Requires Python 3.
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 today
- Software
Python 3.9+