hook-json-error-recovery

Detect JSON/YAML parse errors and inject structured recovery hints.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/xuezhaojun/oh-your-opencode --skill hook-json-error-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-json-error-recovery
Source: https://github.com/xuezhaojun/oh-your-opencode/tree/main/.opencode/skills/hook-json-error-recovery
Command: npx skills add https://github.com/xuezhaojun/oh-your-opencode --skill hook-json-error-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This hook helps teams quickly identify and recover from JSON and YAML parsing errors in tool outputs, reducing debugging time and preventing repeated mistakes.

Core Features & Use Cases

  • Detects common parse errors in JSON and YAML outputs and suggests concrete fixes.
  • Provides structured recovery hints that guide the next assistant message to correct syntax.
  • Use case: when a tool returns invalid JSON, automatically injects a recovery step to repair structure and retry.

Quick Start

Run the json-error-recovery hook in your hook pipeline to automatically inject recovery hints when parse errors are detected.

Frequently Asked Questions about hook-json-error-recovery

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

FAQPage Schema
How do I automatically fix JSON parse errors in tool outputs?

To automatically fix JSON parse errors in tool outputs, run a hook that detects invalid syntax and injects structured recovery hints. This guides the next assistant message to repair the broken JSON structure and retry the parsing operation.

What causes YAML parse failures in configuration files and logs?

YAML parse failures in configuration files and logs are caused by strict syntax violations. A lightweight pattern matching hook identifies these common structural mistakes and provides concrete fixes to prevent cascading errors downstream.

How do I prevent cascading errors from invalid JSON in development workflows?

You prevent cascading errors from invalid JSON by integrating an error recovery hook into your pipeline. It identifies parse failures in data interchange outputs and suggests concrete fixes to stop errors from propagating across development workflows.

Does this JSON error recovery hook work with YAML logging pipelines?

Yes, the error recovery hook works with YAML logging pipelines. It applies lightweight pattern matching across both JSON and YAML formats to detect parse errors and inject structured recovery hints into the next message.

What is the best way to repair broken JSON syntax in automated tool outputs?

The best way to repair broken JSON syntax in automated tool outputs is using a dedicated hook that detects the failure and suggests concrete fixes. It automatically injects a recovery step to repair the structure and retry the parsing action.