github

Provides tested GitHub CLI, GraphQL, and pull-request operation patterns with merge-gate enforcement.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/fx/skills --skill github-fx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github
Source: https://github.com/fx/skills/tree/main/skills/github
Command: npx skills add https://github.com/fx/skills --skill github-fx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with the GitHub CLI (gh) involves recurring pitfalls: heredoc command substitutions that silently fail, PR-level comments created instead of thread replies, unscoped review checks that accept stale Copilot reviews, and single-page GraphQL reads that silently truncate review threads. This Skill documents tested patterns and hard blocking rules so these mistakes are not repeated. ## Core Features & Use Cases - Merge Gate Enforcement: Defines blocking verification gates before any gh pr merge — green CI, a Copilot review scoped to the current head commit, resolved automated-reviewer threads, and passing Codecov checks. - GraphQL Patterns Reference: Provides pagination-safe gh api graphql --paginate --slurp patterns for reading review threads to exhaustion, resolving threads, and counting unresolved bot comments without false-zero results. - PR and Messaging Conventions: Enforces conventional-commit PR titles, forbids #<number> wave references in titles, prohibits draft PRs and PR-level comments, and bans hard-wrapped markdown bodies with a mechanical awk checker. - Use Case: Before merging a pull request, run the head-SHA-scoped Copilot review query to confirm the current commit was actually reviewed, then resolve all automated-reviewer threads using the paginated GraphQL pattern. ## Quick Start Ask the agent to verify all merge gates and resolve the outstanding Copilot review threads on pull request number 13 using the github skill.

Frequently Asked Questions about github

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

FAQPage Schema
How do I resolve GitHub Copilot review threads with the gh CLI?▼

Use the GraphQL resolveReviewThread mutation via gh api graphql with the thread's node ID, which starts with RT_. Never use gh pr review --comment, which creates a PR-level comment instead of replying to the thread.

How do I check if Copilot reviewed the current PR commit?▼

Query the PR's reviews via the REST API and filter for the copilot-pull-request-reviewer login where commit_id equals the current headRefOid. An unscoped check can accept a review of a superseded commit, which does not cover the code being merged.

Why does gh pr edit --body with a heredoc not work?▼

Command substitutions inside quoted heredocs are not evaluated, so gh receives the literal string. Use --body-file, pass the file via gh api with -F body=@file, or read the file into a variable first.

Can I check whether a Copilot review is pending via requested_reviewers?▼

No. The requested_reviewers field is empirically always empty for the Copilot bot, even while a review is on its way. The only sound signal is a delivered review whose commit_id matches the PR's current head SHA.

How do I paginate GitHub GraphQL review threads without missing results?▼

Use gh api graphql --paginate --slurp with an $endCursor variable and pageInfo fields, which requires gh 2.48.0 or later. Accumulate nodes across all pages, verify the count against totalCount, then filter and count.

When should I not use this GitHub CLI guidance?▼

The skill is explicit-use only: invoke it when the user names it or an active workflow calls it. Ordinary GitHub operations like simple clones or PR views should be handled directly without loading this guidance.