What it does
JSON Transformer handles any JSON task: renaming keys, flattening nested arrays, merging two objects, extracting only the fields you need, or mapping an API response to your internal data model. Describe the transformation in plain English ("rename userId to user_id, flatten the address object, drop the metadata field") and it writes the jq filter, JavaScript map function, or Python dict comprehension — whichever fits your environment.
It also validates JSON against a schema, generates TypeScript interfaces and Zod schemas from a sample JSON payload, and converts between formats. When converting to CSV, it handles nested arrays intelligently — flattening or expanding rows based on what makes the resulting table useful. Every output includes a step-by-step explanation so you understand what each transformation does and can modify it confidently.
How to install
npx skills add user/json-transformer
The command fetches the skill definition, validates the schema, and registers it with your Claude Code environment. Stored in .claude/skills/ — no global installs required.
How to use
Paste your JSON payload and describe the desired output:
Transform this JSON: [paste JSON] Goal: [describe desired output]
Claude analyzes the structure and writes the transformation code. Here's a typical output mapping an API response to a flat internal model:
// Transform: rename userId→user_id, flatten address, drop metadata const transformed = users.map(user => ({ user_id: user.userId, name: user.name, email: user.email, street: user.address?.street, city: user.address?.city, country: user.address?.country, // metadata intentionally omitted })); // Result shape: // { user_id, name, email, street, city, country }
Follow up with "now generate a TypeScript interface for the output shape" or "write a Zod schema to validate this" to continue refining.
Configuration
Steer the output format or tool choice with inline instructions:
# TypeScript interface generation Transform this JSON: [...] Generate a TypeScript interface for this JSON # jq filter output Transform this JSON: [...] Write a jq filter for this transformation # CSV conversion with expanded nested arrays Transform this JSON: [...] Convert to CSV with nested arrays expanded
Tip: For large JSON payloads, paste a representative sample (3–5 array items) rather than the full dataset. The skill infers the complete schema from the sample and generates transformations that work on any size payload.
Related skills
Combine JSON Transformer with CSV Analyzer to go from raw API data to tabular insights in one workflow. Use API Designer when you need to design the schema from scratch, and SQL Query Builder to query transformed data stored in a database.