Skip to content

JSON Transformer

Verified

Reshapes, merges, filters, and transforms JSON data structures using declarative mappings with schema validation and diff output.

By Anthropic 5,100 v1.0.1 Updated 2026-03-10

Install

Claude Code

Copy the SKILL.md file to your project's .claude/skills/ directory

About This Skill

JSON Transformer solves the universal developer problem of moving data between systems that speak different JSON dialects. Instead of writing one-off transformation scripts, it generates reusable, documented mapping code.

Transformation Operations

Field Mapping Rename, move, and restructure fields with a declarative mapping: ``` source: { user: { first_name, last_name } } target: { name: { given, family } } ```

Data Type Coercion - String → number with locale-aware parsing - ISO date strings ↔ Unix timestamps - Nested objects ↔ dot-notation strings - Arrays ↔ comma-separated strings

Filtering and Projection - Include/exclude fields by path or pattern - Filter array elements by predicate - Remove null, undefined, or empty values

Array Operations - Flatten nested arrays - Group array items by a key field - Deduplicate by composite key - Sort by field with null handling

Merging - Deep merge with conflict resolution strategies (left-wins, right-wins, merge-arrays) - Join two arrays by matching key - Aggregate (sum, count, average) across grouped records

Code Generation

  • Outputs transformation as:
  • JavaScript/TypeScript function with full typing
  • Python function with type hints
  • jq expression for command-line use
  • JSONata expression for low-code platforms

Validation

Generates JSON Schema for both input and output, with example test cases.

Use Cases

  • Reshaping API response payloads to match frontend data models
  • Merging multiple JSON datasets with overlapping keys
  • Converting nested JSON structures to flat tabular format
  • Generating TypeScript interface definitions from JSON samples

Pros & Cons

Pros

  • + Declarative approach generates reusable, documented transformation code
  • + Multiple output languages — JS, Python, jq, JSONata
  • + Schema generation for both input and output
  • + Handles complex merge and deduplication scenarios

Cons

  • - Very large JSON files (100MB+) may need streaming processing not covered by this skill
  • - Complex conditional transformations may still require custom logic

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警