← Back to Skills Marketplace
gopendrasharma89-tech

Clean JSON Toolkit

by gopendrasharma89-tech · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
0
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install clean-json-toolkit
Description
Local JSON / JSONL inspection and manipulation toolkit. Inspect deeply nested structures (path tree, types, sample values per path), query with a jq-style pa...
README (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

Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clean-json-toolkit
  3. After installation, invoke the skill by name or use /clean-json-toolkit
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug clean-json-toolkit
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 0 downloads so far.

How do I install Clean JSON Toolkit?

Run "/install clean-json-toolkit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Clean JSON Toolkit free?

Yes, Clean JSON Toolkit is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Clean JSON Toolkit support?

Clean JSON Toolkit is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Clean JSON Toolkit?

It is built and maintained by gopendrasharma89-tech (@gopendrasharma89-tech); the current version is v0.1.0.

💬 Comments