← 返回 Skills 市场
gopendrasharma89-tech

Clean JSON Toolkit

作者 gopendrasharma89-tech · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
0
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install clean-json-toolkit
功能描述
Local JSON / JSONL inspection and manipulation toolkit. Inspect deeply nested structures (path tree, types, sample values per path), query with a jq-style pa...
使用说明 (SKILL.md)

clean-json-toolkit

v0.1.0

Fourth member of the clean-* family. csv handles structured tabular data, text handles unstructured strings, log handles timestamped logs, and json handles nested data — API responses, config files, JSONL event streams.

Pure Python 3 standard library. No jq, no jsonschema, no pip installs.

Scripts

  • scripts/inspect.py — profile a .json or .jsonl file: tree of every distinct path with types, counts, and N sample values per path.
  • scripts/query.py — jq-style path queries. .key.nested, .key[0], .[] iterate, .key.[].field map. Output modes: --json / --jsonl / --lines / --raw. JSONL inputs implicitly iterate at the top level.
  • scripts/flatten.py — flatten nested JSON into dot-notation keys. Reversible with --unflatten. Roundtrip-safe.
  • scripts/validate.py — validate against a small schema (required, type, min/max, min_length/max_length, enum, regex, item_type, allow_extra).
  • scripts/check_deps.sh — verify python3.

Quick start

# Inspect
python3 scripts/inspect.py response.json
python3 scripts/inspect.py events.jsonl --max-samples 5

# Query
python3 scripts/query.py data.json '.meta'
python3 scripts/query.py data.json '.users.[].email' --raw
python3 scripts/query.py events.jsonl '.amount' --lines

# Flatten + unflatten roundtrip
python3 scripts/flatten.py config.json flat.json
python3 scripts/flatten.py flat.json nested.json --unflatten

# Validate
python3 scripts/validate.py users.jsonl --schema schema.json

Exit codes

Code Meaning
0 success / one or more results
1 zero results / validation failed / empty input
2 bad arguments / unsafe path / missing file / invalid JSON / bad schema

Safety

  • Pure Python 3 stdlib. No eval, no subprocess, no remote calls.
  • All paths validated against safe-path policy (same as the other clean-* toolkits).
  • Hand-rolled query path tokenizer.

Pairs well with

License

MIT

安全使用建议
Install if you need local JSON/JSONL inspection and transformation tools. Treat output paths as normal file writes that may overwrite files, and avoid inspecting sensitive data if terminal logs or generated reports should not contain sample values.
能力评估
Purpose & Capability
The stated purpose is JSON/JSONL inspection, querying, flattening, and validation; the scripts implement those local data-processing functions with Python standard-library JSON, regex, argparse, and pathlib code.
Instruction Scope
The instructions disclose the available scripts, expected commands, output modes, exit codes, and safety claims; artifact review found no prompt-injection text, role manipulation, or unrelated agent instructions.
Install Mechanism
Installation/runtime metadata only requires the python3 binary, and check_deps.sh verifies python3 without installing packages or changing the environment.
Credentials
The tools read local JSON/JSONL files chosen by the user and some commands write output files; this is expected for the purpose, but users should avoid running it on sensitive files unless they are comfortable with parsed values appearing in output.
Persistence & Privilege
No background workers, startup hooks, credential access, environment scraping, privilege escalation, or persistent configuration changes were found; writes are limited to explicit output paths.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clean-json-toolkit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clean-json-toolkit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
v0.1.0 initial release. Fourth skill in the clean-* family (after csv, text, log). Four scripts in pure stdlib: inspect.py (path-tree profile with types and samples), query.py (jq-style path queries with .key, .key[N], .[] iterate, .key.[].field map; --json/--jsonl/--lines/--raw output modes; implicit top-level iteration on JSONL), flatten.py (nested<->flat with dot or bracket index style, roundtrip-safe), validate.py (small pragmatic schema: required/type/min/max/length/enum/regex/item_type/allow_extra). Auto-detects JSON vs JSONL. Safe-path policy and 0/1/2 exit-code contract. Zero third-party dependencies.
元数据
Slug clean-json-toolkit
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Clean JSON Toolkit 是什么?

Local JSON / JSONL inspection and manipulation toolkit. Inspect deeply nested structures (path tree, types, sample values per path), query with a jq-style pa... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 0 次。

如何安装 Clean JSON Toolkit?

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

Clean JSON Toolkit 是免费的吗?

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

Clean JSON Toolkit 支持哪些平台?

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

谁开发了 Clean JSON Toolkit?

由 gopendrasharma89-tech(@gopendrasharma89-tech)开发并维护,当前版本 v0.1.0。

💬 留言讨论