with one click
gh-cli
// All actions on GitHub must use this skill. Covers pull requests, issues, repositories, releases, GitHub Actions, searches, and API requests via the `gh` CLI.
// All actions on GitHub must use this skill. Covers pull requests, issues, repositories, releases, GitHub Actions, searches, and API requests via the `gh` CLI.
Use when bootstrapping the design of a brand new project — producing a plan.md through iterative exploration. Don't use for modifying existing plans, implementing features, or working with established codebases.
Use when creating or modifying custom opencode commands in the `commands/` directory. Covers markdown command files, frontmatter options (description, agent, model, subtask), prompt templates with $ARGUMENTS, shell output injection, and file references.
Use when creating a new Python project from Rob's Awesome Python Template (cookiecutter). Don't use for adding Python to existing projects, installing packages, or working with established codebases.
Use when asked to create, generate, or scaffold a new Agent Skill. Don't use for modifying existing skills or writing general documentation.
Use when doing a thorough exploration of an existing codebase. Guides a subagent through reading documentation, reviewing tests, analyzing architecture, and producing a comprehensive overview. Don't use for quick lookups or single-file questions.
Use when creating, modifying, or reviewing GitHub Actions workflow files. Covers workflow syntax, action selection, dependabot configuration, and CI/CD best practices.
| name | gh-cli |
| description | All actions on GitHub must use this skill. Covers pull requests, issues, repositories, releases, GitHub Actions, searches, and API requests via the `gh` CLI. |
| license | MIT |
| metadata | {"author":"Robert Hafner","source":"https://github.com/tedivm/opencode-config"} |
Verify authentication first:
gh auth status
All other gh commands support -R OWNER/REPO to target a specific repository. When omitted, the current directory's repo is used.
gh pr create --title "TITLE" --body "BODY"
--fill — autofill title and body from commit messages--fill-first — use only the first commit--fill-verbose — use full commit msg + body--draft — create as draft--base BRANCH — set target branch--head USER:BRANCH — specify head from fork-a @me — self-assign-l LABEL — add labels (repeatable)-r HANDLE — request reviewers (repeatable)-F file — read body from file--web — open browser to createReference issues with Closes #N or Fixes #N in the body for auto-closure.
gh pr list [--state open|closed|all] [--label NAME] [--reviewer ME]
gh pr view <NUMBER|URL|BRANCH>
gh pr status # relevant PRs across repos
gh pr review --approve
gh pr review -r -b "Request changes because..."
gh pr review --comment -b "Comment only"
gh pr merge --squash --delete-branch
gh pr merge --rebase --delete-branch
gh pr merge --merge --delete-branch
gh pr merge --auto # auto-merge after checks pass
Use --admin to bypass merge queue requirements. Use --match-head-commit SHA for safety.
gh pr checkout <NUMBER>
gh pr diff <NUMBER>
gh pr checks <NUMBER>
gh pr update-branch <NUMBER>
gh pr close <NUMBER>
gh pr reopen <NUMBER>
gh pr edit <NUMBER> --title "..." --body "..."
gh pr lock <NUMBER>
gh pr unlock <NUMBER>
gh issue create --title "TITLE" --body "BODY"
-l LABEL — add labels (repeatable)-a HANDLE — assign (use @me or @copilot)-m MILESTONE — add to milestone-T TEMPLATE — use issue template-F file — read body from file-e — open editor for title and body--web — open browsergh issue list [--state open|closed|all] [--label NAME] [--assignee HANDLE]
gh issue view <NUMBER|URL>
gh issue status # relevant issues across repos
gh issue edit <NUMBER> --title "..." --label "..."
gh issue comment <NUMBER> -b "COMMENT"
gh issue close <NUMBER>
gh issue reopen <NUMBER>
gh issue lock <NUMBER>
gh issue unlock <NUMBER>
gh issue pin <NUMBER>
gh issue unpin <NUMBER>
gh issue transfer <NUMBER> OWNER/REPO
gh issue delete <NUMBER>
gh repo clone OWNER/REPO
gh repo fork OWNER/REPO
gh repo create [--private|--public]
gh repo list [--visibility public|private|all]
gh repo view [--web]
gh repo set-default OWNER/REPO
gh repo rename <NAME>
gh repo archive
gh repo unarchive
gh repo sync
gh repo delete OWNER/REPO # destructive, confirm carefully
gh run list
gh run view <RUN_ID>
gh run watch <RUN_ID>
gh run cancel <RUN_ID>
gh run rerun <RUN_ID>
gh run download <RUN_ID>
gh run delete <RUN_ID>
gh workflow list
gh workflow view <NAME>
gh release create TAG --title "TITLE" --notes "NOTES"
gh release list
gh release view TAG
gh release upload TAG FILE
gh release download TAG --output FILE
gh release edit TAG
gh release delete TAG
gh release delete-asset TAG ASSET
gh release verify TAG
gh search issues "QUERY"
gh search prs "QUERY"
gh search repos "QUERY"
gh search code "QUERY"
gh search commits "QUERY"
Use -- before queries with hyphens to avoid flag parsing issues:
gh search issues -- "is:open -label:bug"
For anything not covered by built-in commands:
gh api repos/{owner}/{repo}/releases
gh api repos/{owner}/{repo}/issues --jq '.[].title'
-X METHOD — HTTP method (default GET, auto POST with params)-f key=value — string parameter-F key=value — typed parameter (auto-converts true/false/null/numbers, @file reads from file)--jq 'QUERY' — filter output with jq--paginate — fetch all pages--slurp — wrap paginated results into single array--input file — send file as request body-H 'Key: Value' — custom header{owner}, {repo}, {branch} — auto-resolved placeholdersgh api endpoint -F 'key[sub]=val' -F 'arr[]=a' -F 'arr[]=b'
gh api graphql -f query='query { viewer { name } }' -F var='value'
Append to any command producing JSON:
--jq '.field' # jq filter
--json FIELD,FIELD # specific fields as JSON
gh pr create --fill --reviewer HANDLE
gh pr review --approve
gh pr merge --squash --delete-branch
gh pr checks
git push -u origin BRANCHgh pr create --fillgh pr checksgh pr review --approvegh pr merge --squash --delete-branch