Skip to content
Agentmart
Submit a tool

json-processing-with-jq

Processes JSON on the command line with jq.

Skill by Andrew G. Brown (https://github.com/brownag)

IndexedMIT★ 7
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/andrewbrown-usda-json-processing-with-jq

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Processes JSON on the command line with jq. Use when parsing, filtering, or validating JSON from files or APIs.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/json-processing-with-jq

What's inside

Skill name
json-processing-with-jq
Description
Processes JSON on the command line with jq. Use when parsing, filtering, or validating JSON from files or APIs.
License
MIT
Metadata
author: Andrew G. Brown (https://github.com/brownag) · version: 1 · source_path: skills/json-processing-with-jq/SKILL.md · source_repo: aigb-skills
Instructions
359 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# JSON Processing with jq

## Installation

```bash
# Ubuntu/Debian
sudo apt-get install jq

# macOS
brew install jq

# Verify
jq --version
```

## Basic Usage

### Pretty Print JSON
```bash
curl -s http://api.example.com/data | jq '.'

# Or from file
jq '.' data.json
```

### Extract Single Field
```bash
# Get "name" field from JSON object
echo '{"name": "Alice", "age": 30}' | jq '.name'
# Output: "Alice"

# Get field from nested object
echo '{"user": {"name": "Alice"}}' | jq '.user.name'
# Output: "Alice"
```

### Extract Array Elements
```bash
# Get all items in array
echo '[1, 2, 3]' | jq '.[]'
# Output:
# 1
# 2
# 3

# Get specific index
echo '[1, 2, 3]' | jq '.[0]'
# Output: 1
```

## LLM API Response Parsing

### Extract Tool Calls
```bash
curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{...}' | jq '.choices[0].message.tool_calls'
```

### Extract Tool Arguments as JSON Object
```bash
curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{...}' | jq -r '.choices[0].message.tool_calls[0].function.arguments | fromjson'
```

The `-r` flag outputs raw strings (without quotes). The `fromjson` converts JSON string to object.

### Extract Multiple Fields
```bash
# Get all tool call names
curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{...}' | jq '.choices[0].message.tool_calls[].function.name'
```

### Validate Tool Arguments are Valid JSON
```bash
# Test if arguments parse as JSON
curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{...}' | jq -e '.choices[0].message.tool_calls[0].function.arguments | fromjson' > /dev/null && echo "Valid JSON" || echo "Invalid JSON"
```

## Configuration File Parsing

### Extract Configuration Value
```bash
# From .continue/config.json
jq '.models[0].temperature' .continue/config.json
# Output: 0.5

# Get all model names
jq '.models[].title' .continue/config.json
```

### Validate Configuration Structure
```bash
# Check if required fields exist
jq 'has("models") and has("tools")' .continue/config.json
# Output: true
```

### Merge Configuration Objects
```bash
# Combine two config files
jq -s '.[0] * .[1]' config1.json config2.json
```

## Common jq Patterns

### Filter Objects
```bash
# Select objects where condition is true
echo '[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]' \
  | jq '.[] | select(.age > 26)'
# Output:
# {
#   "name": "Alice",
#   "age": 30

From AndrewBrown-USDA/aigb-skills-usda, MIT.

More from AndrewBrown-USDA/aigb-skills-usda

Signals

Stars
7
Forks
4
Open issues
1
Last commit (this folder)
Oct 14, 2026 (14 days ago)
Last release
Oct 23, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Andrew G. Brown (https://github.com/brownag)

Cite this page

json-processing-with-jq skill. Agent Mart. https://agentmart.dev/skills/andrewbrown-usda-json-processing-with-jq (last updated 2026-10-24)