json-schema-author

json-schema-author is a skill for Claude Code, Codex from JayRHa/AgentSkills. It costs 100 tokens per session (2,088 once invoked), scanned A, original, MIT.

A guide for writing and checking JSON Schema, a format that describes which data fields and values are allowed in configuration files and web APIs.

In plain words
What is it for?
Use it to create or repair schemas, set rules for types and values, reuse schema parts, add conditional requirements, and validate configuration or API data.
Why use it?
It helps prevent invalid data and turns technical validation failures into messages people can understand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create or repair schemas, set rules for types and values, reuse schema parts, add conditional requirements, and validate configuration or API data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jayrha/agentskills/json-schema-author
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JayRHa/AgentSkills --skill json-schema-author
Clone the repo
git clone --depth 1 https://github.com/JayRHa/AgentSkills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for json-schema-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/jayrha/agentskills/json-schema-author/github.svg)](https://agentmods.dev/skills/jayrha/agentskills/json-schema-author)
Your own site
<a href="https://agentmods.dev/skills/jayrha/agentskills/json-schema-author"><img src="https://agentmods.dev/badge/skills/jayrha/agentskills/json-schema-author/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for json-schema-author

Your own site · 80×15
<a href="https://agentmods.dev/skills/jayrha/agentskills/json-schema-author"><img src="https://agentmods.dev/badge/skills/jayrha/agentskills/json-schema-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,088 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.02088
Opus 5.5 $0.00040 $0.00835
Sonnet 5.5 $0.00020 $0.00418
Haiku 4.5 $0.00010 $0.00209

Measured 1mo ago against content hash fac9154cef8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

json-schema-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

json-schema-author/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JSON Schema Author

Overview

Keywords: JSON Schema, Draft 2020-12, Draft-07, $schema, $ref, $defs, validation, config schema, API schema, OpenAPI, additionalProperties, oneOf, anyOf, allOf, if/then/else, format, pattern, const, enum, error messages, ajv, jsonschema.

This skill helps you design correct, strict, and maintainable JSON Schemas for two dominant use cases: configuration files (validate user/operator input, fail fast with helpful messages) and APIs (contract for request/response bodies, often embedded in OpenAPI). It covers the type system, every important constraint keyword, schema composition, reuse via $ref/$defs, conditional validation, and turning raw validator output into actionable error messages.

Use the bundled material:

  • references/keywords.md — complete keyword reference (types, constraints, composition, applicators, annotations, draft differences) with copy-paste snippets.
  • references/error-messages.md — patterns for clear, user-facing validation errors and how to map validator output to them.
  • templates/config-schema.json — a strict, annotated starting point for a config-file schema.
  • templates/api-schema.json — request/response schema pattern suitable for OpenAPI components.schemas.
  • scripts/validate.py — stdlib-only structural linter that flags the most common schema authoring mistakes; falls back to jsonschema if installed for real validation.
  • examples/config-walkthrough.md — sample config JSON turned into a finished schema with passing and failing instances.

Workflow

  1. Pick the draft. Default to Draft 2020-12 for new schemas ($schema: "https://json-schema.org/draft/2020-12/schema"). Use Draft-07 when targeting tooling that lags (older ajv configs, many OpenAPI 3.0 toolchains). OpenAPI 3.1 aligns with 2020-12. Note the differences: 2020-12 uses $defs and prefixItems/items; Draft-07 uses definitions and items (array)/additionalItems. See references/keywords.md.

  2. Identify the root type and intent. Is this a config object, an API request, an API response, or a reusable component? Decide whether unknown keys are errors (config → almost always "additionalProperties": false) or tolerated (forward-compatible APIs may allow them).

Read the full file on GitHub · 106 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 106 lines · 100 tokens per session scan A fac9154cef8c

Subscribe to this mod's changes

json-schema-author is a skill published in the GitHub repository JayRHa/AgentSkills (12 stars, last pushed 2mo ago), licensed MIT. It adds 100 tokens to every session and 2,088 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

legacy-modernizer

Use when modernizing legacy systems, implementing incremental migration strategies, or reducing technical debt. Invoke for strangler fig pattern, monolith decomposition, framework upgrades.

zacklecon/claude-skills · 35 tokens

microservices-architect

Use when designing distributed systems, decomposing monoliths, or implementing microservices patterns. Invoke for service boundaries, DDD, saga patterns, event sourcing, service mesh, distributed tracing.

zacklecon/claude-skills · 43 tokens

salesforce-developer

Use when developing Salesforce applications, Apex code, Lightning Web Components, SOQL queries, triggers, integrations, or CRM customizations. Invoke for governor limits, bulk processing, platform events, Salesforce DX.

zacklecon/claude-skills · 45 tokens

spring-boot-engineer

Use when building Spring Boot 3.x applications, microservices, or reactive Java applications. Invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration.

zacklecon/claude-skills · 43 tokens

api-designer

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

zacklecon/claude-skills · 39 tokens

csharp-developer

Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Invoke for Entity Framework Core, minimal APIs, async patterns, CQRS with MediatR.

zacklecon/claude-skills · 47 tokens