Skip to main content
AIDiveForge AIDiveForge
🧬

JSON Schema Builder

Data Extraction & Parsing · by AIDiveForge · Apr 17, 2026 · Intermediate · ✓ 1 verified compat

Generate a valid JSON Schema from example data, with nullability and enum detection baked in.

🧠 Why it works

Hand-writing schemas is tedious and error-prone; the examples already contain the structural truth, they just need aggregation. Inferring nullability across N examples (rather than one) prevents the classic mistake of typing a field as string when 3% of your real data has it as null. Pairing inference with LLM-generated descriptions turns a dry schema into documentation that explains itself to downstream consumers.

⚙️ How it works

1) Parse every example file, recursing into nested objects/arrays. 2) For each field path, collect the set of observed types. 3) If more than one type appears and null is one of them, emit oneOf: [<T>, null]. 4) For string fields with ≤ 12 unique values across examples, emit an enum. 5) For numeric fields, emit minimum/maximum pulled from observed range. 6) LLM pass: generate a one-line description per field name using the field path + 3 sample values. 7) Validate the emitted schema against the original examples; any failure triggers a second pass that widens the constraint.

Description

Packaged skill that infers a JSON Schema (Draft 2020-12) from a folder of example documents. Detects nullable fields, enum-able strings (low cardinality), required vs optional, and emits a schema with human-readable descriptions derived from field names.

Install this skill

A Claude skill is a skill.md file with YAML frontmatter and a markdown body. Drop the file into your tool of choice — or pick a different format if you use Cursor, Windsurf, Copilot, or something else.

Download skill.md
mkdir -p ~/.claude/skills/json-schema-builder \
  && curl -L https://aidiveforge.com/skill/json-schema-builder.skill-md \
       -o ~/.claude/skills/json-schema-builder/skill.md

Save to ~/.claude/skills/json-schema-builder/skill.md

Recommended Use

Tools and workflow packs this skill pairs well with. Forge picks are auto-generated from category + capability signals; Community picks are added by people who've used the pairing.