GitHub CLI - Repository Management

VerifiedSafe

Interacts with GitHub repositories, pull requests, and issues using the `gh` command-line tool. Helpful for listing PRs, viewing issues, checking out PRs locally, or creating releases.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#github#cli#pr-management

Recommended for

Automated summary

This skill leverages the `gh` command-line tool to interact with GitHub for managing pull requests, issues, and releases.

Strengths

  • Automates repetitive GitHub tasks directly from the terminal.
  • Provides structured JSON output for easy script consumption.
  • Explicit repo context with `--repo` avoids ambiguity.

Limitations

  • Requires `gh` to be installed and authenticated beforehand.
  • Does not cover advanced operations like GitHub Actions workflows.
  • Write operations (PR creation, releases) require manual confirmation.
When to use it

When you need to quickly view or modify GitHub items (PRs, issues, releases) without leaving your command-line environment.

When not to use it

For operations requiring a rich graphical interface or complex GitHub API interactions (prefer direct API use then).

Security analysis

Safe
Quality score88/100

The skill instructs the use of the official GitHub CLI (gh) for standard repository operations like listing PRs, viewing issues, and creating releases. It includes explicit security precautions: avoiding token leakage, preferring structured output, and not altering remotes or pushing without permission. No destructive or exfiltrating commands are present.

No concerns found

How this analysis is made

Examples

List open PRs with authors
List open PRs with authors for repo owner/name using gh
Show issue details and comments
Show issue 42 details and comments via gh
Checkout PR locally
Checkout PR 17 locally with gh

name: gh-cli description: Interact with GitHub repositories, PRs, and issues using the gh CLI. Use when the user asks to "list PRs", "check out PR", "view issue", or "create release". allowed-tools: Bash

Use GitHub CLI

Instructions

  1. Ensure gh is available and authenticated: run gh auth status (do not use --show-token); respect GH_HOST if set. Prefer GH_TOKEN/GITHUB_TOKEN env auth; never print tokens or add them to files.
  2. Set repo context explicitly with --repo owner/name or by checking the current repo via gh repo view; avoid assuming defaults.
  3. Prefer structured output with --json fields and --limit to keep responses concise (e.g., gh pr list --state open --json number,title,author,headRefName,baseRefName,url --limit 20).
  4. Common reads: gh pr view <number> --json number,title,state,author,mergedAt,commits,files,comments,url, gh issue list --state all --json number,title,state,author,url --limit 30, gh release list --limit 20, gh release view <tag> --json tagName,name,publishedAt,url.
  5. For write operations (create/update PRs, issues, comments, releases), confirm intent and required fields; use --title, --body, or --body-file without secrets. Avoid noisy outputs; capture URLs/results only.
  6. When checking out PRs locally, use gh pr checkout <number> and handle branch existence gracefully; do not alter remotes or push unless explicitly requested.

Example prompts

  • "List open PRs with authors for repo owner/name using gh"
  • "Show issue 42 details and comments via gh"
  • "Checkout PR 17 locally with gh"
  • "Draft release v1.2.0 on repo owner/name using gh"

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/github-cli-repository-management-mm8o52g3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/github-cli-repository-management-mm8o52g3/download' --output '.skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md.part' && mv '.skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md.part' '.skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md' && test -s '.skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/gh-cli' && cp -R '.skill-downloads/github-cli-repository-management-mm8o52g3' '.claude/skills/gh-cli'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/github-cli-repository-management-mm8o52g3'

openskills read 'github-cli-repository-management-mm8o52g3'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/github-cli-repository-management-mm8o52g3/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills