Logo von Json Flat Tool

Json Flat Tool

Community
DoiiarX
json-flat-tool

JSON flat view, schema inference, and edit tool. ⚠️ CRITICAL: ALWAYS use jstool for JSON files - NEVER use read/edit/cat on *.json! **Strongest trigger — editing any JSON config file**: when the user asks to change, add, set, update, or remove a field in a `.json` configuration (config.json, settings.json, package.json, tsconfig.json, appsettings.json, .eslintrc, openclaw.json, mcp.json, any tool's `*.json` config), invoke this skill instead of opening the file in a text editor. Reading the whole file, hand-editing braces, or rewriting it from memory all break formatting and risk silent corruption — jstool gives you a structural diff preview before applying. Also use when the user provides JSON data in ANY form and wants to explore its structure, infer its schema, modify fields, or search keys/values. This includes: - JSON files on disk (view, inspect, search) - JSON configuration files (any *.json config — see above) - Editing / updating fields (set key, delete key, insert array element, bulk update, modify nested value) - Inline JSON pasted into chat - HTTP / REST API responses (curl output, Postman captures, fetch() results) - WebSocket (WSS) message payloads captured from a browser or proxy - Polymarket or any exchange orderbook / market-data snapshots - Any API protocol payload (CLOB, AMM, streaming events, RPC responses) Default behavior masks values whose key name looks like a secret (apiKey, token, password, etc.); pass `-R` / `--reveal` to disable masking for one invocation. Sensitive-key patterns and mask format live in `<skill-dir>/config.json` and can be edited without touching code. Triggers on: view json, edit json, json schema, json structure, set json field, jstool, analyze json, flat view, orderbook, json flat, modify json, update json, change json, json config, edit config, modify config, update config, set config field, change config, config.json, settings.json, package.json, tsconfig.json, delete json field, insert json, add json key, json edit, api response, http response, rest api json, webs

Übersicht

HerausgeberDoiiarX
Repositoryclaude-skills
Skill-Namejson-flat-tool
Sterne
23
Forks
0
Mitgelieferte Dateien
2
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 2 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von DoiiarX auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Json Flat Tool in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/DoiiarX/claude-skills/tree/main/json-flat-tool
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DoiiarX/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/json-flat-tool .claude/skills/json-flat-tool
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Json Flat Tool in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Json Flat Tool automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Json Flat Tool nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

JSON Flat Tool

⚠️ MANDATORY: Use jstool instead of read/edit/cat for JSON files!

Before using read/edit on *.json files, ask yourself: "Should I use jstool instead?"

  • View: python3 ~/.agents/skills/json-flat-tool/jstool.py view <file> -s
  • Edit: python3 ~/.agents/skills/json-flat-tool/jstool.py set <path> <value> <file> -f
  • Search: python3 ~/.agents/skills/json-flat-tool/jstool.py find <pattern> <file>

Note on hooks: This skill previously attempted to use PreToolUse hooks to intercept Read/Edit calls on JSON files. However, harness hooks generally cannot match on tool arguments (like file extensions) — matchers only support tool name patterns (e.g. "Read", "Edit"), not argument-based filtering (e.g. "read(*.json)"). For argument-level validation, hooks must use a command script that parses tool_input JSON itself.


A single-script tool (jstool.py) for viewing, inspecting, and editing JSON data.

Script path: ~/.claude/skills/json-flat-tool/jstool.py

Invocation

bash
python3 ~/.claude/skills/json-flat-tool/jstool.py <command> [args]

Commands

CommandDescription
view [file] [opts]Flat path/type/value display
schema [file] [--title T]Infer JSON Schema Draft 7
set <path> <value> [file] [-f]Set a field value
<path> = <value> [file] [-f]Same, B-style syntax
before <path> <value> [file] [-f]Insert before array element
after <path> <value> [file] [-f]Insert after array element
del <path> [file] [-f]Delete a key or element
set-null <path> [file] [-f]Set a field to null
copy <src> <dst> [file] [-f]Deep-clone a subtree to a new path
merge <path> <patch.json> [file] [-f]Deep-merge a JSON file into a path
find <pattern> [file] [opts]Search paths and values by regex or glob

Omit [file] to read from stdin.

view Options

FlagUnitDescription
-s—Schema mode: collapse [N]→[*], deduplicate, hide values
-F <path>—Filter: show only this path and its children
-n <N>rowsShow at most N rows
-O <N>rowsSkip first N rows
-E <N>elementsSkip first N array elements (use with -F)
-L <N>elementsShow at most N array elements (use with -F)
-d <N>depthCollapse containers deeper than N levels (object key depth; array indices don't count)

-E and -L are element-aware and never cut an element in the middle.

Edit flags

  • -f — Force: apply change to file. Default is preview-only.
  • Without -f: shows a color-annotated diff of the original JSON with ~~~~~ underline markers at the exact change position.
  • -R / --reveal — Show secret-like values in plain text (default: masked with prefix***suffix). Place before the subcommand: jstool.py -R find apiKey config.json -k. On-disk writes via -f always use the real value regardless of -R.

Path syntax

root              root node
count             root-level key
users[0]          array element
users[0].name     nested key
root[0].key       root-array element key

Value parsing

Values are parsed as JSON first, then fall back to plain string:

Alice          → string
42             → integer
3.14           → number
true / false   → boolean
null           → null
'{"k":"v"}'    → object
'[1,2,3]'      → array
@path/to.json  → read value from file

Output format (view)

root 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
config object {3 keys}         ← dim: collapsed by -d
tags array [12 items]          ← dim: collapsed by -d

Colors: cyan = path, yellow = type, green = value, magenta = inferred null, red = unknown/delete, dim = empty/collapsed.

Workflow

Explore a JSON file

bash
# 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"

# Depth-limited view: collapse containers beyond 2 key levels
python3 ~/.claude/skills/json-flat-tool/jstool.py view data.json -d 2

# Combine with filter: expand just one branch while keeping others collapsed
python3 ~/.claude/skills/json-flat-tool/jstool.py view data.json -d 1 -F users

Edit a JSON file

bash
# 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

Set value from file (@file)

bash
# 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 -f

Clone a subtree (copy)

bash
# 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 -f

Deep-merge a patch file (merge)

bash
# 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 -f

Find nodes by pattern (find)

bash
# 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

find options:

FlagDescription
-kMatch path only
-vMatch value only
-iCase-insensitive
-gGlob mode (fnmatch full-string wildcard instead of regex)

-k and -v are mutually exclusive. Without either flag, both path and value are searched.

Inline / piped JSON

bash
echo '{"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 schema

HTTP API & WebSocket Analysis

This skill should be invoked automatically whenever the user pastes an API response, curl output, WSS frame, or asks to analyze any protocol-level JSON payload.

Analyze an HTTP API response

bash
# Fetch and immediately explore structure
curl -s https://api.example.com/markets | \
  python3 ~/.claude/skills/json-flat-tool/jstool.py view -s

# Infer schema from a REST endpoint
curl -s https://api.example.com/orderbook/BTC-USD | \
  python3 ~/.claude/skills/json-flat-tool/jstool.py schema --title "Orderbook API"

# Save the raw response, then explore interactively
curl -s https://api.example.com/events > /tmp/events.json
python3 ~/.claude/skills/json-flat-tool/jstool.py view /tmp/events.json -d 2

# Search for a specific field across the response
curl -s https://api.example.com/data | \
  python3 ~/.claude/skills/json-flat-tool/jstool.py find "price" -k

Analyze a WebSocket (WSS) message capture

When a user pastes a raw WebSocket frame payload or a captured .json log:

bash
# Paste the captured WSS JSON into a temp file, then inspect
echo '<paste-wss-frame-here>' > /tmp/wss_frame.json
python3 ~/.claude/skills/json-flat-tool/jstool.py view /tmp/wss_frame.json -s

# Compare schema across multiple frames (batch via stdin)
cat wss_frames/*.json | jq -s '.' | \
  python3 ~/.claude/skills/json-flat-tool/jstool.py schema --title "WSS Message Schema"

# Find volatile / changing fields (paginate through a large frame log)
python3 ~/.claude/skills/json-flat-tool/jstool.py view wss_log.json -F "data" -E 0 -L 5

Orderbook / market-data snapshots

bash
# Explore top-level structure
python3 ~/.claude/skills/json-flat-tool/jstool.py view orderbook.json -d 1

# Drill into bids/asks with element-aware pagination
python3 ~/.claude/skills/json-flat-tool/jstool.py view orderbook.json -F "bids" -L 10
python3 ~/.claude/skills/json-flat-tool/jstool.py view orderbook.json -F "asks" -L 10

# Infer schema to understand field types
python3 ~/.claude/skills/json-flat-tool/jstool.py schema orderbook.json --title "CLOB Orderbook"

Tips for API / protocol analysis

ScenarioRecommended command
Unknown response shapeview -s (schema mode)
Large paginated listview -F <array-path> -E <skip> -L <count>
Find auth / key fieldsfind "token|key|secret|auth" -k -i
Understand field typesschema --title "<endpoint-name>"
Diff two responsessave both → set / merge preview
WSS frame with nested eventsview -d 2 then view -F <event-path>

Inline JSON from chat

When the user pastes raw JSON directly into the conversation, save it to a temp file:

bash
cat > /tmp/api_payload.json << 'EOF'
<paste JSON here>
EOF
python3 ~/.claude/skills/json-flat-tool/jstool.py view /tmp/api_payload.json -s

Notes

  • before / after only apply to array elements, not object keys.
  • Adding a brand-new key (set cannot create missing parents). set requires every segment of the target path to already exist; otherwise it errors with KeyError: 'foo'. Two correct ways to add a new key:
    • merge (recommended): write the patch to a small JSON file and deep-merge it into an existing parent. merge creates any missing keys inside the patch, but the target path itself must still exist:
      bash
      # Add messages.tts (when messages exists but messages.tts does not)
      cat > /tmp/patch.json <<'EOF'
      { "tts": { "auto": "tagged", "provider": "xiaomi" } }
      EOF
      jstool.py merge messages /tmp/patch.json config.json -f
    • set with @file against an existing parent: when the parent object already exists, you can drop a whole subtree in:
      bash
      jstool.py set messages.tts @/tmp/tts-block.json config.json -f
  • -f without a file path prints modified JSON to stdout.
  • -E / -L require -F pointing to an array path.
  • Array sampling for schema inference: up to 20 elements.
  • required in schema = fields present and non-empty in all sampled elements.
  • @file syntax works with set and B-style (=); merge always takes a file path directly.
  • copy performs a deep clone — mutations to the copy do not affect the source.
  • merge for non-dict targets replaces the value entirely (patch wins).
  • find -g uses fnmatch (full-string wildcard): use *api* not api* for substring matching.
  • find without -g uses Python re.search (substring regex by default).
  • -d N only affects the flat view display; schema inference and edit commands are unaffected.
  • -d N depth counts object key traversals only — array indices ([0], [1], …) do not increment depth.

Sensitive-key masking

By default, view / find / set / del previews mask string values whose key name looks like a secret (apiKey, token, password, client_secret, private_key, …). Output looks like:

models.providers.newapi.apiKey string sk-P***mywu (masked; -R to reveal)

Pass -R (or --reveal) before the subcommand to see plain text for one invocation. On-disk writes are never affected by masking — -f always writes the real value, regardless of -R.

bash
jstool.py find apiKey config.json -k          # masked
jstool.py -R find apiKey config.json -k       # reveal

Configuring masked patterns

Patterns and the prefix***suffix format live in <skill-dir>/config.json, not hard-coded in jstool.py. Edit that file (with jstool itself, of course) to add/remove patterns or change how much of the value is shown:

json5
// <skill-dir>/config.json
{
  "sensitive_keys": {
    "key_name_patterns": ["apikey", "token", "password", "..."],
    "mask_format": {
      "show_prefix": 4,
      "show_suffix": 4,
      "min_length_to_mask": 8,
      "placeholder": "***"
    }
  }
}

Matching is case-insensitive and ignores punctuation in the key name — apiKey, api_key, API-KEY, apikey all hit the same pattern.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Json Flat Tool?

JSON flat view, schema inference, and edit tool. ⚠️ CRITICAL: ALWAYS use jstool for JSON files - NEVER use read/edit/cat on *.json! **Strongest trigger — editing any JSON config file**: when the user asks to change, add, set, update, or remove a field in a `.json` configuration (config.json, settings.json, package.json, tsconfig.json, appsettings.json, .eslintrc, openclaw.json, mcp.json, any tool's `*.json` config), invoke this skill instead of opening the file in a text editor. Reading the whole file, hand-editing braces, or rewriting it from memory all break formatting and risk silent cor...

Warum Json Flat Tool in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Json Flat Tool besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Json Flat Tool in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/DoiiarX/claude-skills/tree/main/json-flat-tool ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Json Flat Tool nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Json Flat Tool verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Json Flat Tool damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Json Flat Tool kostenlos?

Der Skill wird von DoiiarX auf GitHub veröffentlicht. Die Lizenzbedingungen finden Sie im Repository. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇