← 返回 Skills 市场
claudiodrusus

JSON Toolkit

作者 claudiodrusus · GitHub ↗ · v1.1.0
cross-platform ✓ 安全检测通过
667
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install json-toolkit
功能描述
Swiss-army knife for JSON files. Pretty-print, validate, minify, sort keys, and query with dot-notation paths. Zero dependencies.
使用说明 (SKILL.md)

JSON Toolkit

A zero-dependency Python utility for working with JSON data. Validates, formats, minifies, queries, and inspects JSON files — all with Python's standard library.

Features

  • Pretty-print with configurable indentation (2, 4, or any number of spaces)
  • Minify JSON to reduce file size for APIs and storage
  • Validate JSON and get structural stats (type, key count, size)
  • Query nested data with dot-notation paths including array indices
  • Sort keys alphabetically for deterministic output and easier diffs
  • Stdin support for use in shell pipelines with other tools

Usage Examples

Pretty-print a JSON file:

python main.py data.json

Validate without output:

python main.py config.json --validate
# ✓ Valid JSON
#   Type: object (12 keys)
#   Size: 4832 bytes

Query a nested value:

python main.py users.json --query data.users.0.name
# "Alice"

Minify for production:

python main.py config.json --minify -o config.min.json

Sort keys for consistent diffs:

python main.py package.json --sort-keys -o package-sorted.json

Pipe from curl:

curl -s https://api.example.com/data | python main.py - --query results.0

Query Syntax

Use dot notation to navigate nested structures. Array indices are numbers:

  • name — top-level key
  • data.users — nested object key
  • data.users.0 — first element of an array
  • data.users.0.email — field of the first array element
  • config.servers.2.host — deeply nested value

Command Line Options

  • input — JSON file path, or - for stdin
  • -o, --output — Output file (defaults to stdout)
  • --indent N — Indentation spaces (default: 2)
  • --minify — Output minified JSON (no whitespace)
  • --query PATH / -q PATH — Extract a value at the given dot-notation path
  • --validate — Only validate and print stats, no output
  • --sort-keys — Sort object keys alphabetically
  • --json — (implicit) Output is always valid JSON
安全使用建议
This tool appears safe and does what it claims, but note: it will read any file you pass to it (or data piped to stdin) and can overwrite the output path you specify. Because the package has no homepage and an unknown source owner, run it in a trusted or isolated environment if you are cautious, verify the included main.py matches your expectations, and avoid piping untrusted network data into the script without inspection.
功能分析
Type: OpenClaw Skill Name: json-toolkit Version: 1.1.0 The skill bundle provides a JSON toolkit for formatting, validating, minifying, and querying JSON data. The `SKILL.md` documentation is straightforward and does not contain any prompt injection attempts or instructions for malicious actions. The `main.py` script uses only standard Python libraries (`sys`, `json`, `argparse`) and performs file I/O as explicitly stated in its purpose. There is no evidence of data exfiltration, unauthorized network activity, command execution, persistence mechanisms, or obfuscation. The file access capabilities are inherent to the tool's function as a JSON file processor and do not indicate malicious intent within the script itself.
能力评估
Purpose & Capability
Name/description (pretty-print, validate, minify, query, sort) match the included Python script. The required resources are minimal and proportional to a JSON utility.
Instruction Scope
SKILL.md instructs running the provided script and using stdin/stdout or files; examples (including piping from curl) are consistent with a JSON tool. There are no instructions to read unrelated files, environment variables, or to exfiltrate data.
Install Mechanism
No install spec. The skill is instruction-only with an included Python file (no external downloads or package installs). The script uses only the Python standard library.
Credentials
No environment variables, credentials, or config paths are requested. The tool reads only the user-specified input (file or stdin) and optionally writes to a user-specified output file.
Persistence & Privilege
always:false and user-invocable:true (normal). The skill does not request persistent privileges or modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install json-toolkit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /json-toolkit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
No visible changes detected in this release. - Version number updated to 1.1.0. - No content or file updates present.
v1.0.1
v1.0.1: docs update
v1.0.0
Initial release
元数据
Slug json-toolkit
版本 1.1.0
许可证
累计安装 1
当前安装数 1
历史版本数 3
常见问题

JSON Toolkit 是什么?

Swiss-army knife for JSON files. Pretty-print, validate, minify, sort keys, and query with dot-notation paths. Zero dependencies. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 667 次。

如何安装 JSON Toolkit?

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

JSON Toolkit 是免费的吗?

是的,JSON Toolkit 完全免费(开源免费),可自由下载、安装和使用。

JSON Toolkit 支持哪些平台?

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

谁开发了 JSON Toolkit?

由 claudiodrusus(@claudiodrusus)开发并维护,当前版本 v1.1.0。

💬 留言讨论