/json-schema:schema-checkfrom json-schema
Validate 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.
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 a JSON file against the schema referenced in its $schema property. This is useful for self-describing JSON documents that declare their own schema.
npx tsx scripts/check.ts <json-file> [options]
| Argument | Required | Description |
|---|---|---|
json-file | Yes | Path to the JSON file with $schema property |
| Option | Description |
|---|---|
--all-errors | Report all errors, not just the first |
--no-cache | Bypass cache when fetching remote schemas |
--strict | Enable strict mode validation |
--verbose | Show detailed validation output |
--format | Output format: text (default), json |
Valid JSON:
Valid
Schema: https://json-schema.org/draft/2020-12/schema
File: my-schema.json
Invalid JSON:
Invalid (2 errors)
Schema: ./schemas/config.schema.json
1. /settings/timeout: must be number
2. /settings/retries: must be >= 0
No schema reference:
Error: No $schema property found in config.json
Hint: Use schema-validate to validate against a specific schema
npx tsx scripts/check.ts config.json
npx tsx scripts/check.ts config.json --all-errors
npx tsx scripts/check.ts config.json --no-cache --verbose
Run from the json-schema plugin directory: ~/.claude/plugins/cache/json-schema/
The $schema property can reference:
Remote URLs - Fetched and cached (24h TTL)
{ "$schema": "https://json-schema.org/draft/2020-12/schema" }
Local file paths - Resolved relative to the JSON file
{ "$schema": "./schemas/config.schema.json" }
Absolute paths
{ "$schema": "/Users/joe/schemas/config.schema.json" }
| Schema URI | Description |
|---|---|
https://json-schema.org/draft/2020-12/schema | JSON Schema Draft 2020-12 |
https://json-schema.org/draft/2019-09/schema | JSON Schema Draft 2019-09 |
http://json-schema.org/draft-07/schema# | JSON Schema Draft 7 |
http://json-schema.org/draft-06/schema# | JSON Schema Draft 6 |
http://json-schema.org/draft-04/schema# | JSON Schema Draft 4 |
Remote schemas are cached for 24 hours using the OS temporary directory. Use --no-cache to bypass caching and fetch fresh schemas.
schema-meta to validate that a schema is well-formedschema-validate to validate JSON against an arbitrary schema fileWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mearman/marketplace --plugin json-schema3 skills in this plugin
/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./schema-validateValidate 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.Other plugins' skills for the same job