← 返回 Skills 市场
2881
总下载
1
收藏
11
当前安装
1
版本数
在 OpenClaw 中安装
/install jq-json-processor
功能描述
Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.
使用说明 (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
-rfor raw string output (removes quotes) - Use
-cfor compact output (single line) - Use
-Sto sort object keys - Use
--arg name valueto pass variables - Pipe multiple jq operations:
jq '.a' | jq '.b'
Documentation
Full manual: https://jqlang.github.io/jq/manual/ Interactive tutorial: https://jqplay.org/
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install jq-json-processor - 安装完成后,直接呼叫该 Skill 的名称或使用
/jq-json-processor触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
常见问题
Jq Json Processor 是什么?
Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2881 次。
如何安装 Jq Json Processor?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install jq-json-processor」即可一键安装,无需额外配置。
Jq Json Processor 是免费的吗?
是的,Jq Json Processor 完全免费(开源免费),可自由下载、安装和使用。
Jq Json Processor 支持哪些平台?
Jq Json Processor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Jq Json Processor?
由 Arnarsson(@arnarsson)开发并维护,当前版本 v1.0.0。
推荐 Skills