/json-schema:schema-validatefrom json-schema
Validate JSON data against a JSON Schema. Use when the user asks to validate JSON against a schema, check if JSON conforms to a schema, test JSON data validity, or verify JSON structure matches a schema definition.
Ships in json-schema. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Validate JSON data files against a JSON Schema definition.
npx tsx scripts/validate.ts <json-file> --schema=<schema-file> [options]
| Argument | Required | Description |
|---|---|---|
json-file | Yes | Path to the JSON file to validate |
| Option | Description |
|---|---|
--schema=FILE | Path to the JSON Schema file (required) |
--all-errors | Report all errors, not just the first |
--strict | Enable strict mode validation |
--verbose | Show detailed validation output |
--format | Output format: text (default), json |
Valid JSON:
Valid
Schema: user-schema.json
File: user.json
Invalid JSON:
Invalid (3 errors)
1. /email: must match format "email"
2. /age: must be >= 0
3. /name: must be string
npx tsx scripts/validate.ts data.json --schema=schema.json
npx tsx scripts/validate.ts data.json --schema=schema.json --all-errors
npx tsx scripts/validate.ts data.json --schema=schema.json --format=json
Run from the json-schema plugin directory: ~/.claude/plugins/cache/json-schema/
Validate multiple files against the same schema using glob patterns:
# Validate all JSON files in a directory
for f in data/*.json; do npx tsx scripts/validate.ts "$f" --schema=schema.json; done
When using --format=json:
{
"valid": false,
"file": "user.json",
"schema": "user-schema.json",
"errors": [
{
"path": "/email",
"message": "must match format \"email\"",
"keyword": "format"
}
]
}
Common validation errors:
must be string - Type mismatchmust match format "..." - Format validation failedmust be >= N / must be <= N - Number range violationmust NOT have additional properties - Unknown propertymust have required property '...' - Missing required fieldmust match pattern "..." - String pattern mismatchschema-meta to validate that a schema is well-formedschema-check to validate a JSON file against its embedded $schemaWhat SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/schema-checkValidate a JSON file against the schema referenced in its $schema property. Use when the user asks to check JSON against its own schema, validate self-describing JSON, auto-validate JSON files, or verify JSON with embedded schema reference./schema-metaValidate that a JSON Schema is well-formed and conforms to the JSON Schema specification. Use when the user asks to check if a schema is valid, verify schema syntax, validate schema structure, or check a JSON Schema file for errors.npx claudepluginhub mearman/marketplace --plugin json-schemaOther plugins' skills for the same job