json-yaml
Process JSON, YAML, CSV, and XML data (jq, yq, awk).
Best use case
json-yaml is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Process JSON, YAML, CSV, and XML data (jq, yq, awk).
Teams using json-yaml should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/json-yaml/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How json-yaml Compares
| Feature / Agent | json-yaml | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Process JSON, YAML, CSV, and XML data (jq, yq, awk).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# JSON / YAML / Data Processing
Transform and query structured data using `jq`, `yq`, and standard Unix tools.
## JSON with jq
Pretty print:
```
exec: cat /path/to/data.json | jq .
```
Extract field:
```
exec: cat /path/to/data.json | jq '.field.nested'
```
Extract from array:
```
exec: cat /path/to/data.json | jq '.[0].name'
```
Filter array:
```
exec: cat /path/to/data.json | jq '[.items[] | select(.status == "active")]'
```
Map / transform:
```
exec: cat /path/to/data.json | jq '[.users[] | {name: .name, email: .email}]'
```
Count items:
```
exec: cat /path/to/data.json | jq '.items | length'
```
Sort by field:
```
exec: cat /path/to/data.json | jq '.items | sort_by(.date) | reverse'
```
Group by:
```
exec: cat /path/to/data.json | jq '[.items[] | {key: .category, value: .}] | group_by(.key)'
```
Merge objects:
```
exec: jq -s '.[0] * .[1]' file1.json file2.json
```
Modify value in place:
```
exec: jq '.version = "2.0.0"' /path/to/package.json > /tmp/tmp.json && mv /tmp/tmp.json /path/to/package.json
```
JSON to CSV:
```
exec: cat /path/to/data.json | jq -r '.[] | [.name, .email, .age] | @csv'
```
## YAML with yq
Read field:
```
exec: yq '.metadata.name' /path/to/config.yaml
```
Set field:
```
exec: yq -i '.spec.replicas = 3' /path/to/deployment.yaml
```
Convert YAML to JSON:
```
exec: yq -o=json '.' /path/to/config.yaml
```
Convert JSON to YAML:
```
exec: yq -P '.' /path/to/data.json
```
Merge YAML files:
```
exec: yq eval-all '. as $item ireduce({}; . * $item)' base.yaml override.yaml
```
List array items:
```
exec: yq '.items[].name' /path/to/config.yaml
```
## CSV Processing
View CSV with column alignment:
```
exec: column -t -s',' /path/to/data.csv | head -20
```
Extract specific column (awk):
```
exec: awk -F',' '{print $1, $3}' /path/to/data.csv
```
Filter rows:
```
exec: awk -F',' '$3 > 100 {print $0}' /path/to/data.csv
```
Count unique values in a column:
```
exec: awk -F',' '{print $2}' /path/to/data.csv | sort | uniq -c | sort -rn
```
CSV to JSON (with jq):
```
exec: python3 -c "import csv, json, sys; r=csv.DictReader(open('$FILE')); print(json.dumps(list(r), indent=2))"
```
## XML (with xmllint or xq)
Format XML:
```
exec: xmllint --format /path/to/data.xml
```
XPath query:
```
exec: xmllint --xpath '//element/@attr' /path/to/data.xml
```
XML to JSON (with yq):
```
exec: yq -p=xml -o=json '.' /path/to/data.xml
```
## TOML (with yq v4+)
Read TOML:
```
exec: yq -p=toml '.' /path/to/config.toml
```
TOML to JSON:
```
exec: yq -p=toml -o=json '.' /path/to/config.toml
```
## Inline JSON from String
Parse inline:
```
exec: echo '{"name":"test","value":42}' | jq '.name'
```
Build JSON:
```
exec: jq -n --arg name "test" --arg val "42" '{name: $name, value: ($val | tonumber)}'
```
## Notes
- `jq` is usually pre-installed on macOS; install with `apt install jq` (Linux) or `brew install jq`.
- `yq` (Mike Farah's version) handles YAML/JSON/XML/TOML. Install: `brew install yq` or `snap install yq`.
- `xmllint` is part of `libxml2-utils` on Linux, pre-installed on macOS.
- All tools work cross-platform (macOS, Linux, Windows WSL).
- For very large files, consider streaming with `jq --stream` or `yq --stream`.Related Skills
json-visualization-dev
Develop and maintain the JSON Visualization web application - a Next.js tool for visualizing JSON/YAML/CSV/XML data as interactive graphs. Use when working with this codebase, adding features, fixing bugs, or understanding the graph visualization, data conversion, or type generation systems.
[invalid yaml with unclosed bracket
This YAML is malformed
json-canvas
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
file-to-json-parsing
Use AgentPMT external API to run the File To JSON Parsing tool with wallet signatures, credits purchase, or credits earned from jobs.
ash-json-api
AshJsonApi guidelines for exposing Ash resources as JSON:API compliant REST endpoints. Use when adding JSON:API extensions to domains/resources, configuring routes, or implementing filtering, sorting, pagination, and includes. Supports full JSON:API specification.
aria2-json-rpc
Interact with aria2 download manager via JSON-RPC 2.0. Manage downloads, query status, and control tasks through natural language commands. Use when working with aria2, download management, or torrent operations.
adf-json-example
Fetch raw ADF JSON data from a Confluence page URL. Use this skill when you need to see real-world ADF examples, understand how Confluence represents specific elements, debug ADF parsing, or create test samples.
adf-format-json-schema
Query Atlassian Document Format (ADF) JSON schema definitions to understand ADF node and mark types. Use this skill when implementing ADF dataclass nodes/marks, or when user asks about ADF structure, ADF nodes, ADF marks, or Atlassian Document Format implementation.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
moai-lang-r
R 4.4+ best practices with testthat 3.2, lintr 3.2, and data analysis patterns.
moai-lang-python
Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.
moai-icons-vector
Vector icon libraries ecosystem guide covering 10+ major libraries with 200K+ icons, including React Icons (35K+), Lucide (1000+), Tabler Icons (5900+), Iconify (200K+), Heroicons, Phosphor, and Radix Icons with implementation patterns, decision trees, and best practices.