github

Manage GitHub pull requests, issues, reviews, and repositories via the gh CLI.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill github-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/software-development/github
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill github-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Working with GitHub involves many repetitive, error-prone operations: authenticating on new machines, triaging issues, driving the full PR lifecycle, reviewing code, and verifying CI status. This Skill consolidates those workflows into routed, verified procedures so every remote-state claim is backed by a live check rather than guesswork. ## Core Features & Use Cases - Authentication Setup: Configure git credentials or gh CLI auth via tokens, SSH keys, or the OAuth device flow, with fallbacks for headless machines. - Issue & PR Lifecycle: Create, triage, label, and close issues; branch, commit, open PRs, monitor CI, auto-fix failures, and merge. - Code Review: Review local diffs or open PRs with a structured checklist, then post inline comments and formal approve/request-changes reviews. - Issue-to-PR Delivery: Carry an issue from premise validation and duplicate sweeps through regression-tested fixes to a verified merged PR. - Use Case: Ask the agent to fix issue #42 — it reads the full thread, checks for duplicate PRs, implements and tests the fix, opens a PR, watches CI, and comments the resolution back on the issue. ## Quick Start Use the github skill to create a pull request for my current branch and watch its CI checks until they pass.

Frequently Asked Questions about github

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

FAQPage Schema
How do I create a GitHub pull request from the command line?

Push your branch with git push -u origin HEAD, then run gh pr create with a title and body. Without gh, POST to the GitHub REST API pulls endpoint with your branch as head and main as base using a personal access token.

How do I review a pull request with inline comments using gh?

Fetch the PR head SHA with gh pr view, then use gh api to POST review comments with path, line, and commit_id. Submit a formal verdict with gh pr review using --approve, --request-changes, or --comment.

Can I use the GitHub API without installing the gh CLI?

Yes, every workflow has a curl fallback using a personal access token in the Authorization header against api.github.com. The token can come from an environment variable, a .env file, or the git credential store.

Why does gh auth login hang on a headless Linux server?

On keyring-less machines, gh's credential storage can block indefinitely waiting on a secret-service keyring. Wrap the login in a timeout and, if it hangs, write the token directly to ~/.config/gh/hosts.yml instead.

How do I check CI status for a pull request from the terminal?

Run gh pr checks for a one-shot status or gh pr checks --watch to poll until completion. With curl, query the commit status and check-runs API endpoints for the branch's HEAD SHA.

What should I verify before claiming a GitHub issue is fixed?

Confirm the regression test fails without the fix, check live CI state with gh pr checks, and verify the merged state via the PR's state and mergedAt fields. Never report green or merged from memory alone.