Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install jq-json-processor或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install jq-json-processor⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/jq-json-processor/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: jq-json-processor description: Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor. homepage: https://jqlang.github.io/jq/ metadata: {"clawdbot":{"emoji":"🔍","requires":{"bins":["jq"]},"install":[{"id":"brew","kind":"brew","formula":"jq","bins":["jq"],"label":"Install jq (brew)"},{"id":"apt","kind":"apt","package":"jq","bins":["jq"],"label":"Install jq (apt)"}]}} ---
Process, filter, and transform JSON data with jq.
# 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
# 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
# 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 '.'
# 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
# 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
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 '.'
-r for raw string output (removes quotes)-c for compact output (single line)-S to sort object keys--arg name value to pass variablesjq '.a' | jq '.b'Full manual: https://jqlang.github.io/jq/manual/ Interactive tutorial: https://jqplay.org/
安装 Jq Json Processor 后,可以对 AI 说这些话来触发它
Help me get started with Jq Json Processor
Explains what Jq Json Processor does, walks through the setup, and runs a quick demo based on your current project
Use Jq Json Processor to process, filter, and transform JSON data using jq - the lightweight...
Invokes Jq Json Processor with the right parameters and returns the result directly in the conversation
What can I do with Jq Json Processor in my developer & devops workflow?
Lists the top use cases for Jq Json Processor, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/jq-json-processor/ 目录(个人级,所有项目可用),或 .claude/skills/jq-json-processor/(项目级)。重启 AI 客户端后,用 /jq-json-processor 主动调用,或让 AI 根据上下文自动发现并使用。
Jq Json Processor 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Jq Json Processor 可免费安装使用。请查阅仓库了解许可证信息。
Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.
Jq Json Processor 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Jq Json Processor
Identifies repetitive steps in your workflow and sets up Jq Json Processor to handle them automatically