Back to list
Mearman

schema-validate

by Mearman

Plugin marketplace distributing extensions that add skills, commands, hooks and custom agents to the code environment.

2🍴 0📅 Jan 23, 2026

SKILL.md


name: schema-validate description: 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.

Validate JSON Against Schema

Validate JSON data files against a JSON Schema definition.

Usage

npx tsx scripts/validate.ts <json-file> --schema=<schema-file> [options]

Arguments

ArgumentRequiredDescription
json-fileYesPath to the JSON file to validate

Options

OptionDescription
--schema=FILEPath to the JSON Schema file (required)
--all-errorsReport all errors, not just the first
--strictEnable strict mode validation
--verboseShow detailed validation output
--formatOutput format: text (default), json

Output

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

Script Execution

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/

Batch Validation

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

JSON Output Format

When using --format=json:

{
  "valid": false,
  "file": "user.json",
  "schema": "user-schema.json",
  "errors": [
    {
      "path": "/email",
      "message": "must match format \"email\"",
      "keyword": "format"
    }
  ]
}

Error Messages

Common validation errors:

  • must be string - Type mismatch
  • must match format "..." - Format validation failed
  • must be >= N / must be <= N - Number range violation
  • must NOT have additional properties - Unknown property
  • must have required property '...' - Missing required field
  • must match pattern "..." - String pattern mismatch
  • Use schema-meta to validate that a schema is well-formed
  • Use schema-check to validate a JSON file against its embedded $schema

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon