mcpbeat Sign in

Github Agent Skill

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2566
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Azure/azure-sdk-for-java --skill github

The instruction itself

13 sections, as written by the author

GitHub Skill

Use the gh CLI to interact with GitHub. Always pass --repo owner/repo when not inside a cloned git directory.

Pull Requests

List open PRs:

gh pr list --repo owner/repo

View a specific PR (summary, checks, comments):

gh pr view 55 --repo owner/repo

Check CI status on a PR:

gh pr checks 55 --repo owner/repo

CI / Workflow Runs

List recent runs:

gh run list --repo owner/repo --limit 10

View a run summary (steps, status):

gh run view <run-id> --repo owner/repo

View logs for failed steps only:

gh run view <run-id> --repo owner/repo --log-failed

Re-run failed jobs:

gh run rerun <run-id> --repo owner/repo --failed

Issues

List open issues (optionally filter by label):

gh issue list --repo owner/repo
gh issue list --repo owner/repo --label bug

View a specific issue:

gh issue view 42 --repo owner/repo

Create an issue:

gh issue create --repo owner/repo --title "Title" --body "Description" --label bug

JSON Output & Filtering

Most commands support --json with --jq for structured output:

# List PR numbers and titles
gh pr list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'

# List issues with assignees
gh issue list --repo owner/repo --json number,title,assignees \
  --jq '.[] | "\(.number): \(.title) → \(.assignees[].login // "unassigned")"'

Advanced: gh api

Use gh api for data or actions not covered by other subcommands.

Fetch a PR with specific fields:

gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'

List check runs for a commit:

gh api repos/owner/repo/commits/<sha>/check-runs \
  --jq '.check_runs[] | "\(.name): \(.conclusion)"'

Paginate results (e.g., all issues):

gh api --paginate repos/owner/repo/issues --jq '.[].title'

Steps

  • Check if gh is installed by running gh --version.
  • If the command is not found, install it (see Installation below).
  • Check if gh is authenticated by running gh auth status.
  • If not authenticated, run gh auth login.
  • If owner/repo is not provided, check if there is a .git directory and infer the remote via gh repo view --json nameWithOwner. Otherwise ask the user for the repo.
  • Choose the appropriate subcommand (pr, issue, run, api) based on the user's request.
  • Prefer structured subcommands (gh pr, gh issue, gh run) over raw gh api when they cover the use case.
  • Use --json + --jq when the user needs specific fields or wants to pipe output into further processing.
  • If a workflow run is failing, start with gh pr checks for a quick overview, then gh run view --log-failed for detailed output.
  • Report results clearly; if output is large, summarize and highlight the relevant parts.

Installation

If gh is missing, install it using the recommended method for the current OS.

Detect the OS first, then run the matching command.

Windows

winget install --id GitHub.cli

> Note: open a new terminal window after installation for PATH changes to take effect.

macOS

brew install gh

Linux (Debian / Ubuntu)

(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
	&& sudo mkdir -p -m 755 /etc/apt/keyrings \
	&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
	&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
	&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
	&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
	&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
	&& sudo apt update \
	&& sudo apt install gh -y

Linux (Fedora / RHEL / CentOS)

sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh --repo gh-cli

After installation, verify with gh --version, then authenticate with gh auth login if needed.

Notes

  • gh must be authenticated (gh auth status). If not, run gh auth login first.
  • --repo accepts both owner/repo shorthand and full HTTPS URLs.
  • For gh api, use --method POST/PATCH/DELETE for write operations and pass body fields with -f field=value or -F field=<int>.
  • gh run list defaults to the current branch when run inside a git repo; pass --branch <name> to target a specific branch.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take azure/github from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference brew. Without those the skill loads but fails at the first command.