jq-json-processor

Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.

3,891 stars

Best use case

jq-json-processor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.

Teams using jq-json-processor 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

$curl -o ~/.claude/skills/jq-json-processor/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/arnarsson/jq-json-processor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/jq-json-processor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How jq-json-processor Compares

Feature / Agentjq-json-processorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.

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.

Related Guides

SKILL.md Source

# jq JSON Processor

Process, filter, and transform JSON data with jq.

## Quick Examples

### Basic filtering
```bash
# Extract a field
echo '{"name":"Alice","age":30}' | jq '.name'
# Output: "Alice"

# Multiple fields
echo '{"name":"Alice","age":30}' | jq '{name: .name, age: .age}'

# Array indexing
echo '[1,2,3,4,5]' | jq '.[2]'
# Output: 3
```

### Working with arrays
```bash
# Map over array
echo '[{"name":"Alice"},{"name":"Bob"}]' | jq '.[].name'
# Output: "Alice" "Bob"

# Filter array
echo '[1,2,3,4,5]' | jq 'map(select(. > 2))'
# Output: [3,4,5]

# Length
echo '[1,2,3]' | jq 'length'
# Output: 3
```

### Common operations
```bash
# Pretty print JSON
cat file.json | jq '.'

# Compact output
cat file.json | jq -c '.'

# Raw output (no quotes)
echo '{"name":"Alice"}' | jq -r '.name'
# Output: Alice

# Sort keys
echo '{"z":1,"a":2}' | jq -S '.'
```

### Advanced filtering
```bash
# Select with conditions
jq '[.[] | select(.age > 25)]' people.json

# Group by
jq 'group_by(.category)' items.json

# Reduce
echo '[1,2,3,4,5]' | jq 'reduce .[] as $item (0; . + $item)'
# Output: 15
```

### Working with files
```bash
# Read from file
jq '.users[0].name' users.json

# Multiple files
jq -s '.[0] * .[1]' file1.json file2.json

# Modify and save
jq '.version = "2.0"' package.json > package.json.tmp && mv package.json.tmp package.json
```

## Common Use Cases

**Extract specific fields from API response:**
```bash
curl -s https://api.github.com/users/octocat | jq '{name: .name, repos: .public_repos, followers: .followers}'
```

**Convert CSV-like data:**
```bash
jq -r '.[] | [.name, .email, .age] | @csv' users.json
```

**Debug API responses:**
```bash
curl -s https://api.example.com/data | jq '.'
```

## Tips

- Use `-r` for raw string output (removes quotes)
- Use `-c` for compact output (single line)
- Use `-S` to sort object keys
- Use `--arg name value` to pass variables
- Pipe multiple jq operations: `jq '.a' | jq '.b'`

## Documentation

Full manual: https://jqlang.github.io/jq/manual/
Interactive tutorial: https://jqplay.org/

Related Skills

Insurance Claims Processor

3891
from openclaw/skills

Process, analyze, and optimize insurance claims. Covers property, liability, workers' comp, auto, and professional indemnity.

Finance & Legal

evomap-work-processor

3891
from openclaw/skills

Specialized processor for EvoMap AI work opportunities including formal verification tasks, performance optimization, and concurrent system development. Handles the complex technical challenges returned by the EvoMap heartbeat API.

json2video-pinterest

3891
from openclaw/skills

Generate Pinterest-optimized vertical videos using JSON2Video API. Supports AI-generated or URL-based images, AI-generated or provided voiceovers, optional subtitles, and zoom effects. Use when creating video content for Pinterest affiliate marketing, creating vertical social media videos, automating video production with JSON2Video API, or generating videos with voiceovers and subtitles.

aria2-json-rpc

3891
from openclaw/skills

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.

openclaw-json-editing

3891
from openclaw/skills

Advanced JSON editing for OpenClaw configuration files, tools, and data structures. Handles JSON5 configs, schema validation, merge patching, env var substitution, and type-safe modifications.

yaml-to-json

3891
from openclaw/skills

Convert YAML to JSON format

xml-to-json

3891
from openclaw/skills

Convert XML to JSON format

json-validate

3891
from openclaw/skills

"Validate JSON syntax and structure"

json-to-yaml

3891
from openclaw/skills

Convert JSON to YAML format

json-to-csv

3891
from openclaw/skills

"Convert JSON array of objects to CSV format"

json-pretty

3891
from openclaw/skills

"Pretty print JSON with indentation"

json-flatten

3891
from openclaw/skills

Flatten nested JSON objects