# Jq

> >

- **Type:** Skill
- **Install:** `agentstack add skill-geronimo-iia-agent-skills-jq`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [geronimo-iia](https://agentstack.voostack.com/s/geronimo-iia)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [geronimo-iia](https://github.com/geronimo-iia)
- **Source:** https://github.com/geronimo-iia/agent-skills/tree/main/jq
- **Website:** https://geronimo-iia.github.io/agent-skills/

## Install

```sh
agentstack add skill-geronimo-iia-agent-skills-jq
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# jq - JSON Processor

## When to use this skill

Parse and manipulate JSON data from command line. Extract fields, filter arrays, transform structures, or format JSON output.

## Quick start

```bash
# Pretty print JSON
echo '{"name":"John","age":30}' | jq '.'

# Extract field
echo '{"name":"John","age":30}' | jq '.name'

# Filter array
echo '[{"name":"John"},{"name":"Jane"}]' | jq '.[0]'

# Transform
echo '{"name":"John"}' | jq '{user: .name}'
```

## Common commands

```bash
# Basic queries
jq '.'                          # Pretty print
jq '.field'                     # Extract field
jq '.field.nested'              # Nested field
jq '.[]'                        # Array elements

# Filtering
jq '.[] | select(.age > 25)'    # Filter array
jq 'map(select(.active))'       # Filter with map
jq '.[] | select(.name == "John")'  # Exact match

# Transformation
jq '{name: .user, id: .userId}' # Reshape object
jq 'map({name, age})'           # Extract fields from array
jq '.[] | {name, age}'          # Transform array elements

# Array operations
jq 'length'                     # Array/object length
jq 'keys'                       # Object keys
jq 'sort_by(.age)'              # Sort array
jq 'group_by(.type)'            # Group array

# Output formats
jq -r '.name'                   # Raw output (no quotes)
jq -c '.'                       # Compact output
jq -S '.'                       # Sort keys
```

## Common patterns

```bash
# Parse API response
curl -s https://api.example.com/users | jq '.data[].name'

# Extract from file
jq '.users[] | select(.active)' users.json

# Multiple filters
jq '.[] | select(.age > 25) | .name' data.json

# Combine fields
jq '.[] | "\(.name) is \(.age) years old"' data.json

# Count items
jq '[.[] | select(.status == "active")] | length' data.json
```

## Common issues

- **Parse error**: Input must be valid JSON
- **Null values**: Use `// "default"` for null handling
- **Array vs object**: Use `.[]` for arrays, `.field` for objects
- **Quotes in output**: Use `-r` flag for raw output without quotes

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [geronimo-iia](https://github.com/geronimo-iia)
- **Source:** [geronimo-iia/agent-skills](https://github.com/geronimo-iia/agent-skills)
- **License:** MIT
- **Homepage:** https://geronimo-iia.github.io/agent-skills/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-geronimo-iia-agent-skills-jq
- Seller: https://agentstack.voostack.com/s/geronimo-iia
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
