Works with the AI Agents you already use
LLM Output JSON Validator
Instantly detects, cleans, and repairs malformed LLM JSON outputs including markdown noise and syntax errors.
Free
LLM Output JSON Validator
Example session with this skill installed
Fix this broken JSON from my LLM: json { 'user_id': 101, 'actions': ['login', 'update',], 'meta': 'Needs "high" priority' }
- Read your context and instructions
- Compiled the llm output json
[LLM JSON Validation Report]
🔍 Issues Detected:
- Markdown wrappers detected and removed.
- Single quotes replaced with double quotes for keys and values.
- Trailing comma fixed in 'actions' array.
- Internal double quotes in 'meta' value escaped for valid JSON syntax.
✅ Repaired JSON Output:
{
"user_id": 101,
"actions": [
"login",
"update"
],
"meta": "Needs \"high\" priority"
}
💡 Pro-Tip for Prevention:
- Use a Pydantic model or Zod schema in your prompt and explicitly instruct the model to "Output raw JSON without markdown code blocks" to reduce parsing overhead.
[Self-Check]
- Markdown and conversational noise stripped
- Common syntax errors (commas, quotes) repaired
- Final output is strictly valid, parseable JSON
- Actionable prevention tip provided
Next steps
- Copy the repaired JSON into your test suite or API client.
- Update your agent's system instructions to include the provided prevention tip.
- Verify if the
user_idtype (integer) matches your database schema requirements.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
LLMs frequently break production pipelines by returning JSON wrapped in markdown, using trailing commas, or failing to escape special characters. Manually cleaning these outputs for testing or debugging is slow and error-prone.
What it does
- Detects and strips markdown code blocks and conversational text surrounding JSON objects.
- Automatically repairs trailing commas and replaces single quotes with valid double quotes.
- Identifies unescaped special characters and restores missing closing brackets or braces.
- Generates a diagnostic report detailing exactly what failed in the original LLM response.
Why this beats prompting it yourself
General-purpose agents often hallucinate or repeat the same formatting errors when asked to fix them. This skill uses a strict validation logic to ensure the final output is parseable by standard JSON libraries without additional manual sanitization.
Use cases
- Cleaning logs from failed agent function calls.
- Sanitizing raw LLM responses before piping them into a downstream database.
- Debugging structured output prompts during the prototyping phase.
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.
Cannot fix logical data inconsistencies or recover data from severely truncated responses where the majority of the object is missing.
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
3 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 months ago
- Free with an Agensi account
Permissions
No special permissions declared or detected