一键导入
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
All actions on GitHub must use this skill. Covers pull requests, issues, repositories, releases, GitHub Actions, searches, and API requests via the `gh` CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when converting files to Markdown format for LLM consumption, document analysis, or text extraction. Supports PDF, Office documents, images, audio, HTML, and more via Microsoft's markitdown. Don't use for simple text file reads, existing Markdown files, or when the file is in a usable format.
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 rendering mermaid diagrams to PNG, SVG, or PDF images. Handles both .mmd files and inline mermaid code blocks in markdown files. Don't use for creating mermaid syntax or GraphViz/DOT diagrams.
Use when creating a comprehensive architecture document for a codebase. First explores the codebase using the exploring-code skill, then writes a detailed architecture document. Don't use for quick documentation lookups or single-file questions: only use when asked to create or update architectural documents.
Use to do a thorough exploration of an existing codebase. Always use this when asked to explore a codebase/repo/project. Always use it when starting a task that requires deep knowledge of the codebase. Don't use for quick lookups or single-file questions.
You MUST use when creating, modifying, or reviewing GitHub Actions workflow files. For security reasons it is VITAL that you use this skill when working with third party actions (including `actions/checkout` and other official actions).
| 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