Skip to content

Guide · Agent skill

How to use the GitHub CLI agent skill (gh): setup and examples

Updated · written with AI from the project's own documentation and checked against our catalogue data

The GitHub skill lets an AI agent work with GitHub through the gh command-line tool. Once it is installed and gh is logged in, you can ask the agent to check pull request status, look at CI runs and their logs, or list, create, comment on, and close issues. This guide explains what an agent skill is, how to install this one, how to ask for things in plain language, and what to watch for.

GitHub CLI Operationsspinabot/brigade · MIT

Quick start

  1. 1Install gh. Install the GitHub CLI with Homebrew or apt.
  2. 2Log in. Run gh auth login with your GitHub account, then gh auth status to confirm.
  3. 3Download the skill ZIP. Get the ZIP from this page and unzip it.
  4. 4Place the folder. Put it in ~/.claude/skills/ for personal use or .claude/skills/ for one project, or upload the ZIP under Settings → Capabilities → Skills.
  5. 5Ask in plain language. Request a PR check, log view, or issue action and include the repository and item number.

What is an agent skill and what does this one do?

An agent skill is a folder containing a SKILL.md file that tells an AI agent when to use a tool and how to use it. This skill is named github and its file is SKILL.md. It teaches the agent to run the gh CLI for GitHub repositories, issues, pull requests, and CI.

The skill covers checking PR status, reviews, and merge readiness, viewing workflow run status and logs, creating, closing, or commenting on issues, creating or merging pull requests, listing repos, releases, or collaborators, and querying the GitHub API for repository data.

Install the GitHub CLI (gh) first

The skill depends on gh. The skill's metadata lists two install options: Homebrew (formula gh) and apt (package gh). After installing, authenticate once with gh auth login, then confirm it works with gh auth status.

The skill will not work without a logged-in gh session, so this step comes before everything else.

  • Homebrew: install the gh formula
  • apt: install the gh package
  • Required: a GitHub account authenticated with gh auth login
gh auth login gh auth status

Download and install the skill

Download the ZIP of the skill from this page and unzip it. For a personal install, place the unzipped folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.

Alternatively, upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Per project: .claude/skills/ inside the project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Ask for GitHub work in plain language

You do not need to remember gh syntax. Describe the outcome you want, and the agent picks the matching command. The skill's triggers include checking PR status or CI, creating or commenting on issues, listing or filtering PRs or issues, and viewing run logs.

Good requests name the repository and the item, for example the PR number, so the agent knows what to query. The skill's notes say to specify the repository when you are not inside a git directory.

  • Check whether PR #55 in owner/repo is passing CI.
  • Show the failed step logs for the latest run of the main workflow in owner/repo.
  • List open issues in owner/repo labelled as bugs and summarize them.
  • Comment on issue 42 in owner/repo asking for a reproduction.

Commands the agent uses

These are the underlying commands from the skill, shown so you can see what will run. Replace owner/repo and the numbers with your own values.

  • Pull requests: gh pr list, gh pr checks, gh pr view, gh pr create, gh pr merge
  • Issues: gh issue list, gh issue create, gh issue close
  • CI runs: gh run list, gh run view, gh run view --log-failed, gh run rerun --failed
  • API: gh api with --jq filtering
gh pr checks 55 --repo owner/repo gh run view <run-id> --repo owner/repo --log-failed gh issue list --repo owner/repo --state open

Tips for better results

Most commands support --json for structured output combined with --jq filtering, which helps when you want a compact list. The skill also notes that rate limits apply and suggests gh api --cache 1h for repeated queries.

Use a full PR or issue URL instead of a number when you have one, because the skill shows that gh accepts URLs directly.

  • Filter open PRs by mergeability with --json and --jq.
  • Use gh api --cache 1h for queries you repeat.
  • Paste a PR URL instead of number plus repo.
gh pr view https://github.com/owner/repo/pull/55

What people use it for

  • Check whether a pull request is ready to merge and what CI reports on it.
  • Pull the failed step log from a CI run to find why a build broke.
  • Triage open issues in a repository by label and creation date.
  • Create or comment on an issue from a summary the agent has drafted.

Frequently asked questions

Is the GitHub agent skill free?

The skill is published under the MIT licence. The gh CLI is installed separately through Homebrew or apt, and this page does not state any price for the skill itself.

What do I need before the skill works?

You need the GitHub CLI (gh) installed through Homebrew or apt, and a GitHub account authenticated with gh auth login. The skill cannot work without a logged-in gh session.

Where do I put the skill files?

Unzip the downloaded ZIP into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

Does the agent act with my GitHub permissions?

Yes. The skill relies on your existing gh login, so any action it takes, such as creating an issue or merging a PR, uses your permissions on GitHub.

Does this work with GitLab or Bitbucket?

No. The skill is for GitHub only. The source says non-GitHub hosts such as GitLab, Bitbucket, and self-hosted repos need different CLIs.

Can it handle local git commits, pushes, or branches?

No. The skill says local git operations such as commit, push, pull, and branch should be done with git directly.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who review PRs, check CI failures, and triage issues, especially teams already using gh. Skip it if you do not use GitHub, if you cannot run gh with a logged-in account, or if you mainly need local git work or browser-based GitHub flows.

Download the skill