Skip to main content
skillsFirst-partyReview first Safety Privacy

JSON Schema Validate + Transform Skill

Compile JSON Schema (draft-07, 2019-09, 2020-12) into fast validators with Ajv, report every failure by its instancePath, and use Ajv options to coerce types, apply defaults, and remove unknown properties so incoming JSON is both validated and normalized.

HarnessClaude CodeCodexWindsurfGeminiCursorCLI
Level:advancedType:generalVerified:draft
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://ajv.js.org/, https://github.com/JSONbored/awesome-claude/blob/main/content/skills/json-schema-validation-transformation.mdx
Package URL
/downloads/skills/json-schema-validation-transformation.zip
Package SHA256
851adc6e2004750ad392111dbccb5a131aec55693c028a0e460cd09f0acb9b8f
Safety notes
This skill installs npm packages (ajv, zod, json-schema-to-typescript) and reads and writes local files — JSON schemas, data, migration output, and generated TypeScript definitions., Ajv type coercion and default-filling mutate the input data, and migration scripts overwrite documents; keep backups and re-validate each step, as the skill's troubleshooting notes recommend.
Privacy notes
Validation, normalization, and migration process your JSON data and schema files locally; nothing leaves the machine beyond the npm package downloads from the registry.
Platform compatibility
claude-code (native-skill), codex (native-skill), windsurf (native-skill), gemini (native-skill), cursor (adapter), cli (manual-context)
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-15

Decision playbook

Ready to evaluate for your workflow

Signals are comparatively strong, but you should still validate source, privacy posture, and package provenance for your environment.

Compare context
Selected

0

Current score

96

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as first-party.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Complete

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    Package marked verified.

    Done
  • Checksum metadata

    SHA-256 hash is present.

    Done

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Package install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

6 to clear

Platforms

6 listed

Difficulty

100/100

Adoption plan

Balanced adoption plan

Current risk score 0/100. Use staged verification before broader rollout.

Risk 0

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    Package verification/checksum metadata is available.

    Done

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (6/6 signals complete).

Risk 0

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Present

Package integrity metadata is present.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

6/6 steps complete with no blocking gaps for this preset.

Risk 0

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is available.

Done

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

6 prerequisites to line up before setup.

0/6 ready
Install & runtime1Configuration3General2

Safety & privacy surface

Safety & privacy surface

2 safety and 1 privacy notes across 3 risk areas. Review closely: network access.

3 areas
  • SafetyLocal filesThis skill installs npm packages (ajv, zod, json-schema-to-typescript) and reads and writes local files — JSON schemas, data, migration output, and generated TypeScript definitions.
  • SafetyExecution & processesAjv type coercion and default-filling mutate the input data, and migration scripts overwrite documents; keep backups and re-validate each step, as the skill's troubleshooting notes recommend.
  • PrivacyNetwork accessValidation, normalization, and migration process your JSON data and schema files locally; nothing leaves the machine beyond the npm package downloads from the registry.

Safety notes

  • This skill installs npm packages (ajv, zod, json-schema-to-typescript) and reads and writes local files — JSON schemas, data, migration output, and generated TypeScript definitions.
  • Ajv type coercion and default-filling mutate the input data, and migration scripts overwrite documents; keep backups and re-validate each step, as the skill's troubleshooting notes recommend.

Privacy notes

  • Validation, normalization, and migration process your JSON data and schema files locally; nothing leaves the machine beyond the npm package downloads from the registry.

Prerequisites

  • Node.js 18+
  • ajv or zod
  • TypeScript 4.5+ (for Zod)
  • json-schema-to-typescript (optional, for type generation)
  • File system read/write access for JSON schema files, data files, and generated TypeScript type definitions
  • JSON Schema specification knowledge or reference documentation for creating valid schemas (draft-07, 2019-09, or 2020-12)

Schema details

Install type
package
Reading time
5 min
Difficulty score
100
Troubleshooting
Yes
Breaking changes
No
Package metadata
Package verified
Yes
SHA-256
851adc6e2004750ad392111dbccb5a131aec55693c028a0e460cd09f0acb9b8f
Skill and platform metadata
Skill type
general
Skill level
advanced
Verification
draft
Verified at
2025-10-15
Retrieval sources
https://ajv.js.org/https://json-schema.org/https://github.com/bcherny/json-schema-to-typescript
Tested platforms
ClaudeCodexOpenClawCursorWindsurfGemini
PlatformSupportInstall path
claude-codeNative.claude/skills/<skill-name>/SKILL.md
codexNative.agents/skills/<skill-name>/SKILL.md
windsurfNative.windsurf/skills/<skill-name>/SKILL.md
geminiNative.gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md
cursorAdapter.cursor/rules/<skill-name>.mdc
cliManualAGENTS.md or tool-specific context file
Full copyable content
import Ajv from "ajv";
const ajv = new Ajv({ allErrors: true, strict: true });
const validate = ajv.compile({
  type: "object",
  properties: { id: { type: "string" } },
  required: ["id"],
  additionalProperties: false
});
console.log(validate({ id: "abc" })); // true
console.log(validate({})); // false, see validate.errors

About this resource

What This Skill Enables

Claude can validate JSON against JSON Schema with Ajv — compiling schemas, reporting failures by instancePath, and using Ajv options to coerce types, apply defaults, and remove unknown properties so data is validated and normalized in one pass. For work beyond validation, it uses companion tools: json-schema-to-typescript to generate TypeScript types from a schema, and scripted migrations that re-validate every document against the target schema.

Compatibility

Native

  • Claude Code / Claude: native skill usage via SKILL.md.
  • Codex/OpenAI workflows: compatible with Agent Skills-style SKILL.md content as reusable workflow instructions.

Manual Adaptation

  • Gemini CLI: native skill usage via .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md where supported.
  • Cursor: use the generated .cursor/rules/*.mdc adapter for project rules.
  • OpenClaw and similar agents: use the same skill content as a reusable prompt/workflow file when native skill import is unavailable.

Prerequisites

Required:

  • Claude Pro subscription
  • Code Interpreter feature enabled
  • JSON data or schema file uploaded

What Claude handles:

  • Installing validation libraries (Ajv, Zod)
  • Schema compilation and validation
  • Error reporting and debugging
  • Data transformation and migration
  • Type generation from schemas

How to Use This Skill

Validate JSON Against Schema

Prompt: "Validate this JSON data against the provided JSON Schema. Show me all validation errors."

Claude will:

  1. Load schema and data
  2. Compile schema
  3. Run validation
  4. Report all errors with paths
  5. Suggest fixes

Generate TypeScript Types

Prompt: "Generate TypeScript interfaces from this JSON Schema."

Claude will:

  1. Parse the JSON Schema
  2. Generate TypeScript types
  3. Include JSDoc comments
  4. Export as .d.ts file

Transform Data Format

Prompt: "Transform this API response from format A to format B according to this mapping schema."

Claude will:

  1. Analyze source and target schemas
  2. Create transformation logic
  3. Map fields
  4. Validate output
  5. Return transformed data

Schema Migration

Prompt: "Migrate these 100 JSON documents from schema v1 to schema v2. Show me the migration script and any issues."

Claude will:

  1. Compare schema versions
  2. Identify changes
  3. Generate migration script
  4. Process all documents
  5. Report any migration failures

Common Workflows

API Payload Validation

"Create a validation script that:
1. Loads this OpenAPI spec
2. Extracts the POST /users request schema
3. Validates this payload against it
4. Returns detailed error messages for invalid fields
5. Suggests corrections"

Config File Validation

"Validate all JSON config files in the uploaded directory:
1. Check against config.schema.json
2. Report which files are invalid
3. For each error, show: file, path, expected type, actual value
4. Suggest fixes for common errors
5. Generate a validation report"

Data Normalization

"Normalize this messy JSON data:
1. Validate against the schema
2. Fix common issues (trim strings, coerce types)
3. Remove extra properties not in schema
4. Fill in default values for missing optional fields
5. Export clean, validated JSON"

Batch Transformation

"Transform all JSON files from old format to new:
1. Load transformation rules
2. For each file:
   - Parse and validate source
   - Apply transformations
   - Validate against target schema
   - Save to output/
3. Report success/failure stats"

Tips for Best Results

  1. Provide Complete Schemas: Include all $ref dependencies or use inline definitions
  2. Specify Validation Rules: Be clear about strictness (additional properties, coercion, etc.)
  3. Error Reporting: Ask for detailed error paths: "Show me the JSON path for each error"
  4. Examples: Provide sample valid and invalid data
  5. Version Info: Specify JSON Schema draft version (draft-07, 2019-09, 2020-12)
  6. Custom Formats: If using custom formats, define validation logic
  7. Large Datasets: For many files, ask Claude to process in batches

Advanced Features

Schema Generation

  • Generate schema from sample JSON
  • Infer types and patterns
  • Add validation rules
  • Export as JSON Schema or TypeScript

Complex Validations

  • Custom validation functions
  • Conditional schemas (if/then/else)
  • Dependencies between properties
  • Pattern properties
  • Recursive schemas

Data Transformation Patterns

  • Field renaming and mapping
  • Nested object flattening/nesting
  • Array transformations
  • Type coercion with validation
  • Conditional transformations

Troubleshooting

Issue: Schema validation too strict Solution: Ask Claude to adjust: "Allow additional properties" or "Coerce types when possible"

Issue: $ref resolution errors Solution: Either inline all schemas or ensure all referenced files are uploaded

Issue: Type coercion not working as expected Solution: Be explicit: "Convert string numbers to integers" or "Parse ISO date strings to Date objects"

Issue: Large JSON files cause memory issues Solution: "Process this file in streaming mode" or "Validate in chunks of 1000 records"

Issue: Validation errors are cryptic Solution: Ask for better errors: "Explain each validation error in plain English with examples"

Issue: Migration breaks data Solution: "Validate each step of the migration" and "Keep backup of original values for rollback"

Learn More

Features

  • Strict validation with detailed error reporting and JSON path references
  • Schema-aware migration between schema versions with change detection
  • Format and $ref handling with custom schema loaders
  • CLI-friendly usage with batch processing support
  • TypeScript type generation from JSON schemas (json-schema-to-typescript)
  • Custom validation functions and conditional schemas (if/then/else)
  • Data transformation pipelines with type coercion and normalization
  • Multiple JSON Schema draft support (draft-07, 2019-09, 2020-12)

Use Cases

  • API payload validation against OpenAPI specifications
  • Configuration file validation and migration between versions
  • Data pipeline guards with schema enforcement
  • TypeScript type generation from JSON schemas
  • Data normalization and cleaning with schema validation
  • Batch transformation of JSON documents between formats

Source citations

Add this badge to your README

Show that JSON Schema Validate + Transform Skill is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/skills/json-schema-validation-transformation.svg)](https://heyclau.de/entry/skills/json-schema-validation-transformation)

How it compares

JSON Schema Validate + Transform Skill side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

3 trust signals differ across this comparison (Package trust, Source provenance, Submitter).

Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.

Field

Compile JSON Schema (draft-07, 2019-09, 2020-12) into fast validators with Ajv, report every failure by its instancePath, and use Ajv options to coerce types, apply defaults, and remove unknown properties so incoming JSON is both validated and normalized.

Open dossier

TypeScript-first validation skill using Zod — define schemas once, get runtime checks and inferred types for APIs, forms, and data pipelines.

Open dossier

Expert Claude Code computer use GUI QA capability pack that applies documented computer-use MCP enablement, per-app session approval, screenshot checkpoints, and macOS permission workflows for native app validation—not an official Anthropic QA product.

Open dossier

Expert Claude Code zero data retention review capability pack for auditing ZDR scope on Claude for Enterprise, disabled features, model availability, analytics limits, and third-party integration gaps before rollout.

Open dossier
Next stepsDiffers
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustDiffersPackage verified2025-10-15Package verified2025-10-16Package not verifiedPackage not verified
Source provenanceDiffersSource-backedNo submission linkSubmission linkedSource submissionSubmission linkedSource submission
SubmitterDifferskiannidevkiannidev
Install riskReview firstLow riskReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Brand
Categoryskillsskillsskillsskills
Sourcefirst-partyfirst-partysource-backedsource-backed
AuthorJSONboredJSONboredkiannidevkiannidev
Added2025-10-152025-10-162026-06-162026-06-13
Platforms
Claude CodeCodexWindsurfGeminiCursorCLI
Claude CodeCodexWindsurfGeminiCursorCLI
Claude CodeCodexWindsurfGeminiCursorCLI
Claude CodeCodexWindsurfGeminiCursorCLI
Source repo
Safety notesThis skill installs npm packages (ajv, zod, json-schema-to-typescript) and reads and writes local files — JSON schemas, data, migration output, and generated TypeScript definitions. Ajv type coercion and default-filling mutate the input data, and migration scripts overwrite documents; keep backups and re-validate each step, as the skill's troubleshooting notes recommend.Install Zod with `npm install zod` (or your package manager's equivalent) before use. The library has zero runtime dependencies and does not execute network requests on its own. Async refinements (`.refine(async fn)`) may call external services if your own callback does — review any async refinement for unintended network or database access.Computer use controls real desktop apps with per-app session approval—not sandboxed Bash. Review sentinel warnings before approving Terminal, Finder, or System Settings access. Press Esc or Ctrl+C to stop computer use and release the machine-wide lock immediately. Only one Claude Code session can hold the computer-use lock at a time.This skill summarizes official ZDR scope; it must not claim ZDR covers chat on claude.ai, Cowork, third-party MCP servers, or Bedrock, Vertex, or Foundry routes. ZDR is enabled per organization; new organizations require separate enablement by the Anthropic account team. Disabled features such as Claude Code on the Web, Desktop cloud sessions, and `/feedback` are blocked at the backend regardless of client UI. Claude Fable 5 is unavailable under ZDR; the `best` alias resolves to Opus for ZDR organizations instead. Policy-violation sessions may still be retained for up to two years even when ZDR is enabled.
Privacy notesValidation, normalization, and migration process your JSON data and schema files locally; nothing leaves the machine beyond the npm package downloads from the registry.Zod validates data in-process only and does not transmit your schemas, inputs, or error output to any external service. Schemas that validate emails, passwords, or personal data remain entirely local; no input leaves your runtime environment through Zod itself.Screenshots are downscaled before model upload but may still capture sensitive UI content. Your terminal window is excluded from screenshots per official documentation. Redact customer or proprietary UI details before sharing screenshot evidence externally. Other visible apps are hidden while Claude works; still minimize sensitive windows before starting.ZDR review discussions often involve account emails, organization names, contract terms, and security architecture details that should stay in internal channels. Claude Code Analytics under ZDR does not store prompts or model responses but still collects productivity metadata such as account emails and usage statistics. Administrative data such as seat assignments and audit logs follow standard retention policies and remain in scope for compliance review. Third-party MCP servers, local logs, hooks, and customer-managed observability stacks are outside Anthropic ZDR and need separate review.
Prerequisites
  • Node.js 18+
  • ajv or zod
  • TypeScript 4.5+ (for Zod)
  • json-schema-to-typescript (optional, for type generation)
  • TypeScript 5.0+ (5.5+ recommended for best type inference)
  • zod ^3.22.0
  • Node.js 18+ or a modern browser with ES2020+ support
  • Basic TypeScript knowledge
  • Interactive Claude Code session on macOS v2.1.85+ with Pro or Max plan per computer-use docs.
  • computer-use MCP server enabled through /mcp for the project.
  • macOS Accessibility and Screen Recording permissions granted when prompted.
  • Disposable QA target app or simulator without live customer data on screen.
  • Claude for Enterprise account context and confirmation that Zero Data Retention is being evaluated or enabled.
  • Access to Anthropic account team or sales contact for ZDR enablement, because ZDR cannot be toggled from standard admin settings.
  • Inventory of Claude Code surfaces in use: terminal CLI, Desktop cloud sessions, web sessions, analytics, MCP servers, and third-party model routes.
  • Security, legal, or compliance stakeholders available to review scope boundaries and residual retention cases.
Install
npm i ajv
npm install zod
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.