# Validate JSON data and config files against schemas with ajv-cli

> Run schema checks from the shell or CI so malformed JSON, JSON5, or YAML inputs fail before they reach downstream tooling.

- Skill: `agentskillexchange/validate-json-data-and-config-files-against-schemas-with-ajv` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/validate-json-data-and-config-files-against-schemas-with-ajv`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/validate-json-data-and-config-files-against-schemas-with-ajv/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/validate-json-data-and-config-files-against-schemas-with-ajv

---


# Validate JSON data and config files against schemas with ajv-cli

Run schema checks from the shell or CI so malformed JSON, JSON5, or YAML inputs fail before they reach downstream tooling.

## Prerequisites

Node.js, ajv-cli, one or more JSON Schema or JTD files, and target JSON, JSON5, or YAML data files

## Installation

Use the upstream install or setup path that matches your environment:
- npm install -g ajv-cli

Requirements and caveats from upstream:
- Multiple schemas can be passed both by using this parameter multiple times and with [glob patterns](https://github.com/isaacs/node-glob#glob-primer). Glob pattern should be quoted and extensions cannot be omitted.
- These modules can be written in TypeScript if you have ts-node installed.
- Multiple schemas can be passed both by using this parameter multiple times and with [glob patterns](https://github.com/isaacs/node-glob#glob-primer).

Basic usage or getting-started notes:
- sh
- ## JSON schema language and version
- Parameter --spec can be used with all commands (other than help) to choose JSON schema language:

- Source: https://github.com/ajv-validator/ajv-cli
- Extracted from upstream docs: https://raw.githubusercontent.com/ajv-validator/ajv-cli/HEAD/README.md

## Documentation

- https://github.com/ajv-validator/ajv-cli

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/validate-json-data-and-config-files-against-schemas-with-ajv-cli/)

