From json-mapper
Map, transform, or convert source data into JSON that conforms to a target JSON Schema, then validate it. Use this skill whenever a user wants to fit, shape, mold, coerce, or restructure data (CSV, spreadsheets, JSON, XML, API payloads, or free-form text/documents) into a given JSON Schema, populate a schema from data, "make this data match this schema," build a conforming JSON instance, or check whether data satisfies a schema. Trigger it even when the user just provides some data and a schema and asks to "fill it in" or "convert it," without saying the words "map" or "JSON Schema." The skill resolves ambiguous field mappings by asking the user targeted questions rather than guessing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/json-mapper:json-mapperThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn arbitrary source data into a JSON document that conforms to a target JSON Schema, asking
Turn arbitrary source data into a JSON document that conforms to a target JSON Schema, asking the user to resolve genuine ambiguities along the way, and validate the result.
The whole point of this skill is to not silently guess when a mapping decision is unclear. A wrong-but-plausible guess that passes validation is worse than asking, because it produces confidently-incorrect data. So the skill is built around distinguishing "I can map this confidently" from "this needs the user's call."
You need (a) the source data and (b) the target schema.
file-reading
skill's guidance for the right tool per format — PDFs, xlsx, docx, etc.).$schema. If it's older than draft 2020-12, say so — some
keyword behavior in the reference won't apply.Walk the schema and build a picture of what conforming data must look like:
$ref / $defs so you know the real shape of every field.oneOf/anyOf/if-then-else/dependentSchemas branching.additionalProperties/unevaluatedProperties is false (surplus source
fields must be dropped, not carried over).When you hit a keyword you're unsure about, read
references/json-schema-2020-12.md for its mapping semantics.
For each field the schema expects, decide which bucket it falls into:
"42" → 42 when the schema wants a number). Map these directly.Gather all the open questions and ask them together in a single, scannable message (grouped, numbered, with your best-guess default noted for each). Asking ten questions across ten turns is exhausting; one well-organized batch respects the user's time. On a chat client, tappable options are ideal for choice-style questions.
Ask when:
enum/const and the right member isn't obvious
(e.g. source "M" → "male"? "medium"?).oneOf/anyOf branch must be chosen and the data fits more than one (or none) cleanly.01/02/2023: Jan 2 or Feb 1?),
units, currency, number-vs-string, timezone assumptions, splitting one field into several
or combining several into one.additionalProperties: false — confirm
it should be dropped.default exists for a missing field — confirm whether to write it in (defaults are NOT
auto-applied by validation).Don't ask when the answer is unambiguous, already stated, or trivially inferable — that just adds friction. Calibrate: confident moves are silent; real forks get a question.
State any assumptions you did make inline alongside the result, so the user can catch a wrong guess even on the fields you didn't ask about.
Build the instance from the confident mappings plus the user's answers. Honor exact-match
keywords (enum, const), convert format values to what the schema expects (see the
reference), respect required, and drop fields that have no place under a closed schema.
Preserve numeric precision.
Run the validator and show the result:
python scripts/validate.py <instance.json> <schema.json>
It auto-detects the dialect from $schema (defaults to draft 2020-12) and reports every
error with its instance location (JSON Pointer), the failing keyword, and a message. Add
--json for machine-readable output.
Provide the conforming JSON inline in the chat so the user can read it, and save it
as a .json file and present it for download. If validation still has unresolved errors,
say so clearly next to the output rather than implying it's clean.
Source (CSV row): name=Jane Doe, dob=03/04/1990, gender=F, status=active
Target schema (excerpt): birthDate (format: date, required), sex (enum: ["male","female","other"]), accountState (enum: ["ACTIVE","SUSPENDED","CLOSED"])
Confident: name → fullName. Mapped silently.
Batched questions:
dob 03/04/1990 → birthDate needs YYYY-MM-DD. Is this March 4 (US MM/DD) or April 3 (DD/MM)?gender=F → sex enum. Map to "female"? (best guess: yes)status=active → accountState enum is uppercase. Map to "ACTIVE"? (best guess: yes)After answers, produce the instance, validate, deliver inline + file.
scripts/validate.py — validates an instance against a schema (draft 2020-12 aware), reports all errors.references/json-schema-2020-12.md — keyword-by-keyword semantics for mapping and explaining errors. Read it when a keyword's behavior matters.Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub guidogl/json-mapper --plugin json-mapper