# Gh

GitHub CLI skill for interacting with GitHub via the gh command line tool.

- Repository: https://github.com/bubbuild/bub (1696 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bubbuild/bub --skill gh -g -a claude-code -y`
Codex: `npx skills add bubbuild/bub --skill gh -g -a codex -y`
Cursor: `npx skills add bubbuild/bub --skill gh -g -a cursor -y`
Gemini CLI: `npx skills add bubbuild/bub --skill gh -g -a gemini-cli -y`

## Description

GitHub CLI skill for interacting with GitHub via the gh command line tool. Use when Bub needs to (1) Create, view, or manage GitHub repositories, (2) Work with issues and pull requests, (3) Create and manage releases, (4) Run and monitor GitHub Actions workflows, (5) Create and manage gists, (6) Install and manage agent skills, or (7) Perform any GitHub operations via command line.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# GitHub CLI (gh) Skill

Interact with GitHub using the gh command line tool.

Run commands with Bub's `bash` tool, setting `cwd` to the target checkout when using local repository context. If it returns a running shell ID, collect the result with `bash.output` before retrying the command.

## Prerequisites

Use the authentication source specified by the user or workspace. For github.com, `GH_TOKEN` takes precedence over `GITHUB_TOKEN`, and both override stored `gh` credentials.

Check authentication:
```bash
gh auth status
```

If not authenticated, report the blocker; do not silently switch credentials. Run interactive login only when the user requests authentication setup:
```bash
gh auth login
```

## Repository Operations

```bash
gh repo create <name> [--public|--private]
gh repo clone <owner/repo>
gh repo fork <owner/repo>
gh repo view [owner/repo]
gh repo list [owner]
```

## Issue Operations

```bash
gh issue create --title "Title" --body "Body"
gh issue list [--state open|closed]
gh issue view <number>
gh issue close <number>
gh issue comment <number> --body "Comment"
```

## Pull Request Operations

```bash
gh pr create --title "Title" --body "Body"
gh pr list [--state open|closed]
gh pr view <number>
gh pr checkout <number>
gh pr merge <number>
gh pr review <number> --approve
```

## Release Operations

```bash
gh release create <tag> --generate-notes
gh release list
gh release download <tag>
gh release upload <tag> <file>
```

## Workflow Operations

```bash
gh workflow list
gh workflow run <name>
gh run list
gh run view <run-id>
gh run watch <run-id>
```

## Gist Operations

```bash
gh gist create <file>
gh gist list
gh gist view <id>
```

## Skill Operations

```bash
gh skill search <query>
gh skill preview <owner/repo> <skill>
gh skill install <owner/repo> <skill> --dir .agents/skills
gh skill list --dir .agents/skills
gh skill update <skill> --dir .agents/skills --dry-run
gh skill update <skill> --dir .agents/skills --all
```

The rest: https://github.com/bubbuild/bub/blob/HEAD/src/skills/gh/SKILL.md
