jqschema
仓库创建 2025年8月13日最近提交 2 小时前SkillHot 收录 1 小时前
▸ 精选理由
快速发现 JSON 结构,适合数据探索与调试命令输出。
这个 Skill 做什么
用 jq 脚本从 JSON 输入生成紧凑的结构化模式(键与类型)。
把任意 JSON 用 jq 快速扫一遍,输出每个键和对应类型的紧凑结构,方便你先看清数据长啥样再去查询或处理。常在拿到陌生 API 响应或大文件、要做 ETL/查询前用,能避免盲目筛选字段。特点是通过 shell pipe 直接接入输入、轻量且只关注结构而非完整数据,结果易读便于后续探索。
▸ 展开 SKILL.md 英文原文
Infer JSON structure and types with jq-based schema discovery.
4.9k
Stars
482
Forks
40
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/github/gh-aw/main/.github/skills/jqschema/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/github/gh-aw/main/.github/skills/jqschema/SKILL.md"SKILL.MD 节选查看完整文件 ↗
## jqschema - JSON Schema Discovery
Use `./.github/skills/jqschema/jqschema.sh` to generate a compact structural schema (keys + types) from JSON input. Pipe any JSON source through it to discover structure before querying full data.
```bash
# Analyze a file or command output
cat data.json | ./.github/skills/jqschema/jqschema.sh
gh api search/repositories?q=language:go | ./.github/skills/jqschema/jqschema.sh
```
The script replaces object values with type names (`"string"`, `"number"`, `"boolean"`, `"null"`), reduces arrays to first-element structure, and outputs compact JSON. Use `perPage: 1` to fetch minimal data when exploring unknown API shapes.
**Example**: `{"total_count":1000,"itemvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有