Claude Code Plugins

Community-maintained marketplace

Feedback

Work with JSON data. Use for parsing API responses, config files, or structured data storage.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name json-handling
description Work with JSON data. Use for parsing API responses, config files, or structured data storage.

JSON Handling

Parse, create, and manipulate JSON data.

Quick Start

import json

# Parse JSON string
data = json.loads('{"name": "John", "age": 30}')

# Create JSON string
json_str = json.dumps({"name": "John"}, indent=2)

# Read JSON file
with open("data.json") as f:
    data = json.load(f)

# Write JSON file
with open("output.json", "w") as f:
    json.dump(data, f, indent=2)

Common Patterns

Safe parsing

def safe_json_loads(text: str, default=None):
    try:
        return json.loads(text)
    except json.JSONDecodeError:
        return default

data = safe_json_loads(maybe_json, default={})

Navigate nested data

def get_nested(data: dict, *keys, default=None):
    for key in keys:
        if isinstance(data, dict):
            data = data.get(key, default)
        elif isinstance(data, list) and isinstance(key, int):
            data = data[key] if key < len(data) else default
        else:
            return default
    return data

value = get_nested(response, "data", "users", 0, "name")

Custom serialization

from datetime import datetime

def json_serializer(obj):
    if isinstance(obj, datetime):
        return obj.isoformat()
    raise TypeError(f"Type {type(obj)} not serializable")

json.dumps(data, default=json_serializer)

Merge JSON objects

base = {"a": 1, "b": 2}
override = {"b": 3, "c": 4}
merged = {**base, **override}  # {"a": 1, "b": 3, "c": 4}