llm-output-parsing

Parse and validate LLM JSON output with Zod schemas and retries.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/abzhaw/juliaz_agents --skill llm-output-parsing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-output-parsing
Source: https://github.com/abzhaw/juliaz_agents/tree/main/.agent/skills/llm-output-parsing
Command: npx skills add https://github.com/abzhaw/juliaz_agents --skill llm-output-parsing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps ensure reliable structured data from LLM responses by parsing JSON, validating with Zod schemas, and retrying on errors.

Core Features & Use Cases

  • JSON mode parsing and strict validation of LLM outputs.
  • Zod-based schema validation with retry on invalid results.
  • Regex-based extraction fallback for non-JSON replies.
  • Use cases include task planning, structured tool calls, and data extraction across agent workflows.

Quick Start

Configure prompts to return valid JSON and use the included parsing utilities to validate and retry on failures.

Frequently Asked Questions about llm-output-parsing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate LLM structured output and ensure reliable JSON data?

To validate LLM structured output, this Skill parses JSON responses and applies Zod schema validation. It ensures reliable JSON data for downstream agents by catching invalid formats and retrying failed requests.

What is the best way to parse JSON from LLM responses when the output is non-standard?

The best way to parse non-standard LLM output is using a regex-based extraction fallback. This Skill implements regex extraction to recover structured data when standard JSON parsing fails on non-JSON replies.

How do I handle invalid JSON generation from LLMs in my agent workflow?

You can handle invalid JSON generation by using Zod-based validation with automatic retry. This Skill detects invalid structured outputs and retries the request to enforce deterministic data formats for task specifications and tool calls.

Does this JSON parsing approach work with strict schema validation for task planning?

Yes, this JSON parsing approach works with strict schema validation for task planning. It applies Zod schemas to validate task specifications and structured tool calls across any agent workflow requiring deterministic data.

When do I need structured output parsing for LLM agent workflows?

You need structured output parsing for LLM agent workflows when downstream processes require deterministic data. This Skill ensures reliable JSON for task planning, plan validation, and structured tool calls by applying safety checks to prevent unsafe data handling.

Why does LLM structured output fail validation and how can I fix it?

LLM structured output fails validation due to malformed JSON or schema mismatches. You can fix it by implementing Zod-based validation with retry, which automatically detects errors and re-prompts the model for correct structured data.