github-discussion-query

Query GitHub Discussions via gh CLI with optional jq filtering.

4.9k|489|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill github-discussion-query-github
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-discussion-query
Source: https://github.com/github/gh-aw/tree/main/skills/github-discussion-query
Command: npx skills add https://github.com/github/gh-aw --skill github-discussion-query-github

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, jq, and includes scripts (resource) components.

What problem does it solve?

This Skill enables fast, flexible querying of GitHub Discussions using jq filters, helping teams quickly extract relevant discussion data without loading full payloads.

Core Features & Use Cases

  • Interactive data exploration: fetch discussions from a repository and apply jq expressions to shape results.
  • Schema-first data discovery: when no jq is provided, returns a schema with data size guidance.
  • Use Case: For a repository with hundreds of discussions, quickly extract numbers, titles, and authors for reporting.

Quick Start

To fetch the first 30 discussions for the current repo and then apply a filter, run: ./query-discussions.sh --limit 30 To filter results with jq, for example: ./query-discussions.sh --jq '.[] | {number, title, author: .author.login}'

Frequently Asked Questions about github-discussion-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query GitHub discussions using the command line?

You can query GitHub discussions via the command line by running a script that leverages the gh CLI for data retrieval and jq for filtering. It returns structured data, allowing targeted extraction of specific fields like titles and authors.

What is the best way to filter GitHub discussion data with jq?

The best way to filter GitHub discussion data with jq is to pass a jq expression to the query script. This extracts specific fields and shapes the structured results without loading the full payload.

Do I need to install jq and gh to fetch GitHub discussions?

Yes, you need both the gh CLI and jq installed. The Skill relies on the gh CLI for data retrieval and jq for applying targeted filters to the fetched discussion data.

Can I fetch discussion data from a specific GitHub repository?

Yes, you can fetch discussions from a specific GitHub repository. The query script applies to the current repository by default or accepts a specified owner/repo parameter to target different repositories.

What happens if I run a GitHub discussion query without a jq filter?

Running a GitHub discussion query without a jq filter triggers schema-only discovery. It returns a schema with data size guidance instead of executing targeted data extraction.

How do I extract specific fields like titles and authors from GitHub discussions?

To extract specific fields from GitHub discussions, provide a jq expression to the query script. This filters the structured data to return only the targeted fields like numbers, titles, and authors.