技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 1 · 2.5k · 10 current installs · 10 all-time installs
⭐ 1
安装量(当前) 10
🛡 VirusTotal :良性 · OpenClaw :良性
Package:arnarsson/jq-json-processor
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill is an instruction-only helper for using the jq command-line JSON processor and its requirements and instructions are consistent with that purpose.
目的
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.
说明范围
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.
安装机制
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.
证书
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.
持久
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.
综合结论
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…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Jq Json Processor」。简介:Process, filter, and transform JSON data using jq - the lightweight and flexibl…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/arnarsson/jq-json-processor/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
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)"}]}}
---
# jq JSON Processor
Process, filter, and transform JSON data with jq.
## Quick Examples
### Basic filtering
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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:**
```bash
curl -s https://api.github.com/users/octocat | jq '{name: .name, repos: .public_repos, followers: .followers}'
```
**Convert CSV-like data:**
```bash
jq -r '.[] | [.name, .email, .age] | @csv' users.json
```
**Debug API responses:**
```bash
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/