Agent skill · data analytics · sickn33

jq

Expert jq usage for JSON querying, filtering, transformation, and pipeline integration. Practical patterns for real shell workflows.

Why this skill is useful

Provides expert-level patterns and complex jq expressions for JSON transformation that the AI wouldn't reliably generate on its own.

What it needs

Requires jq installed locally. About 5k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.

What this skill does

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 Filtering with select Mapping and Transformation Aggregation and Reduce String Interpolation and Formatting Working with Keys and Paths Conditionals and Error Handling Practical Shell Integration Advanced Patterns Best Practices Always use -r (raw output) when passing jq results to shell variables or other commands to strip JSON string quotes Use --arg / --argjson to inject shell variables safely — never interpolate shell variables directly into filter strings Prefer map(f) over [.[] f] for readability Use -c (compact) for newline-delimited JSON pipelines; omit it for human-readable debugging Test filters interactively with jq -n and literal input before embedding in scripts Use empty to drop unwanted elements rather than filtering to null Security & Safety Notes jq is read-only by design — it cannot write files or execute commands Avoid embedding untrusted JSON field values directly into shell commands; always quote or use --arg Common Pitfalls Problem: jq outputs null instead of the expected value Solution: Check for typos in key names; use keys to inspect actual field names. Remember JSON is case-sensitive. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sickn33/jq

View the source on GitHub

Browse the @skills marketplace