一键导入
json
Parse, validate, transform, and manipulate JSON data. Use for JSON operations, schema validation, and data transformation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Parse, validate, transform, and manipulate JSON data. Use for JSON operations, schema validation, and data transformation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Work with Excel spreadsheets (XLSX/XLS/CSV) - read data, create spreadsheets, convert formats, analyze data, and generate reports. Use when the user asks to work with Excel files or spreadsheet data.
Generate unit tests, integration tests, and test data. Use when writing tests, improving test coverage, or creating test scenarios.
Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.
Refactor code to improve quality, apply SOLID principles, remove code smells, and suggest better patterns. Use when improving code structure or modernizing legacy code.
Work with PowerPoint presentations (PPTX/PPT) - read slides, extract content, create presentations, convert formats, and generate slide decks. Use when the user asks to work with PowerPoint files or presentations.
Work with PDF files - read, extract text/images/tables, create PDFs, merge, split, and convert PDFs. Use when the user asks to read, create, modify, or analyze PDF documents.
| name | json |
| description | Parse, validate, transform, and manipulate JSON data. Use for JSON operations, schema validation, and data transformation. |
| allowed-tools | Read, Write, Bash |
Work with JSON data efficiently.
Using jq:
# Pretty print
cat data.json | jq '.'
# Select field
cat data.json | jq '.users[0].name'
# Filter arrays
cat data.json | jq '.users[] | select(.age > 18)'
# Map transformation
cat data.json | jq '.users[] | {name, email}'
# Count elements
cat data.json | jq '.users | length'
Python:
import json
import jsonschema
schema = {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "number", "minimum": 0}
},
"required": ["name", "age"]
}
data = {"name": "John", "age": 30}
jsonschema.validate(instance=data, schema=schema)
jq transformations:
# Rename keys
jq '.users[] | {fullName: .name, emailAddress: .email}'
# Flatten nested structure
jq '[.users[] | {name, city: .address.city}]'
# Group by
jq 'group_by(.category) | map({category: .[0].category, items: .})'
# Merge objects
jq '. + {newField: "value"}'
JSON to CSV:
jq -r '.[] | [.name, .email, .age] | @csv' data.json > output.csv
JSON to YAML:
python -c "import json, yaml; print(yaml.dump(json.load(open('data.json'))))"
Use /json for JSON parsing, validation, transformation, and conversion tasks.