Official agent skill

GitHub PR Query

by github in github/gh-aw

Query GitHub pull requests with jq filtering and reusable selectors.

OfficialMITAuto-check passedDevelopment

Install GitHub PR Query

skills CLI
$ npx skills add github/gh-aw --skill github-pr-query -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/gh-aw github-pr-query --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/gh-aw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/github-pr-query .claude/skills/github-pr-query && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
github-pr-query
GitHub stars
5.3k
Token cost
~887 tokens
SKILL.md length
251 words
Files
2
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Query GitHub pull requests with jq filtering and reusable selectors.

  • Tasks that involve Pull requests
  • SKILL.md covers Important: jq Parameter is…, Usage, Output Format and Requirements
  • Runs Shell scripts from its folder

What it does

GitHub PR Query is an agent skill from github/gh-aw, published by the product's own GitHub organization. Query GitHub pull requests with jq filtering and reusable selectors.

Its SKILL.md is about 890 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `query-prs.sh`).

It sits in Development, covering Pull requests. It works with GitHub. The repository describes itself as: GitHub Agentic Workflows. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/github-pr-query”

Requirements

  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit eb63040. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub PR Query loads about 887 tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 251 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~887

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/gh-aw at commit eb63040, republished under its MIT licence (© github). 251 words, ~887 tokens.

Download SKILL.mdSave it as .claude/skills/github-pr-query/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
github-pr-query
description
Query GitHub pull requests with jq filtering and reusable selectors.

GitHub Pull Request Query Skill

Query GitHub pull requests 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 pull requests from the current repository or any specified repository.

Basic Query (Returns Schema Only)

To list pull requests from the current repository:

bash
./query-prs.sh
# Returns schema and data size, not full data
Get All Data

To get all PR data:

bash
./query-prs.sh --jq '.'
With Repository

To query a specific repository:

bash
./query-prs.sh --repo owner/repo
With jq Filtering

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

bash
# Get only open PRs
./query-prs.sh --jq '.[] | select(.state == "open")'

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

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

# Get merged PRs from last week
./query-prs.sh --jq '.[] | select(.mergedAt != null)'

# Count PRs by state
./query-prs.sh --jq 'group_by(.state) | map({state: .[0].state, count: length})'
Common Options
  • --state: Filter by state (open, closed, merged, all). Default: open
  • --limit: Maximum number of PRs to fetch. Default: 30
  • --repo: Repository in owner/repo format. Default: current repo
  • --author: Filter PRs by author login
  • --app: Filter PRs by GitHub App author
  • --search: Apply GitHub issue/PR search syntax
  • --jq: (Optional) jq expression for filtering/transforming output. If omitted, returns schema info
Example Queries

Find large PRs (many changed files):

bash
./query-prs.sh --jq '.[] | select(.changedFiles > 10) | {number, title, changedFiles}'

Get PRs awaiting review:

bash
./query-prs.sh --jq '.[] | select(.reviewDecision == "REVIEW_REQUIRED") | {number, title, author: .author.login}'

Get PRs authored by GitHub Actions app activity context:

bash
./query-prs.sh --app github-actions --jq '.[] | {number, title, author: .author.login}'

Find in-scope review feedback (team/collaborator + trusted automation):

bash
# Trusted automation is matched by login; humans are matched by association.
./query-prs.sh --jq \
  '.[] | {number, title, reviews: [.reviews[]? | select(.author.login == "github-actions[bot]" or .author.login == "app/github-copilot" or .authorAssociation == "MEMBER" or .authorAssociation == "OWNER" or .authorAssociation == "COLLABORATOR")] }'

Ignore external review feedback:

bash
./query-prs.sh --jq \
  '.[] | {number, title, external_reviews: [.reviews[]? | select(.authorAssociation == "CONTRIBUTOR" or .authorAssociation == "FIRST_TIME_CONTRIBUTOR" or .authorAssociation == "FIRST_TIMER" or .authorAssociation == "NONE")] }'

List PRs with their labels:

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

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)

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .github/skills/github-pr-query of github/gh-aw.

  • SKILL.md
  • query-prs.sh

Open the folder on GitHubat commit eb63040

Compare with similar skills

GitHub PR Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub PR Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub PR Query this skillgithub/gh-aw5.3k—~887Automated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed

More from github/gh-aw

All 52 skills in this repo
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.3k GitHub starsUsed in 23 repos~2.8k tokens
    Auto-check passed
  • Official

    Designs and verifies a deterministic grader that measures whether a GitHub Agentic Workflow run reached its real-world or repository outcome.

    5.3k GitHub stars~6.8k tokensUpdated today
    Auto-check passed
  • Official

    Scaffolds, edits, reloads and debugs a canvas extension that the GitHub Copilot CLI can open in its side panel.

    5.3k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Official

    Drives an open pull request to merge-ready from inside a GitHub Copilot cloud agent, resolving review threads and local checks concurrently, without merging or retriggering CI.

    5.3k GitHub stars~3.8k tokensUpdated today
    Auto-check: warnings
  • Official

    Bumps gh-aw's pinned gh-aw-firewall version, rebuilds generated artifacts, and flags upstream spec or schema changes that need follow-up work.

    5.3k GitHub stars~899 tokensUpdated today
    Auto-check passed
  • Official

    Guide to the console struct tag system in gh-aw: headers, titles, number and cost formats, omitempty, and how structs, slices and maps render in the terminal.

    5.3k GitHub stars~736 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about GitHub PR Query

What does GitHub PR Query do?

Query GitHub pull requests with jq filtering and reusable selectors. GitHub PR Query is an agent skill from github/gh-aw, published by the product's own GitHub organization. Query GitHub pull requests with jq filtering and reusable selectors.

When should I use GitHub PR Query?

GitHub PR Query fits situations like: tasks that involve Pull requests.

How do I install GitHub PR Query in Claude Code?

Run `npx skills add github/gh-aw --skill github-pr-query -a claude-code`. Or copy the skill folder (.github/skills/github-pr-query in github/gh-aw) into .claude/skills/github-pr-query in your project. Claude Code loads it when a task matches its description.

How do I install GitHub PR Query in Codex?

Run `npx skills add github/gh-aw --skill github-pr-query -a codex`. Or copy the skill folder (.github/skills/github-pr-query in github/gh-aw) into .agents/skills/github-pr-query in your project. Codex loads it when a task matches its description.

Can I use GitHub PR Query in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/gh-aw --skill github-pr-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-pr-query, .gemini/skills/github-pr-query, .github/skills/github-pr-query and .opencode/skills/github-pr-query in your project.

What does GitHub PR Query need to run?

Going by SKILL.md and its folder, GitHub PR Query needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does GitHub PR Query access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is GitHub PR Query safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does GitHub PR Query use?

GitHub PR Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub PR Query use?

About 887 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GitHub PR Query?

Skills that share tags, products or a category with GitHub PR Query: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub PR Query?

github (a GitHub organization, an official publisher) maintains it in github/gh-aw, which has 5,350 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/gh-aw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.