# Gh

> Performs GitHub operations from the terminal using the gh CLI, including auth status, repo create/clone/fork, issues, pull requests, releases, and basic repo management.

- Skill: `kbarbel640-del/gh` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add kbarbel640-del/gh`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kbarbel640-del/gh/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools, DevOps & Infra, CI/CD, Dev Tooling
- Tags: Gh Cli, Github, Issues, Pull Requests, Releases, Repository Management
- Author: kbarbel640-del (https://skillmd.com/u/kbarbel640-del)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/kbarbel640-del/gh

---


# GitHub CLI (gh)

## Overview
Use `gh` for authenticated GitHub operations from the terminal. Prefer explicit, idempotent commands and report URLs back to the user.

## Quick checks
- Auth status:
```bash
gh auth status
```
- Current repo context:
```bash
gh repo view --json nameWithOwner,url,defaultBranchRef
```

## Core workflows

### Repo create (private by default)
```bash
gh repo create OWNER/NAME --private --confirm --description "..."
```
If running inside a local repo, use `--source . --remote origin --push`.

### Clone / fork
```bash
gh repo clone OWNER/NAME
```
```bash
gh repo fork OWNER/NAME --clone
```

### Issues
- List:
```bash
gh issue list --limit 20
```
- Create:
```bash
gh issue create --title "..." --body "..."
```
- Comment:
```bash
gh issue comment <num> --body "..."
```

### Pull requests
- Create from current branch:
```bash
gh pr create --title "..." --body "..."
```
- List:
```bash
gh pr list --limit 20
```
- View:
```bash
gh pr view <num> --web
```
- Merge (use explicit method):
```bash
gh pr merge <num> --merge
```

### Releases
```bash
gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."
```

## Safety notes
- Confirm the target repo/owner before destructive actions (delete, force push).
- For private repos, ensure `--private` is set on create.
- Prefer `--confirm` to avoid interactive prompts in automation.

