← Back to Skills Marketplace
arnarsson

Jq Json Processor

by Arnarsson · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
2881
Downloads
1
Stars
11
Active Installs
1
Versions
Install in OpenClaw
/install jq-json-processor
Description
Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.
README (SKILL.md)

jq JSON Processor

Process, filter, and transform JSON data with jq.

Quick Examples

Basic filtering

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

# Multiple fields
echo '{"name":"Alice","age":30}' | jq '{name: .name, age: .age}'

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

Working with arrays

# Map over array
echo '[{"name":"Alice"},{"name":"Bob"}]' | jq '.[].name'
# Output: "Alice" "Bob"

# Filter array
echo '[1,2,3,4,5]' | jq 'map(select(. > 2))'
# Output: [3,4,5]

# Length
echo '[1,2,3]' | jq 'length'
# Output: 3

Common operations

# Pretty print JSON
cat file.json | jq '.'

# Compact output
cat file.json | jq -c '.'

# Raw output (no quotes)
echo '{"name":"Alice"}' | jq -r '.name'
# Output: Alice

# Sort keys
echo '{"z":1,"a":2}' | jq -S '.'

Advanced filtering

# Select with conditions
jq '[.[] | select(.age > 25)]' people.json

# Group by
jq 'group_by(.category)' items.json

# Reduce
echo '[1,2,3,4,5]' | jq 'reduce .[] as $item (0; . + $item)'
# Output: 15

Working with files

# Read from file
jq '.users[0].name' users.json

# Multiple files
jq -s '.[0] * .[1]' file1.json file2.json

# Modify and save
jq '.version = "2.0"' package.json > package.json.tmp && mv package.json.tmp package.json

Common Use Cases

Extract specific fields from API response:

curl -s https://api.github.com/users/octocat | jq '{name: .name, repos: .public_repos, followers: .followers}'

Convert CSV-like data:

jq -r '.[] | [.name, .email, .age] | @csv' users.json

Debug API responses:

curl -s https://api.example.com/data | jq '.'

Tips

  • Use -r for raw string output (removes quotes)
  • Use -c for compact output (single line)
  • Use -S to sort object keys
  • Use --arg name value to pass variables
  • Pipe multiple jq operations: jq '.a' | jq '.b'

Documentation

Full manual: https://jqlang.github.io/jq/manual/ Interactive tutorial: https://jqplay.org/

Usage Guidance
This is a straightforward jq usage guide; it does not request credentials or install arbitrary code. Before using: ensure jq is installed from your OS package manager (brew/apt) or the official project, and be careful when running example commands that modify files (they use a temp file + mv pattern). When piping or fetching data from remote APIs (curl examples), avoid sending secrets or sensitive local files into commands unless you trust the endpoint.
Capability Analysis
Type: OpenClaw Skill Name: jq-json-processor Version: 1.0.0 The skill bundle is benign. It provides instructions and examples for using the `jq` command-line JSON processor. All content, including installation steps and usage examples in `SKILL.md`, aligns with the stated purpose of processing JSON data. The examples involving `curl` target legitimate public APIs (e.g., `api.github.com`) or generic placeholders (`api.example.com`) for data retrieval, not exfiltration or malicious interaction. There is no evidence of prompt injection, malicious execution, persistence, or obfuscation.
Capability Assessment
Purpose & Capability
Name, description, and SKILL.md all describe using jq to process JSON. The SKILL.md metadata declares the jq binary and provides brew/apt install hints, which are appropriate and proportional for this purpose.
Instruction Scope
Runtime instructions are concrete jq examples and common workflows (reading files, piping curl output, writing temp files and moving them into place). They do not instruct the agent to read unrelated system files, access secrets, or exfiltrate data. Examples that call curl or modify files are expected for a CLI usage guide but do require normal user caution when run.
Install Mechanism
The skill is instruction-only (no install spec in the registry). The SKILL.md metadata suggests installing jq via well-known package managers (brew, apt), which is low-risk and standard practice.
Credentials
The skill requests no environment variables or credentials. Examples reference external HTTP endpoints via curl, which is expected for demonstrating jq on API responses but does not require any stored secrets from the agent.
Persistence & Privilege
The skill is not always-enabled and is user-invocable; model invocation remains allowed (the platform default). The skill does not request persistent system privileges or modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jq-json-processor
  3. After installation, invoke the skill by name or use /jq-json-processor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of jq-json-processor. - Provides a collection of ready-to-use jq command-line examples for filtering, transforming, and manipulating JSON data. - Includes common tasks such as field extraction, array operations, advanced filtering, pretty printing, compact and raw output, and file operations. - Offers practical use cases for APIs, CSV conversion, and debugging. - Lists installation instructions for jq on common platforms (brew, apt). - Links to detailed jq documentation and an interactive tutorial.
Metadata
Slug jq-json-processor
Version 1.0.0
License
All-time Installs 12
Active Installs 11
Total Versions 1
Frequently Asked Questions

What is Jq Json Processor?

Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor. It is an AI Agent Skill for Claude Code / OpenClaw, with 2881 downloads so far.

How do I install Jq Json Processor?

Run "/install jq-json-processor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jq Json Processor free?

Yes, Jq Json Processor is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Jq Json Processor support?

Jq Json Processor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jq Json Processor?

It is built and maintained by Arnarsson (@arnarsson); the current version is v1.0.0.

💬 Comments