Agent skill

Validating JSON Data

by Kilo-Org in Kilo-Org/kilo-marketplace

Validates JSON data against JSON Schema using the z-schema library.

MITAuto-check passedDevelopment

Install Validating JSON Data

skills CLI
$ npx skills add Kilo-Org/kilo-marketplace --skill validating-json-data -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kilo-Org/kilo-marketplace validating-json-data --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kilo-Org/kilo-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/validating-json-data .claude/skills/validating-json-data && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
validating-json-data
GitHub stars
189
Token cost
~2.7k tokens
SKILL.md length
421 words
Files
5 (incl. references)
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Validates JSON data against JSON Schema using the z-schema library.

  • The user needs to validate JSON
  • SKILL.md covers Quick start, Choosing a validation mode, Inspecting errors and Schema pre-compilation, plus 9 more sections
  • Calls npm
  • Check data against a schema

What it does

Validating JSON Data is an agent skill from Kilo-Org/kilo-marketplace. Validates JSON data against JSON Schema using the z-schema library. Use when the user needs to validate JSON, check data against a schema, handle validation errors, use custom format validators, work with JSON Schema drafts 04 through 2020-12, set up z-schema in a project, compile schemas with cross-references, resolve remote $ref, configure validation options, or inspect error details. Covers sync/async modes, safe error handling, schema pre-compilation, remote references, TypeScript types, and browser/UMD usage.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/draft-comparison.md`, `references/error-codes.md` and `references/options.md`).

It sits in Development, covering Type safety. The repository describes itself as: Kilo Marketplace - A curated collection of Skills, MCP Servers, and Modes for enhancing AI agent capabilities across the Kilo ecosystem—including Kilo Code (VS Code extension)… The licence is MIT.

When your agent uses it

  • The user needs to validate JSON
  • Check data against a schema
  • Handle validation errors
  • Use custom format validators

Example prompts

  • “Use the validating-json-data skill to validate JSON data against JSON Schema using the z-schema library”
  • “/validating-json-data”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit ff51758. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Validating JSON Data loads about 2.7k tokens when it runs, and up to ~9.1k if it reads all its reference files. Until then it costs about 135 tokens; SKILL.md has 421 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Kilo-Org/kilo-marketplace at commit ff51758, republished under its MIT licence (© Kilo-Org). 421 words, ~2,669 tokens.

Download SKILL.mdSave it as .claude/skills/validating-json-data/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
validating-json-data
description
Validates JSON data against JSON Schema using the z-schema library. Use when the user needs to validate JSON, check data against a schema, handle validation errors, use custom format validators, work with JSON Schema drafts 04 through 2020-12, set up z-schema in a project, compile schemas with cross-references, resolve remote $ref, configure validation options, or inspect error details. Covers sync/async modes, safe error handling, schema pre-compilation, remote references, TypeScript types, and browser/UMD usage.
metadata.category
development

Validating JSON Data with z-schema

z-schema validates JSON data against JSON Schema (draft-04, draft-06, draft-07, draft-2019-09, draft-2020-12). Default draft: draft-2020-12.

Quick start

typescript
import ZSchema from 'z-schema';

const validator = ZSchema.create();

const schema = {
  type: 'object',
  properties: {
    name: { type: 'string' },
    age: { type: 'integer', minimum: 0 },
  },
  required: ['name'],
};

// Throws on invalid data
validator.validate({ name: 'Alice', age: 30 }, schema);

Install: npm install z-schema

Choosing a validation mode

z-schema has four modes based on two toggles: async and safe. Pick the one that fits the use case.

ModeFactory callReturnsUse when
Sync throwZSchema.create()true or throws ValidateErrorDefault — simple scripts and middleware
Sync safeZSchema.create({ safe: true }){ valid, err? }Need to inspect errors without try/catch
Async throwZSchema.create({ async: true })Promise<true> or rejectsUsing async format validators
Async safeZSchema.create({ async: true, safe: true })Promise<{ valid, err? }>Async + non-throwing
Sync throw (default)
typescript
import ZSchema from 'z-schema';

const validator = ZSchema.create();

try {
  validator.validate(data, schema);
} catch (err) {
  // err is ValidateError
  console.log(err.details); // SchemaErrorDetail[]
}
Sync safe
typescript
const validator = ZSchema.create({ safe: true });

const result = validator.validate(data, schema);
if (!result.valid) {
  console.log(result.err?.details);
}

Or call .validateSafe() on a regular (throwing) validator for the same result shape:

typescript
const validator = ZSchema.create();
const { valid, err } = validator.validateSafe(data, schema);
Async throw

Required when using async format validators.

typescript
const validator = ZSchema.create({ async: true });

try {
  await validator.validate(data, schema);
} catch (err) {
  console.log(err.details);
}
Async safe
typescript
const validator = ZSchema.create({ async: true, safe: true });

const { valid, err } = await validator.validate(data, schema);

Inspecting errors

ValidateError has .details — an array of SchemaErrorDetail:

typescript
interface SchemaErrorDetail {
  message: string; // "Expected type string but found type number"
  code: string; // "INVALID_TYPE"
  params: (string | number | Array<string | number>)[];
  path: string | Array<string | number>; // "#/age" or ["age"]
  keyword?: string; // "type", "required", "minLength", etc.
  inner?: SchemaErrorDetail[]; // sub-errors from anyOf/oneOf/not
  schemaPath?: Array<string | number>;
  schemaId?: string;
}
Example: walking nested errors

Combinators (anyOf, oneOf, not) produce nested inner errors:

typescript
const { valid, err } = validator.validateSafe(data, schema);
if (!valid && err) {
  for (const detail of err.details) {
    console.log(`${detail.path}: [${detail.code}] ${detail.message}`);
    if (detail.inner) {
      for (const sub of detail.inner) {
        console.log(`  └─ ${sub.path}: [${sub.code}] ${sub.message}`);
      }
    }
  }
}
Filtering errors

Pass ValidateOptions as the third argument to include or exclude specific error codes:

typescript
// Only report type errors
validator.validate(data, schema, { includeErrors: ['INVALID_TYPE'] });

// Suppress string-length errors
validator.validate(data, schema, { excludeErrors: ['MIN_LENGTH', 'MAX_LENGTH'] });

For the full error code list, see references/error-codes.md.

Schema pre-compilation

Compile schemas at startup for better runtime performance and to resolve cross-references:

typescript
const validator = ZSchema.create();

const schemas = [
  {
    id: 'address',
    type: 'object',
    properties: { city: { type: 'string' }, zip: { type: 'string' } },
    required: ['city'],
  },
  {
    id: 'person',
    type: 'object',
    properties: {
      name: { type: 'string' },
      home: { $ref: 'address' },
    },
    required: ['name'],
  },
];

// Compile all schemas (validates them and registers references)
validator.validateSchema(schemas);

// Validate data using a compiled schema ID
validator.validate({ name: 'Alice', home: { city: 'Paris' } }, 'person');

Remote references

Manual registration
typescript
ZSchema.setRemoteReference('http://example.com/schemas/address.json', addressSchema);
// or per-instance:
validator.setRemoteReference('http://example.com/schemas/person.json', personSchema);
Automatic loading via schema reader
typescript
import fs from 'node:fs';
import path from 'node:path';

ZSchema.setSchemaReader((uri) => {
  const filePath = path.resolve(__dirname, 'schemas', uri + '.json');
  return JSON.parse(fs.readFileSync(filePath, 'utf8'));
});
Diagnosing missing references
typescript
const { valid, err } = validator.validateSafe(data, schema);
if (!valid && err) {
  const missing = validator.getMissingReferences(err);
  const remote = validator.getMissingRemoteReferences(err);
}

Custom format validators

Global (shared across all validator instances)
typescript
ZSchema.registerFormat('postal-code', (value) => {
  return typeof value === 'string' && /^\d{5}(-\d{4})?$/.test(value);
});
Instance-scoped
typescript
const validator = ZSchema.create();
validator.registerFormat('postal-code', (value) => {
  return typeof value === 'string' && /^\d{5}(-\d{4})?$/.test(value);
});
Via options at creation time
typescript
const validator = ZSchema.create({
  customFormats: {
    'postal-code': (value) => typeof value === 'string' && /^\d{5}(-\d{4})?$/.test(value),
  },
});
Async format validators

Return Promise<boolean>. Requires { async: true }.

typescript
const validator = ZSchema.create({ async: true });
validator.registerFormat('user-exists', async (value) => {
  if (typeof value !== 'number') return false;
  const user = await db.findUser(value);
  return user != null;
});
Listing registered formats
typescript
const formats = ZSchema.getRegisteredFormats();

Choosing a draft version

Set the draft explicitly if the schema targets a specific version:

typescript
const validator = ZSchema.create({ version: 'draft-07' });

Valid values: 'draft-04', 'draft-06', 'draft-07', 'draft2019-09', 'draft2020-12' (default), 'none'.

For a feature comparison across drafts, see references/draft-comparison.md.

Show full SKILL.md (161 more words)Show less

Common options

OptionDefaultPurpose
breakOnFirstErrorfalseStop validation at the first error
noEmptyStringsfalseReject empty strings as type string
noEmptyArraysfalseReject empty arrays as type array
strictModefalseEnable all strict checks at once
ignoreUnknownFormatsfalseSuppress unknown format errors (modern drafts always ignore)
formatAssertionsnullnull=always assert, true=respect vocabulary, false=annotation-only
reportPathAsArrayfalseReport error paths as arrays instead of JSON Pointer strings

For the full options reference, see references/options.md.

Validating sub-schemas

Target a specific path within a schema:

typescript
validator.validate(carData, fullSchema, { schemaPath: 'definitions.car' });

Browser usage (UMD)

html
<script src="node_modules/z-schema/umd/ZSchema.min.js"></script>
<script>
  var validator = ZSchema.create();
  try {
    validator.validate({ name: 'test' }, { type: 'object' });
  } catch (err) {
    console.log(err.details);
  }
</script>

TypeScript types

All types are exported from the package:

typescript
import type {
  JsonSchema, // Schema type (all drafts union)
  ZSchemaOptions, // Configuration options
  ValidateOptions, // Per-call options (schemaPath, includeErrors, excludeErrors)
  ValidateResponse, // { valid: boolean, err?: ValidateError }
  SchemaErrorDetail, // Individual error detail
  ErrorCode, // Error code string literal type
  FormatValidatorFn, // (input: unknown) => boolean | Promise<boolean>
  SchemaReader, // (uri: string) => JsonSchema
} from 'z-schema';

import { ValidateError } from 'z-schema';

Reference files

Important conventions

  • Always use ZSchema.create(options?) — never new ZSchema(). The factory returns the correctly typed variant.
  • Error details are on .details (not .errors).
  • Import types with import type { ... } and values with import { ValidateError }.
  • Default draft is draft2020-12. Specify explicitly if targeting an older draft.

© Kilo-Org, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/validating-json-data of Kilo-Org/kilo-marketplace.

  • SKILL.md
  • LICENSE
  • references/draft-comparison.md
  • references/error-codes.md
  • references/options.md

Open the folder on GitHubat commit ff51758

Compare with similar skills

Validating JSON Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Validating JSON Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Validating JSON Data this skillKilo-Org/kilo-marketplace189—~2.7kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k24 repos~4.2kAutomated safety check: PassMPL-2.0
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT

Similar skills

  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 24 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Rust Path Types

    openinterpreter/openinterpreter

    Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.

    69k GitHub starsUsed in 2 repos~605 tokens
    DevelopmentAuto-check passed

More from Kilo-Org/kilo-marketplace

All 87 skills in this repo
  • AzureML Project Scaffolding

    Kilo-Org/kilo-marketplace

    Sets up and maintains AzureML-ready Python projects as uv workspaces with devcontainers, a Makefile and job YAML, so local runs match cloud jobs and experiments stay reproducible.

    189 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check: notes
  • Jupyter Notebook Builder

    Kilo-Org/kilo-marketplace

    Creates, inspects, edits and runs Jupyter notebooks, scaffolding experiment or tutorial notebooks from templates and preferring a Jupyter MCP server over raw JSON edits.

    189 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Tableau Dashboard Creator

    Kilo-Org/kilo-marketplace

    Takes a plain-language dashboard request through brand setup, data exploration, planning, an interactive HTML mock and a Tableau implementation spec.

    189 GitHub stars~3.8k tokensUpdated 9 days ago
    Auto-check: notes
  • Elasticsearch File Ingest

    Kilo-Org/kilo-marketplace

    Ingest and transform data files (CSV/JSON/Parquet/Arrow IPC) into Elasticsearch with stream processing and custom transforms.

    189 GitHub stars~2.8k tokensUpdated 9 days ago
    Auto-check passed
  • Nifi Flow Layout

    Kilo-Org/kilo-marketplace

    A skill your agent uses when arranging Apache NiFi processors, process groups, ports, comments, numbering, crossing connections, dense fan-in/fan-out, or reusable readable canvas layouts.

    189 GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Splunk Ingest Processor Setup

    Kilo-Org/kilo-marketplace

    Render Cisco Data Fabric ingest-time routing workflows and Splunk Cloud Platform Ingest Processor setup plans with SPL2 pipelines, source types, destinations, lifecycle handoffs, queue and…

    189 GitHub stars~1.2k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Validating JSON Data

What does Validating JSON Data do?

Validates JSON data against JSON Schema using the z-schema library. Validating JSON Data is an agent skill from Kilo-Org/kilo-marketplace. Validates JSON data against JSON Schema using the z-schema library.

When should I use Validating JSON Data?

Validating JSON Data fits situations like: the user needs to validate JSON; check data against a schema; handle validation errors; use custom format validators.

How do I install Validating JSON Data in Claude Code?

Run `npx skills add Kilo-Org/kilo-marketplace --skill validating-json-data -a claude-code`. Or copy the skill folder (skills/validating-json-data in Kilo-Org/kilo-marketplace) into .claude/skills/validating-json-data in your project. Claude Code loads it when a task matches its description.

How do I install Validating JSON Data in Codex?

Run `npx skills add Kilo-Org/kilo-marketplace --skill validating-json-data -a codex`. Or copy the skill folder (skills/validating-json-data in Kilo-Org/kilo-marketplace) into .agents/skills/validating-json-data in your project. Codex loads it when a task matches its description.

Can I use Validating JSON Data in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kilo-Org/kilo-marketplace --skill validating-json-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/validating-json-data, .gemini/skills/validating-json-data, .github/skills/validating-json-data and .opencode/skills/validating-json-data in your project.

What does Validating JSON Data need to run?

Going by SKILL.md and its folder, Validating JSON Data needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Validating JSON Data access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Validating JSON Data safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Validating JSON Data use?

Validating JSON Data is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Validating JSON Data use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.5k tokens, read only when the agent opens those files.

What are the alternatives to Validating JSON Data?

Skills that share tags, products or a category with Validating JSON Data: Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars), Kedro Babysit (kedro-org/kedro, 11k stars) and Dignified Python Standards (docling-project/docling, 68k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Validating JSON Data?

Kilo-Org (a GitHub organization) maintains it in Kilo-Org/kilo-marketplace, which has 189 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 28, 2026.

Source: Kilo-Org/kilo-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.