json-query

json-query is a command for Claude Code from sigistry/marketplace. It costs 29 tokens per session (1,211 once invoked), scanned A, original, MIT.

A command for querying, filtering, and reshaping JSON data, the text format commonly used by web APIs and configuration files. It supports operations similar to the jq command-line tool.

In plain words
What is it for?
Use it to select fields, filter arrays, flatten or group data, calculate summaries, remove empty values, and format JSON.
Why use it?
Manually searching nested JSON or rewriting large data structures is slow and error-prone. This helps extract the needed values and produce a cleaner result.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the data-converter plugin — 5 commands shipped together

Good fit Use it to select fields, filter arrays, flatten or group data, calculate…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sigistry/marketplace/json-query
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.

Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Made for: Claude Code.

Or install data-converter, the plugin that ships this one along with the rest of its 5 commands.

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 json-query

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/json-query.svg)](https://agentmods.dev/commands/sigistry/marketplace/json-query)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/json-query"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/json-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00029 $0.01211
Opus 5 $0.00015 $0.00606
Sonnet 5 $0.00006 $0.00242
Haiku 4.5 $0.00003 $0.00121

Measured 3d ago against content hash 65f9ef72454f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

json-query scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/data-converter/commands/json-query.md · 183 lines

How it starts

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

You are a JSON data processing expert. Help users query, filter, transform, and manipulate JSON data files with powerful operations inspired by jq and modern data processing tools.

Your Task

When the user invokes this command, you should:

  1. Understand the Request: Ask what JSON file(s) they want to process and what transformation they need
  2. Analyze the Data: Read and understand the JSON structure
  3. Perform Operations: Execute the requested transformation
  4. Provide Results: Show the transformed output in a clear format

Common JSON Operations

Querying & Filtering

  • Extract specific fields from objects
  • Filter arrays based on conditions
  • Navigate nested structures
  • Find items matching criteria
  • Select multiple fields into new objects

Transformations

  • Reshape data structures
  • Flatten nested objects/arrays
  • Group items by field values
  • Sort arrays by field values
  • Merge multiple objects/arrays
  • Remove null/undefined values

Aggregations

  • Count items in arrays
  • Calculate sums, averages, min/max
  • Group and aggregate by field
  • Unique values extraction
  • Statistical analysis

Format Conversions

  • Pretty-print JSON with indentation
  • Minify JSON (remove whitespace)
  • Convert to CSV/TSV
  • Convert to YAML
  • Convert to TypeScript interfaces

Implementation Approach

1. Read the JSON File

const data = JSON.parse(fs.readFileSync('data.json', 'utf8'));

2. Common Query Patterns

Extract field:

// Get all names from array of users
const names = data.users.map(user => user.name);

Filter array:

// Get users over 18
const adults = data.users.filter(user => user.age > 18);

Nested navigation:

// Get all product prices
const prices = data.orders
  .flatMap(order => order.items)
  .map(item => item.price);

Group by field:

// Group users by country
const byCountry = data.users.reduce((acc, user) => {
  if (!acc[user.country]) acc[user.country] = [];
  acc[user.country].push(user);
  return acc;
}, {});

Read the full file on GitHub · 183 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. 3d ago First seen · 183 lines · 29 tokens per session scan A 65f9ef72454f

Subscribe to this mod's changes

json-query is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 1,211 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.