Loading...
Loading...
JSON flat view, schema inference, and edit tool. Use when the user provides a JSON file or data and wants to explore its structure, infer its schema, or modify fields. Triggers on: view json, edit json, json schema, json structure, set json field, jstool, analyze json, flat view, orderbook, json flat.
npx skill4agent add doiiarx/claude-skills json-flat-tooljstool.py~/.claude/skills/json-flat-tool/jstool.pypython3 ~/.claude/skills/json-flat-tool/jstool.py <command> [args]| Command | Description |
|---|---|
| Flat path/type/value display |
| Infer JSON Schema Draft 7 |
| Set a field value |
| Same, B-style syntax |
| Insert before array element |
| Insert after array element |
| Delete a key or element |
| Set a field to null |
| Deep-clone a subtree to a new path |
| Deep-merge a JSON file into a path |
| Search paths and values by regex or glob |
[file]| Flag | Unit | Description |
|---|---|---|
| — | Schema mode: collapse |
| — | Filter: show only this path and its children |
| rows | Show at most N rows |
| rows | Skip first N rows |
| elements | Skip first N array elements (use with |
| elements | Show at most N array elements (use with |
-E-L-f-f~~~~~root root node
count root-level key
users[0] array element
users[0].name nested key
root[0].key root-array element keyAlice → string
42 → integer
3.14 → number
true / false → boolean
null → null
'{"k":"v"}' → object
'[1,2,3]' → array
@path/to.json → read value from fileroot object
users array
users[0] object
users[0].name string Alice
users[0].age integer 30
users[1].age integer (null) ← magenta: null with inferred type
orphan unknown (null) ← red: null, type unknown
meta object (empty) ← dim: empty container# Quick structure overview
python3 ~/.claude/skills/json-flat-tool/jstool.py view data.json -s
# Filter to a nested array, element-aware pagination
python3 ~/.claude/skills/json-flat-tool/jstool.py view data.json -F "data[0].bids" -E 5 -L 3
# Infer JSON Schema Draft 7
python3 ~/.claude/skills/json-flat-tool/jstool.py schema data.json --title "My API"# Preview change (default)
python3 ~/.claude/skills/json-flat-tool/jstool.py set users[0].name Bob data.json
# Apply change
python3 ~/.claude/skills/json-flat-tool/jstool.py set users[0].name Bob data.json -f
# B-style
python3 ~/.claude/skills/json-flat-tool/jstool.py "users[0].name" = Bob data.json -f
# Insert / delete
python3 ~/.claude/skills/json-flat-tool/jstool.py before users[1] '{"name":"Eve"}' data.json -f
python3 ~/.claude/skills/json-flat-tool/jstool.py del users[2] data.json -f
python3 ~/.claude/skills/json-flat-tool/jstool.py set-null users[0].age data.json -f@file# Write a complex object to a file, then set it at a path
python3 ~/.claude/skills/json-flat-tool/jstool.py set provider.openai @/tmp/openai.json config.json -fcopy# Clone an existing model as the base for a new one (preview)
python3 ~/.claude/skills/json-flat-tool/jstool.py copy \
provider.google.models.antigravity-gemini-3-pro \
provider.google.models.my-new-model \
config.json
# Apply
python3 ~/.claude/skills/json-flat-tool/jstool.py copy \
provider.google.models.antigravity-gemini-3-pro \
provider.google.models.my-new-model \
config.json -fmerge# patch.json only needs to contain the fields to add/update
# preview: shows which keys are added (+) and updated (~)
python3 ~/.claude/skills/json-flat-tool/jstool.py merge provider.google.models /tmp/new-models.json config.json
# Apply
python3 ~/.claude/skills/json-flat-tool/jstool.py merge provider.google.models /tmp/new-models.json config.json -ffind# Regex search in both paths and values (default)
python3 ~/.claude/skills/json-flat-tool/jstool.py find apiKey config.json
# Search path only (-k), value only (-v)
python3 ~/.claude/skills/json-flat-tool/jstool.py find apiKey config.json -k
python3 ~/.claude/skills/json-flat-tool/jstool.py find "sk-.*" config.json -v
# Case-insensitive
python3 ~/.claude/skills/json-flat-tool/jstool.py find "APIKEY" config.json -k -i
# Glob mode (full-string wildcard, use * to match anywhere)
python3 ~/.claude/skills/json-flat-tool/jstool.py find "*api*" config.json -k -g -i| Flag | Description |
|---|---|
| Match path only |
| Match value only |
| Case-insensitive |
| Glob mode (fnmatch full-string wildcard instead of regex) |
-k-vecho '{"name":"Alice"}' | python3 ~/.claude/skills/json-flat-tool/jstool.py view
curl https://api.example.com/data | python3 ~/.claude/skills/json-flat-tool/jstool.py schemabeforeafterset-f-E-L-Frequired@fileset=mergecopymergefind -gfnmatch*api*api*find-gre.search