One-click install
npx skills add https://github.com/disusered/dotfiles-universal --skill jq-disusered
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jq
Source: https://github.com/disusered/dotfiles-universal/tree/main/ai/claude/skills/tools/jq
Command: npx skills add https://github.com/disusered/dotfiles-universal --skill jq-disusered

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a powerful and efficient way to parse, filter, and transform JSON data, eliminating the need for manual inspection or complex scripting. It saves developers and data analysts significant time when working with API responses, configuration files, or log data.

Core Features & Use Cases

  • JSON-Native Processing: Understands JSON structure for precise queries, avoiding the pitfalls of text-based tools like grep.
  • Advanced Filtering & Transformation: Extract specific fields, reshape objects, iterate over arrays, and apply conditional logic to JSON data.
  • Integration with Other Tools: Seamlessly pipes JSON output from other CLI tools (like ast-grep) for further analysis.
  • Use Case: You receive a large JSON API response and only need to extract the name and email of users who are active. Use jq '.users[] | select(.status == "active") | {name, email}' to get exactly what you need in seconds.

Quick Start

Extract the version field from the package.json file. jq -r '.version' package.json

Frequently Asked Questions about jq

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract specific fields from JSON data?

Use jq with field selectors to extract specific fields from JSON. For example, `jq '.users[] | {name, email}'` extracts name and email from a users array. jq understands JSON structure natively, making precise extraction faster and more reliable than text-based tools like grep.

Can I filter JSON records based on conditions?

Yes, jq's `select()` function filters JSON records by condition. For instance, `jq '.users[] | select(.status == "active")'` returns only active users. This avoids manual inspection and lets you extract exactly what you need from large API responses or log files.

How do I transform and reshape JSON structures?

jq transforms JSON by iterating arrays, applying conditional logic, and rebuilding objects. Use `.[] | {new_field: .old_field}` to reshape, or pipe multiple filters together for complex transformations. This lets you reformat API responses and configuration data without writing custom scripts.

Does jq work with large datasets and streaming?

Yes, jq processes large JSON datasets efficiently through streaming. It handles newline-delimited JSON and pipes output from other CLI tools like ast-grep, making it suitable for API responses, logs, and batch data processing at scale.

Can I use jq with other command-line tools in a pipeline?

jq integrates seamlessly into Unix pipelines. Pipe JSON output from curl, git, or other tools into jq for filtering and transformation, then pass results to other commands. This Bash-friendly integration supports complex data analysis workflows without intermediate files.

What's the best way to parse configuration files in JSON format?

jq extracts and validates fields from JSON configuration files without manual editing. Use `jq '.database.host'` to read nested config values or `jq '.services[] | .port'` to list all service ports, reducing errors and speeding up configuration audits.