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
- 参考文档references/api-backend-audit.md30.8 KB
- 参考文档references/gh.md31.1 KB
- 参考文档references/graphql-schema-core.md23.2 KB
- 参考文档references/graphql.md40.6 KB
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
ghquestions, loadreferences/gh.mdbefore 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 — seereferences/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 inreferences/api-backend-audit.md. - In this Graphite-backed repo, do not use generic
git push/gh pr createexamples to publish or update Graphite-tracked PR branches. Usens flow gt submitorgt submit --no-interactiveso Graphite metadata stays synchronized.
04 同仓库更多 Skills
pr-make-accountable
Interview a PR author to establish shared understanding of intent and design decisions, then co-author the What / Why / Changes PR body with opt-in Requested reviewer focus.
typescript-style
Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.
typescript-fake-driven-testing
TypeScript fake-driven testing architecture. Use when writing or reviewing TS code with external dependencies, gateway interfaces, real adapters, in-memory fakes, or CLI scenario tests.
ns-typescript
TypeScript overlay for ns-style projects. Use when editing or reviewing TS in this repo: tsconfig baseline, pnpm/Vitest/oxlint/oxfmt/native tsc commands, relative .ts imports, workspace subpath exports, and the exactOptionalPropertyTypes spread idiom. Repo-specific enforcement (test lanes, time seams, style guard) lives in the host repo's AGENTS.md.
ns-typescript-style-tripwire
Invoke the ns TypeScript style Tripwire against a supplied diff or current branch.
skill-management
Manage skills with `npx skills`: add, edit, remove, rename, update, or list skills (local or GitHub), and the nested `skills/<disposition>/.../<name>/` / flat `.agents/skills/` layout conventions.