Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

json-flat-toolJSON flat tool 搜索

Agent Skill

json-flat-tool 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

329

周安装

14

GitHub Stars

16

下载量

115
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:json-flat-tool(JSON flat tool 搜索)
来源仓库:https://github.com/doiiarx/claude-skills
仓库路径:skills/json-flat-tool
安装命令:
npx skills add https://github.com/doiiarx/claude-skills --skill json-flat-tool
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/doiiarx/claude-skills --skill json-flat-tool

简介

用于查找、检索和筛选相关信息。json-flat-tool 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词或任务场景快速定位候选结果。
  • 可辅助研究类任务的信息收集环节。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 建议结合具体需求验证搜索策略的有效性。
  • 需注意来源仓库的维护状态和实际功能边界。

SKILL.md

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, Claude Code hooks cannot match on tool arguments (like file extensions). According to the Claude Code Hooks Reference, matchers only support tool name patterns (e.g., "Read", "Edit"), not argument-based filtering (e.g., "read(*.json)"). Additionally, the respond hook type does not exist; valid types are: command, http, prompt, agent. For argument-level validation, hooks must use a command script that parses tool_input JSON.

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

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

Invocation

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
-sSchema 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.

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

# 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

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

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

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

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

# 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

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

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

# 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

# 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 fields`find "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:

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.
  • To add a new key to an object, use set.
  • -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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.89%
按下载量换算38

Claude

30.91%
按下载量换算36

Cursor

18.73%
按下载量换算22

Gemini CLI

9.51%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills