# Github CLI

> Interact with GitHub via the official `gh` CLI. Use when you need to create repositories, list issues, manage pull requests, or check GitHub authentication status.

- Skill: `claio0128/github-cli` (Agent Skill)
- Install (CLI): `npx skillmds@latest add claio0128/github-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/claio0128/github-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: claio0128 (https://skillmd.com/u/claio0128)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/claio0128/github-cli

---


# GitHub CLI Skill

## Overview

The `github-cli` skill provides procedural knowledge for interacting with GitHub using the `gh` command-line tool. It covers repository management, issue tracking, and pull request workflows.

## Core Workflows

### 1. Authentication Check
Before performing any GitHub operations, it's essential to check if the user is authenticated.
- **Command:** `gh auth status`
- **When to use:** Use this as the first step for any GitHub task to avoid permission errors.

### 2. Repository Management
Create and list repositories easily.
- **Create a repo:** `gh repo create <name> --public --clone`
- **List repos:** `gh repo list <owner>`
- **View README:** `gh repo view <owner/repo>`

### 3. Issue Tracking
Manage project issues directly from the CLI.
- **List issues:** `gh issue list`
- **Create issue:** `gh issue create --title "Title" --body "Body"`
- **View issue:** `gh issue view <number>`

### 4. Pull Request Management
Handle the code review process efficiently.
- **List PRs:** `gh pr list`
- **Create PR:** `gh pr create --title "Title" --body "Body"`
- **Check PR status:** `gh pr status`
- **View PR details:** `gh pr view <number>`

## Detailed Command Reference

For more specialized flags and commands, refer to [references/commands.md](references/commands.md). This file contains exhaustive lists of options for repository, issue, and PR management.

## Guidelines

- **Conciseness:** Prefer short, specific commands over verbose ones.
- **Confirmation:** When creating repositories, issues, or PRs, always provide the final URL in your response.
- **Error Handling:** If a command fails due to authentication issues, suggest running `gh auth login` to the user.

