GI

github-discussion-query

Search and filter GitHub discussions using jq arguments to extract precise information.

Install

mkdir -p .claude/skills/github-discussion-query && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9318" && unzip -o skill.zip -d .claude/skills/github-discussion-query && rm skill.zip

Installs to .claude/skills/github-discussion-query

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Query GitHub discussions with jq filtering and reusable selectors.
66 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Queries GitHub discussions
  • Filters results using jq syntax
  • Retrieves specific metadata or content

How it works

It executes a script that fetches discussion data from GitHub and optionally pipes it through jq for filtering.

Inputs & outputs

You give it
Repository name and optional jq filter
You get back
JSON data from GitHub discussions

When to use github-discussion-query

  • Filter discussions by author
  • Extract thread content by label
  • Search discussions for specific keywords
  • Analyze discussion participation data

About this skill

GitHub Discussion Query Skill

Query GitHub discussions efficiently with built-in jq filtering.

Important: jq Parameter is Optional

The --jq parameter is optional. Without --jq, this skill returns schema and data size information instead of full data. Use this to avoid oversized responses and inspect structure before targeted queries.

Use --jq '.' to get all data, or use a more specific filter for targeted results.

Usage

Use this skill to query discussions from the current repository or any specified repository.

Basic Query (Returns Schema Only)

To list discussions from the current repository:

./query-discussions.sh
# Returns schema and data size, not full data

Get All Data

To get all discussion data:

./query-discussions.sh --jq '.'

With Repository

To query a specific repository:

./query-discussions.sh --repo owner/repo

With jq Filtering

Use the --jq argument to filter and transform the output:

# Get discussion numbers and titles
./query-discussions.sh --jq '.[] | {number, title}'

# Get discussions by a specific author
./query-discussions.sh --jq '.[] | select(.author.login == "username")'

# Get discussions in a specific category
./query-discussions.sh --jq '.[] | select(.category.name == "Ideas")'

# Get answered discussions
./query-discussions.sh --jq '.[] | select(.answer != null)'

# Count discussions by category
./query-discussions.sh --jq 'group_by(.category.name) | map({category: .[0].category.name, count: length})'

Common Options

  • --limit: Maximum number of discussions to fetch. Default: 30
  • --repo: Repository in owner/repo format. Default: current repo
  • --jq: (Optional) jq expression for filtering/transforming output. If omitted, returns schema info

Example Queries

Find discussions with many comments:

./query-discussions.sh --jq '.[] | select(.comments.totalCount > 5) | {number, title, comments: .comments.totalCount}'

Get unanswered discussions:

./query-discussions.sh --jq '.[] | select(.answer == null) | {number, title, category: .category.name}'

List discussions with their labels:

./query-discussions.sh --jq '.[] | {number, title, labels: [.labels[].name]}'

Find discussions by category:

./query-discussions.sh --jq '.[] | select(.category.name == "Q&A") | {number, title, author: .author.login}'

Get recently updated discussions:

./query-discussions.sh --jq 'sort_by(.updatedAt) | reverse | .[0:10] | .[] | {number, title, updatedAt}'

Output Format

The script outputs JSON by default, making it easy to pipe through jq for additional processing.

Requirements

  • GitHub CLI (gh) authenticated
  • jq for filtering (installed by default on most systems)

When not to use it

  • When the GitHub CLI is not authenticated

Prerequisites

GitHub CLI (gh) authenticatedjq installed

Limitations

  • Requires jq for filtering
  • Requires authenticated GitHub CLI

How it compares

It allows for structured, filtered queries of GitHub discussions using jq instead of manual browsing or basic API calls.

Compared to similar skills

github-discussion-query side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
github-discussion-query (this skill)03moReviewIntermediate
cass02moCautionIntermediate
gsd-scan03moNo flagsBeginner
session-search17moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry