# Jqschema

> Infer JSON structure and types with jq-based schema discovery.

- Skill: `gabrielmoreira/jqschema` (Agent Skill)
- Install (CLI): `npx skillmds@latest add gabrielmoreira/jqschema`
- Raw SKILL.md: https://api.skillmd.com/api/skills/gabrielmoreira/jqschema/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: gabrielmoreira (https://skillmd.com/u/gabrielmoreira)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/gabrielmoreira/jqschema

---


## 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,"items":[{"login":"user1","id":123}]}` → `{"total_count":"number","items":[{"login":"string","id":"number"}]}`

