GitHub CLI (gh) reference for issues, PRs, and API calls.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# GitHub CLI (`gh`) Reference
Use `gh` CLI for all GitHub operations. Anthropic recommends `gh` CLI over GitHub MCP servers for Claude Code since you already have shell access.
## Common Pitfalls
### Invalid JSON fields cause errors
`--json` only accepts specific fields per command. Using invalid fields (e.g., `stateReason`) causes the command to fail and may cancel sibling tool calls.
**Always use fields from the valid lists below.** When in doubt, run `gh <command> --json` with no field names to see the valid list.
### Non-interactive mode
`gh` commands that prompt for input will hang in automated contexts. Always provide all required flags explicitly:
- `gh pr create` needs `--title` and `--body`
- `gh issue create` needs `--title`
- `gh pr merge` needs a merge strategy flag (`--merge`, `--squash`, or `--rebase`)
## Issue Commands
### `gh issue list`
```bash
gh issue list --state open --limit 50
gh issue list --label "bug" --assignee "@me"
gh issue list --search "error sort:created-asc"
gh issue list --json number,title,state,labels
```
…
The line at the top of this page pins the label git:20260618.ccb1e75, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
A 17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (5786 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
eltmon/overdeck · 35 stars · license MIT · pushed 2026-11-07 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_6a5lgldv6kwqklm6
GET https://markdownregistry.com/api/v1/resolve?ref=eltmon/overdeck/github-cli
GET https://markdownregistry.com/api/v1/blob/e758f0b4ba5c2ff2f8cfd36b4e9a6a5c4081d42169805a0bf4fe78e6eedce058
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
eltmon/overdeck · integrations/grok-bot/skills/overdeck/SKILL.md · Watch and steer Overdeck, the user's orchestrator for AI coding agents. Use when the user asks about their coding…
eltmon/overdeck · integrations/openclaw/skills/overdeck/SKILL.md · Watch and steer Overdeck, the user's orchestrator for AI coding agents. Use when the user asks about their coding…
eltmon/overdeck · integrations/shared/SKILL.md · Watch and steer Overdeck, the user's orchestrator for AI coding agents. Use when the user asks about their coding…
eltmon/overdeck · src/lib/caveman/skills/caveman-review/SKILL.md · Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment…
eltmon/overdeck · src/lib/caveman/skills/caveman/SKILL.md · Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical…
eltmon/overdeck · sync-sources/dev-skills/pan-dashboard-restart/SKILL.md · Safely restart the Overdeck dashboard server (production Node 22 dist) using a detached process. Use when pan up / pan…
eltmon/overdeck · sync-sources/dev-skills/pan-skill-installer/SKILL.md · Install an external skill or Claude Code plugin into Overdeck's bundled distribution so pan sync ships it to every…
eltmon/overdeck · sync-sources/dev-skills/pan-swarm/SKILL.md · Start or operate a foreman-driven Overdeck swarm with gated dispatch, merge, observation, and recovery commands.
melvynx/ai-maxxing-skills · skills/setup-vps/server-skills/github-cli/SKILL.md · Every GitHub job from this server through the gh CLI - list, create and clone repos, push code, pull requests, issues…
ethanyoq/skill-hub · archives/user-installed-skills/github-cli/e4ed8a3ab1d64cb6/github-cli/SKILL.md · MUST USE for GitHub-related operations, including a GitHub URL, repository or code search, Issues, pull requests…
anilcancakir/claude-code · opencode/ac/skills/github-cli/SKILL.md · Work with GitHub repositories, issues, PRs, releases and Actions runs through the gh CLI instead of web fetches. Use…
anilcancakir/claude-code · plugins/ac/skills/github-cli/SKILL.md · Work with GitHub repositories, issues, PRs, releases and Actions runs through the gh CLI instead of web fetches.
rogue-dev-studio/ai-agents-rogue · skills/github-cli/SKILL.md · GitHub CLI authentication and workflow configuration. Use when the project needs this capability or the user / team…