add-json-schema-association

Registers JSON schemas to Monaco for completion, validation, and hover on matched files.

Updated May 13, 2026
One-click install
npx skills add https://github.com/lovebirdsx/universe-editor --skill add-json-schema-association-lovebirdsx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-json-schema-association
Source: https://github.com/lovebirdsx/universe-editor/tree/main/.claude/skills/add-json-schema-association
Command: npx skills add https://github.com/lovebirdsx/universe-editor --skill add-json-schema-association-lovebirdsx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you add a new kind of JSON file to the Universe Editor (e.g. *.entity.json), Monaco gives no completion, validation, or hover hints unless a schema is registered. This Skill guides you through wiring a schema association into the editor's existing JSONContributionRegistry pipeline without writing new plumbing. ## Core Features & Use Cases - Three source paths: choose between extension contributes.jsonValidation (path A, the default), user json.schemas settings (path B), or a built-in declaration table (path C) depending on where the schema should live. - Local and remote schemas: inline schema objects, local schema files read and inlined by the extension host, or remote http(s) schemas downloaded in the main process with caching, ETag revalidation, and a trusted-domain whitelist. - Testing and verification guidance: exact test files to extend for each path plus manual end-to-end checks in the dev editor. - Use Case: You create a declaration-only extension with a package.json containing a jsonValidation contribution and a schemas/entity.json file, and every **/*.entity.json opened in the editor immediately gets completion, warning-level validation, and hover descriptions. ## Quick Start Ask the AI to add schema completion and validation for a new JSON file type such as *.entity.json using this skill.

Frequently Asked Questions about add-json-schema-association

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add JSON schema validation for a custom file type in Monaco?

Register a schema contribution with a fileMatch glob and an inline schema object into the JSONContributionRegistry. The bridge contribution automatically pushes it to Monaco's JSON language service, enabling completion, validation, and hover.

How do I create a VSCode-style jsonValidation extension contribution?

Create an extension directory with a package.json containing a contributes.jsonValidation entry with fileMatch patterns and a url pointing to a local schema file or remote http address. Declaration-only extensions need no main entry or build step.

Why does Monaco not load my JSON schema file directly?

Monaco is configured with schemaRequest set to ignore, so the JSON worker never fetches schema files itself. Any file-based schema must be read, parsed with JSON.parse, and registered as an inline object first.

Can I use a remote http JSON schema with Monaco?

Yes, remote schemas are downloaded in the main process with caching, ETag revalidation, and offline fallback. The renderer checks a trusted-domain whitelist before registering, and non-whitelisted domains are skipped with a warning.

Why do unknown keys show as warnings instead of errors in JSON validation?

The editor sets schemaValidation to warning, so schema violations and unknown keys appear as yellow squiggles rather than red errors. Using additionalProperties false enables strict mode but should be avoided for file types that gain fields dynamically.