github
GitHub CLI Skill
Use gh for all GitHub operations from the command line.
Prerequisites
Check authentication status:
gh auth status
If not authenticated:
gh auth login
Quick Reference
| Task | Command |
|---|---|
| Create PR | gh pr create |
| List PRs | gh pr list |
| View PR | gh pr view 123 |
| Checkout PR | gh pr checkout 123 |
| Merge PR | gh pr merge 123 |
| List issues | gh issue list |
| Create issue | gh issue create |
| View issue | gh issue view 123 |
| Check CI status | gh pr checks |
| View runs | gh run list |
| Create release | gh release create v1.0.0 |
Core Workflows
Pull Requests
Create a PR from current branch:
gh pr create --fill # Auto-fill title/body from commits
gh pr create --title "Title" --body "Description"
gh pr create --draft # Create as draft
gh pr create --base main # Target specific branch
List and filter PRs:
gh pr list # Open PRs
gh pr list --state all # All PRs
gh pr list --author @me # Your PRs
gh pr list --search "review:required" # Needs review
For complete PR operations: See references/pr.md
Code Review
Review a PR:
gh pr review 123 --approve
gh pr review 123 --request-changes --body "Please fix X"
gh pr review 123 --comment --body "Looks good overall"
View changes:
gh pr diff 123 # View diff
gh pr checks 123 # View CI status
For complete review workflows: See references/review.md
Issues
Create and manage issues:
gh issue create --title "Bug" --body "Description"
gh issue list --label bug
gh issue view 123
gh issue close 123
For complete issue operations: See references/issues.md
GitHub Actions
View workflow runs:
gh run list # Recent runs
gh run view # Latest run details
gh run view 123456 # Specific run
gh run watch # Watch current run
For complete Actions workflows: See references/actions.md
Releases
Create releases:
gh release create v1.0.0 # Create from tag
gh release create v1.0.0 --generate-notes
gh release list
For complete release operations: See references/releases.md
API Requests
Make authenticated API calls:
gh api repos/{owner}/{repo}
gh api repos/{owner}/{repo}/pulls --jq '.[].title'
For complete API usage: See references/api.md
Common Flags
| Flag | Description |
|---|---|
-R owner/repo |
Target different repo |
--web |
Open in browser |
--json fields |
JSON output |
--jq expression |
Filter JSON |
Repository Context
gh auto-detects the current repository. Override with:
gh pr list -R owner/repo
Or set default:
gh repo set-default owner/repo
More from brettatoms/agent-skills
alpinejs
AlpineJS best practices and patterns. Use when writing HTML with Alpine.js directives to avoid common mistakes like long inline JavaScript strings.
106janet
Write idiomatic Janet code. Use when writing, refactoring, or reviewing Janet (.janet) code. Covers functional patterns, performance tradeoffs, common gotchas, data structure idioms, PEG parsing, and Janet-specific pitfalls.
10playwright
Browser automation for web testing and interaction. Use for navigating pages, filling forms, clicking elements, taking screenshots, and inspecting page content. Maintains stateful browser session across commands.
9code-symbols
Find and edit symbols in code using ast-grep (tree-sitter based). Use when finding function definitions, class definitions, symbol usages, renaming symbols, or replacing code in JavaScript, TypeScript, Python, Go, Rust, and other languages. NOT for Clojure - use clj-symbols instead.
8browser-tools
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
8lib-docs
Fetch library documentation and code examples. Use when user asks about library APIs, needs code examples, or says "use lib-docs", "lookup docs for X", "how does [library] work". Works with any language/framework.
7