AGENT SKILL

code-gh

Use when working with the GitHub CLI (gh): pull requests, issues, releases, repos, automation, or GitHub REST/GraphQL API access. Routes to detailed gh command and API references.

License 许可
MIT
所属仓库
nseng-ai/ns
最近更新
2026-10-02
Stars
★ 2
Forks
0

01 前言 Front Matter

name
code-gh
metadata
{ "internal": true }
description
Use when working with the GitHub CLI (gh): pull requests, issues, releases, repos, automation, or GitHub REST/GraphQL API access. Routes to detailed gh command and API references.

02 资源文件 4

03 SKILL.md 正文

GitHub CLI (gh)

Router for gh work (PRs, issues, repos, releases, API). Load the reference that matches the task, then act. Mental model, command syntax, and examples live in the references, not here.

References

Load on demand; navigate the big files with the grep patterns shown.

File Load when Navigate with
references/gh.md any standard task: PRs, issues, repos, releases, auth/config, output formatting, git/CI integration, scripting, troubleshooting gh pr · gh issue · gh repo · gh api · gh release · Pattern [0-9]: · Authentication
references/graphql.md porcelain can't do it: Projects V2, Discussions, batch/multi-repo, deep nesting, advanced search, body/comment edit history Projects V2 · Discussion · Batch · Pagination · Example [0-9] · userContentEdits
references/graphql-schema-core.md exact GraphQL field/type/mutation shapes type name (PullRequest, ProjectV2, …)
references/api-backend-audit.md rate-limit issues; REST vs GraphQL choice; per-command backend map command name · Rate Limit

Always-on facts

  • For standard gh questions, load references/gh.md before answering from memory.
  • Use GraphQL only when porcelain (gh pr, gh issue, …) can't express the task; Projects V2 and Discussions have no porcelain or REST path — see references/graphql.md.
  • Rate limits differ by backend: REST 5,000 req/hr · GraphQL 5,000 points/hr · Search 30 req/min. Check gh api rate_limit --jq '.resources'; details in references/api-backend-audit.md.
  • In this Graphite-backed repo, do not use generic git push / gh pr create examples to publish or update Graphite-tracked PR branches. Use ns flow gt submit or gt submit --no-interactive so Graphite metadata stays synchronized.

04 同仓库更多 Skills