# JSON Schema Validator

> Validate JSON objects against schemas with clear error reporting

- Skill: `zscole/json-schema-validator` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zscole/json-schema-validator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zscole/json-schema-validator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zscole (https://skillmd.com/u/zscole)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zscole/json-schema-validator

---


# JSON Schema Validation

## Task Overview
Validate JSON objects against a schema and report all errors clearly.

## Core Rules
1. Check all required fields exist
2. Validate types match schema
3. Check string patterns (if specified)
4. Validate numeric ranges
5. Recursively validate nested objects

## Error Format
Report errors as:
- Path: field.subfield
- Issue: what's wrong
- Expected: what was expected
- Got: what was received

## Common Patterns
- Email: use regex /^[^@]+@[^@]+\.[^@]+$/
- Date: ISO 8601 format
- UUID: 8-4-4-4-12 hex pattern

## Edge Cases
- null vs missing field (different errors)
- Empty arrays vs missing arrays
- Extra fields (warn, don't error by default)

## Example
Input: {"name": 123, "email": "notanemail"}
Schema: {"name": "string", "email": "email"}

Output:
- Path: name | Issue: wrong type | Expected: string | Got: number
- Path: email | Issue: invalid format | Expected: email | Got: notanemail

