jq

jq is a skill for Claude Code, Codex from beel-collab/presets.dev. It costs 22 tokens per session (2,126 once invoked), scanned A, original, MIT.

A guide to jq, a command-line tool for reading, filtering, and reshaping JSON data. JSON is a common text format used by APIs, configuration files, and command output.

In plain words
What is it for?
Use it to select fields, filter arrays, extract nested values, reshape records, and combine JSON with command-line scripts.
Why use it?
It makes nested or large JSON responses easier to inspect and transform in shell workflows.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to select fields, filter arrays, extract nested values, reshape records, and combine JSON with command-line scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beel-collab/presets.dev/jq
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add beel-collab/presets.dev --skill jq
Clone the repo
git clone --depth 1 https://github.com/beel-collab/presets.dev

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jq

README.md
[![agentmods](https://agentmods.dev/badge/skills/beel-collab/presets.dev/jq.svg)](https://agentmods.dev/skills/beel-collab/presets.dev/jq)
Your own site
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/jq"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/jq.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,126 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.02126
Opus 5 $0.00011 $0.01063
Sonnet 5 $0.00004 $0.00425
Haiku 4.5 $0.00002 $0.00213

Measured 4d ago against content hash 6f4cf040c147, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

jq scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://api.github.com/repos/owner/repo/issues \
claude/skills/development/jq/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

jq — JSON Querying and Transformation

Overview

jq is the standard CLI tool for querying and reshaping JSON. This skill covers practical, expert-level usage: filtering deeply nested data, transforming structures, aggregating values, and composing jq into shell pipelines. Every example is copy-paste ready for real workflows.

When to Use This Skill

  • Use when parsing JSON output from APIs, CLI tools (AWS, GitHub, kubectl, docker), or log files
  • Use when transforming JSON structure (rename keys, flatten arrays, group records)
  • Use when the user needs jq inside a bash script or one-liner
  • Use when explaining what a complex jq expression does

How It Works

jq takes a filter expression and applies it to JSON input. Filters compose with pipes (|), and jq handles arrays, objects, strings, numbers, booleans, and null natively.

Basic Selection

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

# Nested access
echo '{"user":{"email":"[email protected]"}}' | jq '.user.email'

# Array index
echo '[10, 20, 30]' | jq '.[1]'
# 20

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

# All array elements
echo '[{"id":1},{"id":2}]' | jq '.[]'

Filtering with select

# Keep only matching elements
echo '[{"role":"admin"},{"role":"user"},{"role":"admin"}]' \
  | jq '[.[] | select(.role == "admin")]'

# Numeric comparison
curl -s https://api.github.com/repos/owner/repo/issues \
  | jq '[.[] | select(.comments > 5)]'

# Test a field exists and is non-null
jq '[.[] | select(.email != null)]'

# Combine conditions
jq '[.[] | select(.active == true and .score >= 80)]'

Mapping and Transformation

# Extract a field from every array element
echo '[{"name":"alice","age":30},{"name":"bob","age":25}]' \
  | jq '[.[] | .name]'
# ["alice", "bob"]

# Shorthand: map()
jq 'map(.name)'

# Build a new object per element
jq '[.[] | {user: .name, years: .age}]'

# Add a computed field
jq '[.[] | . + {senior: (.age > 28)}]'

# Rename keys
jq '[.[] | {username: .name, email_address: .email}]'

Read the full file on GitHub · 276 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 276 lines · 22 tokens per session scan A 6f4cf040c147

Subscribe to this mod's changes

jq is a skill published in the GitHub repository beel-collab/presets.dev (2 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 2,126 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.