agentleFS
rshadershade/finfocus/.github/skills/jqschema/SKILL.md

jqschema

Skill10 starsChanged 2 months agoApache-2.0View on GitHub

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

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. github/gh-aw★ 5.3k42% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ./.github/skills/jqschema/jqschema.sh directly from the repository skill folder to discover complex JSON structure.

    line 13
  2. Very specific:

    When using tools like search_code, search_issues, or search_repositories, pipe the output through jqschema to discover available fields:

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

jqschema - JSON Schema Discovery

Use ./.github/skills/jqschema/jqschema.sh directly from the repository skill folder to discover complex JSON structure.

Purpose

Generate a compact structural schema (keys + types) from JSON input. Use it when:

  • Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
  • Exploring API responses with large payloads
  • Understanding the structure of unfamiliar data without verbose output
  • Planning queries before fetching full data

Usage

# Analyze a file
cat data.json | ./.github/skills/jqschema/jqschema.sh

# Analyze command output
echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | ./.github/skills/jqschema/jqschema.sh

# Analyze GitHub search results
gh api search/repositories?q=language:go | ./.github/skills/jqschema/jqschema.sh

How It Works

The script transforms JSON data by:

  1. Replacing object values with their type names ("string", "number", "boolean", "null")
  2. Reducing arrays to their first element's structure (or empty array if empty)
  3. Recursively processing nested structures
  4. Outputting compact (minified) JSON

Example

Input:

{
  "total_count": 1000,
  "items": [
    {"login": "user1", "id": 123, "verified": true},
    {"login": "user2", "id": 456, "verified": false}
  ]
}

Output:

{"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}

Best Practices

Use this script when:

  • You need to understand the structure of tool outputs before requesting full data
  • GitHub search tools return large datasets (use perPage: 1 and pipe through schema minifier first)
  • Exploring unfamiliar APIs or data structures
  • Planning data extraction strategies

Example workflow for GitHub search tools:

# Step 1: Get schema with minimal data (fetch just 1 result)
# This helps understand the structure before requesting large datasets
echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | ./.github/skills/jqschema/jqschema.sh

# Output shows the schema:
# {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}

# Step 2: Review schema to understand available fields

# Step 3: Request full data with confidence about structure
# Now you know what fields are available and can query efficiently

Using with GitHub MCP tools: When using tools like search_code, search_issues, or search_repositories, pipe the output through jqschema to discover available fields:

# Save a minimal search result to a file
gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json

# Generate schema to understand structure
cat /tmp/sample.json | ./.github/skills/jqschema/jqschema.sh

# Now you know which fields exist and can use them in your analysis

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.