# JSON schema

> JSON schema is an open-source agent skill for developer tools. Writes, reviews, bundles and upgrades JSON Schema 2020-12 documents for the agent. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/json-schema
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** json-schema
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill teaches an agent to author and review JSON Schema documents, pick the right dialect through $schema, and wire up $id, $ref, $anchor, $dynamicRef and $defs so references resolve without network fetches. It covers composing subschemas with allOf, anyOf, oneOf, not and conditionals, and closing objects with unevaluatedProperties when properties come from several branches.

The skill works through a fixed sequence: choose the version, identify the resources, write the structure, compose and close, decide how format is treated, then bundle or upgrade if needed. It includes a checklist for verifying the result against the meta-schema and for confirming that no legacy keywords such as definitions or array-form items remain. Older drafts (draft-04, draft-06, draft-07 and 2019-09) are covered as upgrade sources, and preview lines are tracked but not emitted.

The skill is plain instructions with reference files and no scripts. Running the sample instances requires a 2020-12 validator in the user's environment.

## When your agent uses it

> JSON Schema 2020-12: write, review, bundle and upgrade schemas with the Core and Validation vocabularies. Covers JSON Schema 2020-12 (current), JSON Schema 2019-09 (supported), draft-07, draft-06 and draft-04 (legacy, upgrade from), and tracks two previews: the IETF draft-ietf-jsonschema-json-schema-03 and the unreleased JSON Schema v1/2026. Use when authoring or reviewing a schema, picking a $schema dialect, using $id, $ref, $anchor, $dynamicRef and $defs, composing with allOf, anyOf, oneOf, not and if/then/else, closing objects with additionalProperties or unevaluatedProperties, writing tuples with prefixItems, deciding whether format asserts or only annotates, producing basic or detailed output, bundling into a Compound Schema Document, declaring a dialect with $vocabulary, or upgrading from older drafts (definitions to $defs, dependencies split, $recursiveRef to $dynamicRef, array items to prefixItems). Triggers: JSON Schema, $schema, meta-schema, application/schema+json, OpenAPI 3.1 Schema Object.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/json-schema)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/json-schema)

## Features

- **Dialect and version selection:** Guides choosing the $schema dialect and deciding between 2020-12, 2019-09 and legacy drafts.
- **Identifiers and references:** Covers $id, $anchor, $ref, $dynamicRef and $defs for resolving references offline.
- **Composition and closed objects:** Explains allOf, anyOf, oneOf, not, conditionals and unevaluatedProperties for closing objects.
- **Format assertion handling:** Explains that format is annotation-only by default and how to enable assertion.
- **Bundling schemas:** Describes bundling external resources into a single root schema without changing results.
- **Upgrade from older drafts:** Lists the steps for moving draft-04, draft-06, draft-07 and 2019-09 schemas to 2020-12.

## Good for

- Write a JSON Schema 2020-12 for an API payload
- Review an existing schema for unclosed objects or misused format
- Bundle several schema files into one self-contained document
- Upgrade a draft-07 schema to 2020-12
- Close an object across allOf using unevaluatedProperties

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/json-schema`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/json-schema &&
cp -R "$tmp/.agents/skills/json-schema" ~/.claude/skills/json-schema &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/json-schema` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/json-schema` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/json-schema &&
cp -R "$tmp/.agents/skills/json-schema" ~/.agents/skills/json-schema &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/json-schema` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/json-schema` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/json-schema &&
cp -R "$tmp/.agents/skills/json-schema" ~/.cursor/skills/json-schema &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/json-schema` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/json-schema
```

Or copy the folder to `~/.gemini/skills/json-schema` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/json-schema`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/json-schema &&
cp -R "$tmp/.agents/skills/json-schema" ~/.copilot/skills/json-schema &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/json-schema` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/json-schema` into your agent's skills folder as `json-schema`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which JSON Schema version does the skill target by default?

It uses 2020-12 as the default. 2019-09 is supported for named consumers that cannot read 2020-12, and older drafts are treated as upgrade sources only.

### Does the skill check whether format values are enforced?

It states that format is an annotation by default and only asserts when the dialect declares the Format-Assertion vocabulary or the validator option is enabled.

### What does the skill need to run?

The skill has no scripts. Verifying samples requires a 2020-12 validator, which the user must provide.

### Where can JSON schema be installed?

It is listed in the Claude Code plugin marketplace as part of better-supabase and can be added with npx skills add ScaleDockHQ/scaledock-skills --skill json-schema.

### How do I install JSON schema in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/json-schema to use it in all your projects, or to .claude/skills/json-schema in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does JSON schema run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use JSON schema?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to JSON schema?

The closest alternatives to JSON schema are Contract design, Document API endpoint, Declarative agents, Agent skills and JSON rpc.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Contract design](https://ai-powered.com/skills/contract-design): Contract design is an open-source agent skill for developer tools.
- [Document API endpoint](https://ai-powered.com/skills/document-api-endpoint): Document API endpoint is an open-source agent skill for files and documents.
- [Declarative agents](https://ai-powered.com/skills/declarative-agents): Declarative agents is an open-source agent skill for developer tools.
- [Agent skills](https://ai-powered.com/skills/agent-skills): Agent skills is an open-source agent skill for developer tools.
- [JSON rpc](https://ai-powered.com/skills/json-rpc): JSON rpc is an open-source agent skill for developer tools.
- [Asyncapi](https://ai-powered.com/skills/asyncapi): Asyncapi is an open-source agent skill for developer tools.
- [Openapi spec generator](https://ai-powered.com/skills/openapi-spec-generator): Openapi spec generator is an open-source agent skill for developer tools.
- [JSON pointer](https://ai-powered.com/skills/json-pointer): JSON pointer is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/json-schema
