github-discussion-query

Query GitHub discussions via gh CLI with jq filtering.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of querying GitHub discussions by providing efficient jq filtering support, allowing users to quickly retrieve, filter, and transform discussion data for analysis or further automation. It helps AI agents and developers automate data collection and analysis from GitHub.

Core Features & Use Cases

  • Flexible Querying: List discussions from the current or any specified repository with options for limit.
  • Advanced jq Filtering: Use jq expressions to filter by author, categories, answers, comments, and transform output to desired formats.
  • Schema & Size Information: Get schema and data size details when no jq filter is provided, preventing overwhelming responses.
  • Automated Data Extraction: Ideal for AI agents needing specific discussion data for decision-making or reporting.
  • Use Case: An AI agent needs to find all unanswered discussions in the "Ideas" category. This skill enables the agent to execute a query-discussions.sh --jq '.[] | select(.answer == null and .category.name == "Ideas")' command.

Quick Start

Use the github-discussion-query skill to list the number and title of all discussions in the current repository: ./query-discussions.sh --jq '.[] | {number, title}'.

Frequently Asked Questions about github-discussion-query

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

FAQPage Schema
How do I filter GitHub discussions by category and answer status?

Filter GitHub discussions using jq expressions to select by category, answer status, and other fields. Run `query-discussions.sh --jq '.[] | select(.answer == null and .category.name == "Ideas")'` to retrieve unanswered discussions in a specific category. The skill supports filtering across authors, labels, and comment counts.

Can I query discussions from a repository I don't have open locally?

Yes, query discussions from any repository by specifying the owner and repo. Use the `--repo` flag to target a different repository: `query-discussions.sh --repo owner/repo`. The skill operates on the current repository by default but supports querying any accessible GitHub repository.

How do I see the schema and data size before running a jq filter?

Run `query-discussions.sh` without the `--jq` flag to return schema and data size information. This prevents overwhelming responses and helps you understand the discussion data structure before applying custom filters or transformations.

What's the best way to automate extracting discussion data from GitHub?

Use this skill to automate discussion data extraction with GitHub CLI and jq filtering. It retrieves discussions across categories, authors, and statuses, then transforms output to your desired format—ideal for AI agents building reports or automating analysis workflows.

Does this work with the GitHub CLI?

Yes, the skill requires and operates through GitHub CLI (gh). It uses gh commands to retrieve discussion data, then applies jq expressions for filtering and transformation. Ensure GitHub CLI is installed and authenticated to use this skill.

Can I limit the number of discussions returned?

Yes, use the `--limit` flag to control the number of discussions fetched. Combine it with jq filters to retrieve and process only the discussions you need from large repositories.