TopRank Skills

Official OpenClaw rules 54%

jq

Command-line JSON processor. Extract, filter, transform JSON.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 jq 技能。 若已安装,则直接安装 jq 技能。

Overview

Skill Key
gumadeiras/jq
Author
gumadeiras
Source Repo
openclaw/skills
Version
-
Source Path
skills/gumadeiras/jq
Latest Commit SHA
103d0403ee2e940016838e687a93617bbd05b958

Extracted Content

SKILL.md excerpt

# jq

Command-line JSON processor for extracting, filtering, and transforming JSON.

## Installation

**macOS / Linux (Homebrew):**
```bash
brew install jq
```

**All platforms:** See [jqlang.org/download](https://jqlang.org/download/) for packages, binaries, and build instructions.

## Usage

```bash
jq '[filter]' [file.json]
cat file.json | jq '[filter]'
```

## Quick Reference

```bash
.key                    # Get key
.a.b.c                  # Nested access
.[0]                    # First element
.[]                     # Iterate array
.[] | select(.x > 5)    # Filter
{a: .x, b: .y}          # Reshape
. + {new: "val"}        # Add field
del(.key)               # Remove field
length                  # Count
[.[] | .x] | add        # Sum
keys                    # List keys
unique                  # Dedupe array
group_by(.x)            # Group
```

## Flags

`-r` raw output (no quotes) · `-c` compact · `-s` slurp into array · `-S` sort keys

## Examples

```bash
jq '.users[].email' data.json          # Extract emails
jq -r '.name // "default"' data.json   # With fallback
jq '.[] | select(.active)' data.json   # Filter active
jq -s 'add' *.json                     # Merge files
jq '.' file.json                       # Pretty-print
```

Related Claw Skills