[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C5WZQQWT2AAXXBERWFSMDK":3,"skill-same:01M6C5WZQQWT2AAXXBERWFSMDK":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":17,"ownerHtmlUrl":66,"ownerBlogUrl":17,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M6C5WZQQWT2AAXXBERWFSMDK","gh-cli-agentic","gh CLI 仓库数据查询","gh CLI commands with JSON output for agents. Use when querying PRs, issues, runs, or repo metadata; inspecting PR checks; fetching failed CI logs; or mapping a github.com URL to an API call.","面向智能体、以 JSON 格式输出的 gh CLI 命令。在查询 PR、issue、工作流运行（runs）或仓库元数据；检查 PR 检查项；获取失败的 CI 日志；或将 github.com URL 映射为 API 调用时使用。","laurigates\u002Fclaude-plugins","laurigates","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F13014001?v=4","01M6C59YHWS9C7KMXKSRX1YXNP","Lauri Gates","01M6C59YP2APG9YAM4DWYQYGFJ",60,"MIT",null,"https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fgit-plugin\u002Fskills\u002Fgh-cli-agentic\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"agentic","cli","gh cli","gh cli agentic","gh","2026","read","JSON Output","URL","when","false","2025","ci logs","run","logs","api","Bash","workflow","issues","ci","gh pr","2026-11-10 10:12:30",false,"---\nname: gh-cli-agentic\ndescription: gh CLI commands with JSON output for agents. Use when querying PRs, issues, runs, or repo metadata; inspecting PR checks; fetching failed CI logs; or mapping a github.com URL to an API call.\nuser-invocable: false\nallowed-tools: Bash(gh pr *), Bash(gh run *), Bash(gh issue *), Bash(gh repo *), Bash(gh workflow *), Bash(gh api *), Read\ncreated: 2025-01-16\nmodified: 2026-11-12\nreviewed: 2026-04-25\n---\n\n# GitHub CLI Agentic Patterns\n\n## When to Use This Skill\n\n| Use this skill when... | Use the alternative when... |\n|---|---|\n| Querying PRs, issues, runs, or repo metadata with `gh` and need JSON output | Use `git-cli-agentic` for porcelain-mode local git queries (status, diff, log) |\n| Inspecting PR checks, mergeable status, or fetching failed CI logs | Use `gh-workflow-monitoring` to actively watch a run until it completes |\n| Resolving a github.com URL into an `gh api` call or working with sub-issues | Use `git-issue-hierarchy` for sub-issue add\u002Fremove\u002Fdependency-graph operations |\n| Looking up label, repo, or workflow metadata via `gh` JSON commands | Use `github-labels` to actually apply or create labels on issues\u002FPRs |\n\nOptimized `gh` commands for AI agent consumption using JSON output and structured field selection.\n\n## Core Principle\n\nAlways use `--json \u003Cfields>` for machine-readable output. The `--jq` filter is built-in (no jq installation required).\n\n### `gh api` sends every field as a string unless you use `-F`\n\n`-f key=value` types the value as a **string**, so an endpoint expecting a\nnumber rejects it:\n\n```\ngh api -X POST repos\u002FO\u002FR\u002Fissues\u002F2380\u002Fsub_issues -f sub_issue_id=5471095685\nInvalid property \u002Fsub_issue_id: \"5471095685\" is not of type `integer`. (HTTP 422)\n```\n\n`-F key=value` reads the value as a typed literal (number, boolean, null, or\n`@file`) and the identical call succeeds. Observed 2026-09-16: six sub-issue\nlinks failed this way before the flag changed. The error quotes the value and\nnames the property, so it reads as a bad id — the id was right and the flag was\nwrong. Use `-F` for every numeric id (`sub_issue_id`, `after_id`) and `-f` for\nfree text.\n\n## Pull Request Operations\n\n### Check Status\n\n```bash\n# Get all check statuses\ngh pr checks $PR_NUMBER --json name,state,conclusion,detailsUrl\n\n# Filter to failed only\ngh pr checks $PR_NUMBER --json name,state,conclusion --jq '.[] | select(.conclusion == \"FAILURE\")'\n```\n\n**Fields**: `name`, `state`, `conclusion`, `detailsUrl`, `startedAt`, `completedAt`\n\n### PR Details\n\n```bash\n# Essential PR info\ngh pr view $PR_NUMBER --json number,title,state,mergeable,statusCheckRollup\n\n# Full context\ngh pr view $PR_NUMBER --json number,title,body,state,author,labels,assignees,reviewDecision,mergeable,statusCheckRollup\n```\n\n**Key Fields**:\n\n| Field | Description |\n|-------|-------------|\n| `mergeable` | `MERGEABLE`, `CONFLICTING`, `UNKNOWN` |\n| `reviewDecision` | `APPROVED`, `CHANGES_REQUESTED`, `REVIEW_REQUIRED` |\n| `statusCheckRollup` | Array of check statuses |\n\n### List PRs\n\n```bash\n# Open PRs\ngh pr list --json number,title,author,labels\n\n# PRs by author\ngh pr list --author @me --json number,title,state\n\n# PRs needing review\ngh pr list --search \"review-requested:@me\" --json number,title\n```\n\n## Workflow Run Operations\n\n### Run Details\n\n```bash\n# Get run status with jobs\ngh run view $RUN_ID --json conclusion,status,jobs,createdAt,updatedAt\n\n# List recent runs\ngh run list --json databaseId,status,conclusion,name,createdAt -L 10\n```\n\n**Status Values**: `queued`, `in_progress`, `completed`\n**Conclusion Values**: `success`, `failure`, `cancelled`, `skipped`, `neutral`\n\n### Watch Run Until Completion\n\n```bash\n# Watch and wait for run to complete (blocking, no timeout needed)\ngh run watch $RUN_ID --compact --exit-status\n\n# Find and watch latest run\nRUN_ID=$(gh run list -L 1 --json databaseId --jq '.[0].databaseId')\ngh run watch $RUN_ID --compact --exit-status\n```\n\nSee **gh-workflow-monitoring** skill for comprehensive workflow watching patterns.\n\n### Failed Logs\n\n```bash\n# Get only failed step logs (most useful for debugging)\ngh run view $RUN_ID --log-failed\n\n# Full logs (verbose)\ngh run view $RUN_ID --log\n```\n\n### Workflow Triggers\n\n```bash\n# Trigger workflow manually\ngh workflow run $WORKFLOW_NAME\n\n# Trigger with inputs\ngh workflow run $WORKFLOW_NAME -f param1=value1 -f param2=value2\n\n# List workflows\ngh workflow list --json name,state,path\n```\n\n## Issue Operations\n\n### Issue Details\n\n```bash\n# Full issue context\ngh issue view $ISSUE_NUMBER --json number,title,body,state,labels,assignees,comments\n\n# Minimal\ngh issue view $ISSUE_NUMBER --json number,title,state,labels\n\n# With sub-issue progress\ngh issue view $ISSUE_NUMBER --json number,title,state,subIssuesSummary\n```\n\n**Read a thread with `--json title,body,comments`, not `--comments`.** In a non-TTY context (every agent Bash call), `gh issue view N --comments` prints only the comments, with no title or body. When the issue has zero comments it prints nothing and exits 0, so an empty thread looks like an empty issue (observed on gh 2.102.0, #3125). `gh pr view --comments` likely behaves the same way, but that is unverified.\n\n### List Issues\n\n```bash\n# Open issues\ngh issue list --json number,title,labels,assignees\n\n# By label\ngh issue list --label \"bug\" --json number,title\n\n# Assigned to me\ngh issue list --assignee @me --json number,title,state\n```\n\nBot-opened issues: jq on `.author.login`, not `--author` or `--app` ([§ Bot Authors](REFERENCE.md#bot-authors)).\n\n### Issue Types\n\n```bash\n# Create issue with type (requires repo\u002Forg with issue types configured)\ngh issue create --title \"...\" --body \"...\" --type \"Bug\"\ngh issue create --title \"...\" --body \"...\" --type \"Feature\"\ngh issue create --title \"...\" --body \"...\" --type \"Task\"\n```\n\n### Sub-Issues\n\n```bash\n# List sub-issues of a parent\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues --jq '.[].number'\n\n# Add existing issue as sub-issue\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues -F sub_issue_id={child_id}\n\n# Remove sub-issue\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues\u002F{sub_issue_id} -X DELETE\n\n# Reprioritize sub-issue (move after another sub-issue)\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues -X PATCH \\\n  -F sub_issue_id={id} -F after_id={after_id}\n\n# Get sub-issue summary via issue view\ngh issue view {N} --json title,subIssuesSummary\n# Returns: {\"total\": 5, \"completed\": 3, \"percentCompleted\": 60}\n```\n\n## Repository Operations\n\n```bash\n# Get repo info\ngh repo view --json nameWithOwner,defaultBranchRef,description\n\n# Just owner\u002Fname\ngh repo view --json nameWithOwner --jq '.nameWithOwner'\n```\n\n## API Direct Access\n\nFor operations not covered by subcommands:\n\n```bash\n# Get specific data\ngh api repos\u002F{owner}\u002F{repo}\u002Factions\u002Fruns --jq '.workflow_runs[:5]'\n\n# With pagination\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues --paginate --jq '.[].number'\n```\n\n## Agentic Optimizations\n\n| Context | Command |\n|---------|---------|\n| CI diagnosis | `gh pr checks $N --json name,state,conclusion,detailsUrl` |\n| Get failure logs | `gh run view $ID --log-failed` |\n| PR merge status | `gh pr view $N --json mergeable,reviewDecision,statusCheckRollup` |\n| Quick issue list | `gh issue list --json number,title,labels -L 10` |\n| Full issue thread | `gh issue view $N --json title,body,comments` (non-TTY `--comments` omits the body) |\n| Sub-issue progress | `gh issue view $N --json title,subIssuesSummary` |\n| List sub-issues | `gh api repos\u002F{o}\u002F{r}\u002Fissues\u002F{N}\u002Fsub_issues --jq '.[].number'` |\n| Add sub-issue | `gh api repos\u002F{o}\u002F{r}\u002Fissues\u002F{N}\u002Fsub_issues -F sub_issue_id=M` |\n| Transfer issue | `gh issue transfer N target-repo` |\n| Create dev branch | `gh issue develop N --checkout` |\n| Workflow trigger | `gh workflow run $NAME` |\n\n## Failed Calls: Exit Code First, Output Second\n\nThree scripts misread a failed `gh` call as an answer (2026-10): a merge chain\nread a 504 as \"PR not OPEN\", `worktree-audit` parsed a 422 error body as data\nand classified branches with unpushed work as merged, and a retried\n`gh issue create` that had errored after creating the issue filed a duplicate.\n\n**`gh api` error bodies land on stdout, and `--jq` is skipped.** Observed on gh\n2.102.0:\n\n```\n$ gh api repos\u002Fcli\u002Fcli\u002Fpulls\u002F999999999 --jq '.state \u002F\u002F \"none\"'\n{\"message\":\"Not Found\",\"documentation_url\":\"...\",\"status\":\"404\"}   # stdout, filter not applied\ngh: Not Found (HTTP 404)                                           # stderr; exit 1\n```\n\n`2>\u002Fdev\u002Fnull` hides only the second line, so a script that skips the exit-code\ncheck parses the error JSON as the result. Test the exit status before using\nthe output.\n\n**A 5xx, timeout, or empty output is UNKNOWN state.** Re-query with backoff and\nfail if the state never resolves; never map the failure onto a state value:\n\n```bash\nstate=\nfor delay in 2 4 8 16; do\n  state=$(gh pr view \"$N\" --json state --jq .state) && break\n  state=; sleep \"$delay\"\ndone\n[ -n \"$state\" ] || { echo \"PR #$N: state UNKNOWN after retries\" >&2; exit 1; }\n```\n\nA 500 from `gh pr merge` has its own control: see `git-merge-hazards`\n([merge-endpoint-failures.md](..\u002Fgit-merge-hazards\u002Freferences\u002Fmerge-endpoint-failures.md)).\n\n**After a create errors, look for the object before retrying.** The write can\nsucceed server-side while the response is lost. List rather than search, since\nthe search index lags new objects:\n\n```bash\ngh issue list --state all -L 5 --json number,title,createdAt   # newest first\ngh pr list --head \"$BRANCH\" --state all --json number,url\n```\n\n## Error Handling in Context\n\nUse `2>\u002Fdev\u002Fnull` to suppress errors in context expressions (do NOT use `||` fallbacks - blocked by Claude Code 2.1.7+):\n\n```markdown\n- PR checks: !`gh pr checks $PR --json name,state,conclusion`\n- Run status: !`gh run view $ID --json status,conclusion`\n```\n\nFor custom issue fields, issue management (transfer\u002Fpin\u002Flock\u002Fdevelop), GitHub URL resolution (file contents, diffs, patches), and complete JSON field lists, see [REFERENCE.md](REFERENCE.md).\n","# GitHub CLI Agentic Patterns\n\n## When to Use This Skill\n\n| Use this skill when... | Use the alternative when... |\n|---|---|\n| Querying PRs, issues, runs, or repo metadata with `gh` and need JSON output | Use `git-cli-agentic` for porcelain-mode local git queries (status, diff, log) |\n| Inspecting PR checks, mergeable status, or fetching failed CI logs | Use `gh-workflow-monitoring` to actively watch a run until it completes |\n| Resolving a github.com URL into an `gh api` call or working with sub-issues | Use `git-issue-hierarchy` for sub-issue add\u002Fremove\u002Fdependency-graph operations |\n| Looking up label, repo, or workflow metadata via `gh` JSON commands | Use `github-labels` to actually apply or create labels on issues\u002FPRs |\n\nOptimized `gh` commands for AI agent consumption using JSON output and structured field selection.\n\n## Core Principle\n\nAlways use `--json \u003Cfields>` for machine-readable output. The `--jq` filter is built-in (no jq installation required).\n\n### `gh api` sends every field as a string unless you use `-F`\n\n`-f key=value` types the value as a **string**, so an endpoint expecting a\nnumber rejects it:\n\n```\ngh api -X POST repos\u002FO\u002FR\u002Fissues\u002F2380\u002Fsub_issues -f sub_issue_id=5471095685\nInvalid property \u002Fsub_issue_id: \"5471095685\" is not of type `integer`. (HTTP 422)\n```\n\n`-F key=value` reads the value as a typed literal (number, boolean, null, or\n`@file`) and the identical call succeeds. Observed 2026-09-16: six sub-issue\nlinks failed this way before the flag changed. The error quotes the value and\nnames the property, so it reads as a bad id — the id was right and the flag was\nwrong. Use `-F` for every numeric id (`sub_issue_id`, `after_id`) and `-f` for\nfree text.\n\n## Pull Request Operations\n\n### Check Status\n\n```bash\n# Get all check statuses\ngh pr checks $PR_NUMBER --json name,state,conclusion,detailsUrl\n\n# Filter to failed only\ngh pr checks $PR_NUMBER --json name,state,conclusion --jq '.[] | select(.conclusion == \"FAILURE\")'\n```\n\n**Fields**: `name`, `state`, `conclusion`, `detailsUrl`, `startedAt`, `completedAt`\n\n### PR Details\n\n```bash\n# Essential PR info\ngh pr view $PR_NUMBER --json number,title,state,mergeable,statusCheckRollup\n\n# Full context\ngh pr view $PR_NUMBER --json number,title,body,state,author,labels,assignees,reviewDecision,mergeable,statusCheckRollup\n```\n\n**Key Fields**:\n\n| Field | Description |\n|-------|-------------|\n| `mergeable` | `MERGEABLE`, `CONFLICTING`, `UNKNOWN` |\n| `reviewDecision` | `APPROVED`, `CHANGES_REQUESTED`, `REVIEW_REQUIRED` |\n| `statusCheckRollup` | Array of check statuses |\n\n### List PRs\n\n```bash\n# Open PRs\ngh pr list --json number,title,author,labels\n\n# PRs by author\ngh pr list --author @me --json number,title,state\n\n# PRs needing review\ngh pr list --search \"review-requested:@me\" --json number,title\n```\n\n## Workflow Run Operations\n\n### Run Details\n\n```bash\n# Get run status with jobs\ngh run view $RUN_ID --json conclusion,status,jobs,createdAt,updatedAt\n\n# List recent runs\ngh run list --json databaseId,status,conclusion,name,createdAt -L 10\n```\n\n**Status Values**: `queued`, `in_progress`, `completed`\n**Conclusion Values**: `success`, `failure`, `cancelled`, `skipped`, `neutral`\n\n### Watch Run Until Completion\n\n```bash\n# Watch and wait for run to complete (blocking, no timeout needed)\ngh run watch $RUN_ID --compact --exit-status\n\n# Find and watch latest run\nRUN_ID=$(gh run list -L 1 --json databaseId --jq '.[0].databaseId')\ngh run watch $RUN_ID --compact --exit-status\n```\n\nSee **gh-workflow-monitoring** skill for comprehensive workflow watching patterns.\n\n### Failed Logs\n\n```bash\n# Get only failed step logs (most useful for debugging)\ngh run view $RUN_ID --log-failed\n\n# Full logs (verbose)\ngh run view $RUN_ID --log\n```\n\n### Workflow Triggers\n\n```bash\n# Trigger workflow manually\ngh workflow run $WORKFLOW_NAME\n\n# Trigger with inputs\ngh workflow run $WORKFLOW_NAME -f param1=value1 -f param2=value2\n\n# List workflows\ngh workflow list --json name,state,path\n```\n\n## Issue Operations\n\n### Issue Details\n\n```bash\n# Full issue context\ngh issue view $ISSUE_NUMBER --json number,title,body,state,labels,assignees,comments\n\n# Minimal\ngh issue view $ISSUE_NUMBER --json number,title,state,labels\n\n# With sub-issue progress\ngh issue view $ISSUE_NUMBER --json number,title,state,subIssuesSummary\n```\n\n**Read a thread with `--json title,body,comments`, not `--comments`.** In a non-TTY context (every agent Bash call), `gh issue view N --comments` prints only the comments, with no title or body. When the issue has zero comments it prints nothing and exits 0, so an empty thread looks like an empty issue (observed on gh 2.102.0, #3125). `gh pr view --comments` likely behaves the same way, but that is unverified.\n\n### List Issues\n\n```bash\n# Open issues\ngh issue list --json number,title,labels,assignees\n\n# By label\ngh issue list --label \"bug\" --json number,title\n\n# Assigned to me\ngh issue list --assignee @me --json number,title,state\n```\n\nBot-opened issues: jq on `.author.login`, not `--author` or `--app` ([§ Bot Authors](REFERENCE.md#bot-authors)).\n\n### Issue Types\n\n```bash\n# Create issue with type (requires repo\u002Forg with issue types configured)\ngh issue create --title \"...\" --body \"...\" --type \"Bug\"\ngh issue create --title \"...\" --body \"...\" --type \"Feature\"\ngh issue create --title \"...\" --body \"...\" --type \"Task\"\n```\n\n### Sub-Issues\n\n```bash\n# List sub-issues of a parent\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues --jq '.[].number'\n\n# Add existing issue as sub-issue\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues -F sub_issue_id={child_id}\n\n# Remove sub-issue\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues\u002F{sub_issue_id} -X DELETE\n\n# Reprioritize sub-issue (move after another sub-issue)\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{parent}\u002Fsub_issues -X PATCH \\\n  -F sub_issue_id={id} -F after_id={after_id}\n\n# Get sub-issue summary via issue view\ngh issue view {N} --json title,subIssuesSummary\n# Returns: {\"total\": 5, \"completed\": 3, \"percentCompleted\": 60}\n```\n\n## Repository Operations\n\n```bash\n# Get repo info\ngh repo view --json nameWithOwner,defaultBranchRef,description\n\n# Just owner\u002Fname\ngh repo view --json nameWithOwner --jq '.nameWithOwner'\n```\n\n## API Direct Access\n\nFor operations not covered by subcommands:\n\n```bash\n# Get specific data\ngh api repos\u002F{owner}\u002F{repo}\u002Factions\u002Fruns --jq '.workflow_runs[:5]'\n\n# With pagination\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues --paginate --jq '.[].number'\n```\n\n## Agentic Optimizations\n\n| Context | Command |\n|---------|---------|\n| CI diagnosis | `gh pr checks $N --json name,state,conclusion,detailsUrl` |\n| Get failure logs | `gh run view $ID --log-failed` |\n| PR merge status | `gh pr view $N --json mergeable,reviewDecision,statusCheckRollup` |\n| Quick issue list | `gh issue list --json number,title,labels -L 10` |\n| Full issue thread | `gh issue view $N --json title,body,comments` (non-TTY `--comments` omits the body) |\n| Sub-issue progress | `gh issue view $N --json title,subIssuesSummary` |\n| List sub-issues | `gh api repos\u002F{o}\u002F{r}\u002Fissues\u002F{N}\u002Fsub_issues --jq '.[].number'` |\n| Add sub-issue | `gh api repos\u002F{o}\u002F{r}\u002Fissues\u002F{N}\u002Fsub_issues -F sub_issue_id=M` |\n| Transfer issue | `gh issue transfer N target-repo` |\n| Create dev branch | `gh issue develop N --checkout` |\n| Workflow trigger | `gh workflow run $NAME` |\n\n## Failed Calls: Exit Code First, Output Second\n\nThree scripts misread a failed `gh` call as an answer (2026-10): a merge chain\nread a 504 as \"PR not OPEN\", `worktree-audit` parsed a 422 error body as data\nand classified branches with unpushed work as merged, and a retried\n`gh issue create` that had errored after creating the issue filed a duplicate.\n\n**`gh api` error bodies land on stdout, and `--jq` is skipped.** Observed on gh\n2.102.0:\n\n```\n$ gh api repos\u002Fcli\u002Fcli\u002Fpulls\u002F999999999 --jq '.state \u002F\u002F \"none\"'\n{\"message\":\"Not Found\",\"documentation_url\":\"...\",\"status\":\"404\"}   # stdout, filter not applied\ngh: Not Found (HTTP 404)                                           # stderr; exit 1\n```\n\n`2>\u002Fdev\u002Fnull` hides only the second line, so a script that skips the exit-code\ncheck parses the error JSON as the result. Test the exit status before using\nthe output.\n\n**A 5xx, timeout, or empty output is UNKNOWN state.** Re-query with backoff and\nfail if the state never resolves; never map the failure onto a state value:\n\n```bash\nstate=\nfor delay in 2 4 8 16; do\n  state=$(gh pr view \"$N\" --json state --jq .state) && break\n  state=; sleep \"$delay\"\ndone\n[ -n \"$state\" ] || { echo \"PR #$N: state UNKNOWN after retries\" >&2; exit 1; }\n```\n\nA 500 from `gh pr merge` has its own control: see `git-merge-hazards`\n([merge-endpoint-failures.md](..\u002Fgit-merge-hazards\u002Freferences\u002Fmerge-endpoint-failures.md)).\n\n**After a create errors, look for the object before retrying.** The write can\nsucceed server-side while the response is lost. List rather than search, since\nthe search index lags new objects:\n\n```bash\ngh issue list --state all -L 5 --json number,title,createdAt   # newest first\ngh pr list --head \"$BRANCH\" --state all --json number,url\n```\n\n## Error Handling in Context\n\nUse `2>\u002Fdev\u002Fnull` to suppress errors in context expressions (do NOT use `||` fallbacks - blocked by Claude Code 2.1.7+):\n\n```markdown\n- PR checks: !`gh pr checks $PR --json name,state,conclusion`\n- Run status: !`gh run view $ID --json status,conclusion`\n```\n\nFor custom issue fields, issue management (transfer\u002Fpin\u002Flock\u002Fdevelop), GitHub URL resolution (file contents, diffs, patches), and complete JSON field lists, see [REFERENCE.md](REFERENCE.md).\n",{"name":5,"created":57,"modified":58,"reviewed":59,"description":7,"allowed-tools":60,"user-invocable":53},1736985600000,1794441600000,1777075200000,"Bash(gh pr *), Bash(gh run *), Bash(gh issue *), Bash(gh repo *), Bash(gh workflow *), Bash(gh api *), Read","main","b47840019d190aa9afa1fd8d6d42ddd584a45641","git-plugin\u002Fskills\u002Fgh-cli-agentic",6,"https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins","https:\u002F\u002Fgithub.com\u002Flaurigates","Linux enthusiast, cloud engineer, neovim addict, electronics hobbyist.","2026-11-15 03:36:11",{"source":9,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add laurigates\u002Fclaude-plugins --skill gh-cli-agentic",{"tool":75,"command":76},"bunx","bunx skills add laurigates\u002Fclaude-plugins --skill gh-cli-agentic",{"tool":78,"command":79},"pnpm","pnpm dlx skills add laurigates\u002Fclaude-plugins --skill gh-cli-agentic","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fgit-plugin\u002Fskills\u002Fgh-cli-agentic\u002FSKILL.md",true,[83],{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"REFERENCE.md","REFERENCE","参考文档",4446,"https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fgit-plugin\u002Fskills\u002Fgh-cli-agentic\u002FREFERENCE.md",[90,98,121,141,157,180],{"skillNo":91,"name":92,"nameZh":17,"description":93,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"01M7DS1CAJ1ESDX08PENF01J0S","session-workflow-capture","Workflow-tool scripts and workflow friction from this session, filed as issues here or in the plugins repo. Use when a session ran Workflow scripts.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fsession-plugin\u002Fskills\u002Fsession-workflow-capture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":99,"name":100,"nameZh":17,"description":101,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":52},"01M70PFHMH9ADY0CRE6047Y4B2","kitty-show-image","Show the user an image with a note on what to judge, via a file send or a labelled kitty tab. Use when the user must see an image, or icat fails with no \u002Fdev\u002Ftty.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-show-image\u002FSKILL.md",[],[105,106,107,108,109,110,111,112,113,114,115,40,47,116,117,118,119,120,36,37],"show","kitty show image","image","kitty","show image","ls","get","send","open","dev","use","file","text","with","xdg","via",{"skillNo":122,"name":123,"nameZh":17,"description":124,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":52},"01M70PFEN18HKQ4RCQ1VPGMPTB","kitty-session-persistence","Snapshot and restore kitty terminal sessions on macOS. Use when surviving WindowServer hangs without losing tabs, configuring snapshots, or restoring after a force-reboot.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-session-persistence\u002FSKILL.md",[],[108,128,129,130,41,131,40,47,132,133,134,36,37,135,136,137,138,139,140,115],"kitty session persistence","session","persistence","snapshots","uname","reboot","terminal","write","edit","snapshot","macos","sessions","restore",{"skillNo":142,"name":143,"nameZh":17,"description":144,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":52},"01M70PFC77XGXCVQ1543VGZHYR","kitty-remote-control","Safe kitty remote control from an agent — read panes with kitty @ ls\u002Fget-text, notify, and never mutate the live terminal unasked. Use when running inside kitty.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-remote-control\u002FSKILL.md",[],[148,149,108,150,151,110,152,153,111,154,155,115,40,156,47,117,118,134,36,37],"kitty remote control","remote","control","remote control","running","never","panes","notify","query",{"skillNo":158,"name":159,"nameZh":17,"description":160,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":52},"01M70P6WVMCT5JG4SACTM69AF9","docs-reference-check","Dangling doc-reference gate: flag markdown naming repo paths or relative links that no longer exist. Use when docs cite moved\u002Fdeleted files, or wiring a doc-drift lint.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fdocumentation-plugin\u002Fskills\u002Fdocs-reference-check\u002FSKILL.md",[],[164,165,166,167,168,169,170,171,172,173,115,40,47,174,116,175,176,177,178,179],"docs reference check","check","reference check","reference","docs","links","python3","repo","files","auto","drift","lint","wiring","chezmoi","references","cp",{"skillNo":181,"name":182,"nameZh":183,"description":184,"descriptionZh":185,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":186,"categories":187,"keywords":194,"publishedAt":52},"01M6C6NDE7DAQGNWSF22J5CJ0Z","youtube-upload","YouTube 视频上传与编辑","Upload a video to YouTube via the Data API v3 and edit its title, description, tags or thumbnail afterwards. Use when publishing or retitling a YouTube video.","通过 Data API v3 将视频上传到 YouTube，并在之后编辑其标题、描述、标签或缩略图。适用于发布 YouTube 视频或修改其标题。","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fyoutube-plugin\u002Fskills\u002Fyoutube-upload\u002FSKILL.md",[188,191],{"categoryNo":189,"categoryName":190,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98WRP4APE9VKKKKJ6FV","社交媒体与内容平台管理",{"categoryNo":192,"categoryName":193,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者",[195,196,197,198,170,44,37,199,136,200,201,202,115,47,116,46,203,40,204,205,206,120,36],"youtube upload","upload","youtube","Video","uv run","publishing","data","uv","v3","tags","id","title"]