← 返回 Skills 市场
charlie-morrison

Jsonpath Query

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
86
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jsonpath-query
功能描述
Query JSON data using JSONPath expressions. Use when asked to extract, filter, search, or navigate JSON data. Supports recursive descent, wildcards, array sl...
使用说明 (SKILL.md)

JSONPath Query Tool

Query JSON data using JSONPath expressions with recursive descent, wildcards, filters, and slicing.

Query

# From file
python3 scripts/jsonpath.py query '$.store.book[0].title' -f data.json

# From stdin
cat data.json | python3 scripts/jsonpath.py query '$.store.book[*].author'

# Recursive descent (find all 'name' fields at any depth)
cat data.json | python3 scripts/jsonpath.py query '$..name'

# Array slicing
cat data.json | python3 scripts/jsonpath.py query '$.items[0:5]'

# Filter (price \x3C 10)
cat data.json | python3 scripts/jsonpath.py query '$.store.book[?(@.price \x3C 10)]'

# Wildcard
cat data.json | python3 scripts/jsonpath.py query '$.store.*'

# Count matches
cat data.json | python3 scripts/jsonpath.py query '$.users[*]' --count

# First match only
cat data.json | python3 scripts/jsonpath.py query '$.items[*].id' --first

# Exit 1 if no matches (CI-friendly)
cat data.json | python3 scripts/jsonpath.py query '$.missing' --exit-empty

List Paths

# Show all available paths in JSON data
cat data.json | python3 scripts/jsonpath.py paths

# Limit depth
cat data.json | python3 scripts/jsonpath.py paths --depth 3

Extract Multiple Values

# Named extractions
cat data.json | python3 scripts/jsonpath.py extract 'name=$.user.name' 'emails=$.user.emails[*]'

Validate Expression

python3 scripts/jsonpath.py validate '$.store.book[?(@.price > 10)]'

Output Formats

python3 scripts/jsonpath.py query '$.items[*]' -f data.json --format json    # default
python3 scripts/jsonpath.py query '$.items[*].id' -f data.json --format lines # one per line
python3 scripts/jsonpath.py query '$.items[*]' -f data.json --format csv      # CSV for objects

JSONPath Syntax

Expression Description
$ Root object
.key Child key
[0] Array index
[0:5] Array slice (start:end)
[0:10:2] Array slice with step
[*] All elements
..key Recursive descent
[?(@.price\x3C10)] Filter expression
['key'] Bracket notation
[0,1,2] Union (multiple indices)
安全使用建议
This skill is a local JSONPath CLI implemented in pure Python and appears to do only what it says: read JSON from stdin or a file and print query results. It does not require credentials or perform network I/O. Before installing, you may: review the included scripts/jsonpath.py (it is small and uses only the stdlib), avoid piping highly sensitive secrets into any third-party tool unless you trust the author, and be mindful of very large JSON inputs which could use lots of memory/CPU.
功能分析
Type: OpenClaw Skill Name: jsonpath-query Version: 1.0.0 The skill bundle provides a utility for querying JSON data using JSONPath expressions. The core logic in scripts/jsonpath.py is a clean, self-contained implementation using only Python standard libraries and avoids dangerous practices like using eval() for filter evaluation. No indicators of malicious intent, data exfiltration, or prompt injection were found.
能力评估
Purpose & Capability
Name/description match the provided code and SKILL.md examples. The script implements JSONPath parsing, querying, path discovery, and output formatting; no unrelated capabilities (cloud access, secrets, etc.) are requested.
Instruction Scope
Runtime instructions only show running the included script on stdin or a named file with JSONPath expressions. The script only reads JSON from stdin or a user-specified file and writes results to stdout/stderr — it does not access other system files, environment variables, or external endpoints.
Install Mechanism
No install spec is provided (instruction-only). The included code is pure Python using only the standard library; nothing is downloaded or executed from external URLs.
Credentials
The skill declares no required environment variables, credentials, or config paths and the code does not read env vars or require secrets. The requested privileges are proportional to a local JSON query utility.
Persistence & Privilege
always is false and the skill is user-invocable. It does not modify other skills or system-wide configuration and does not request persistent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jsonpath-query
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jsonpath-query 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug jsonpath-query
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Jsonpath Query 是什么?

Query JSON data using JSONPath expressions. Use when asked to extract, filter, search, or navigate JSON data. Supports recursive descent, wildcards, array sl... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 86 次。

如何安装 Jsonpath Query?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jsonpath-query」即可一键安装,无需额外配置。

Jsonpath Query 是免费的吗?

是的,Jsonpath Query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Jsonpath Query 支持哪些平台?

Jsonpath Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Jsonpath Query?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论