
github-discussion-query
Query GitHub discussions with jq filtering and reusable selectors.
- Installs
- 56
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/github/gh-aw --skill github-discussion-query- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads github-discussion-query automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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 jqfor filtering (installed by default on most systems)
FAQ
What does the github-discussion-query skill do?
Query GitHub discussions with jq filtering and reusable selectors.
How do I install github-discussion-query?
Run npx skills add https://github.com/github/gh-aw --skill github-discussion-query in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-discussion-query/ (personal) or .claude/skills/github-discussion-query/ (project).
Which AI agents can use github-discussion-query?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is github-discussion-query safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains github-discussion-query?
It is published by github in github/gh-aw, and it is an official skill from the maker of the technology it covers. It has 56 recorded installs.
More from github/gh-aw
github-mcp-server
github/gh-aw
Reference for GitHub MCP server tools, methods, and usage patterns.
developer
github/gh-aw
Core developer rules and coding conventions for gh-aw changes.
javascript-refactoring
github/gh-aw
Split large JavaScript files into maintainable modules safely.
debugging-workflows
github/gh-aw
Diagnose gh-aw failures using the canonical debugging strategy and evidence reference.
agentic-workflows
github/gh-aw
Open the skill to read its SKILL.md instructions.
github-pr-query
github/gh-aw
Query GitHub pull requests with jq filtering and reusable selectors.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.