gh
When the user wants a pull request, its discussion, its checks, or another GitHub record read, or a reply posted without a code change.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- gh
- description
- When the user wants a pull request, its discussion, its checks, or another GitHub record read, or a reply posted without a code change.
02 资源文件 13
- 参考文档REFERENCE.md433 B
- 参考文档references/ci.md712 B
- 参考文档references/logs.md422 B
- 参考文档references/raw-gh.md1.4 KB
- 参考文档references/reply.md1.0 KB
- 参考文档references/snapshot.md916 B
- 参考文档references/threads.md926 B
- 脚本scripts/ci-failures.ts15.9 KB
- 脚本scripts/lib.ts11.0 KB
- 脚本scripts/pr-reply.ts7.8 KB
- 脚本scripts/pr-snapshot.ts14.3 KB
- 脚本scripts/pr-threads.ts14.8 KB
- 脚本scripts/run2.4 KB
03 SKILL.md 正文
GitHub I/O
Contracts follow AVGVSTVS96/better-github-skill (unlicensed; reimplemented).
Resolve <anchor> as this skill's absolute directory. The existing
<anchor>/scripts/run selects bun, nub, tsx, then Node/nvm with strip-types.
Options
Default: current branch PR, cwd repo, truncated text. A PR number/URL selects
that PR; a named repo emits -R and needs a PR for PR-bound work.
JSON/full bodies selects --json/--full. Open threads includes unresolved
outdated threads; all includes resolved too; both conflict. Complete paging
adds --complete; author/since supply their filters.
CI selects ci-failures; list runs uses --list (default limit 10), workflow
filters it; a run id analyzes that run. Known head SHA adds --sha.
Reply needs exactly one target/body from references/reply.md.
Missing needed values or conflicting choices are BLOCKED.
1. Resolve and choose
Confirm authenticated gh; missing binary/auth blocks. Record
repo | PR/run/SHA | surface | argv | terminal.
No current PR for PR-bound work → NO_CHANGES.
Choose the covering script:
| Surface | Script | JSON contract |
|---|---|---|
| PR state/checks/files/counts | pr-snapshot.ts | references/snapshot.md |
| Review bodies/comments/threads | pr-threads.ts | references/threads.md |
| CI runs/jobs/log snippets | ci-failures.ts | references/ci.md |
| One native thread/conversation reply | pr-reply.ts | references/reply.md |
Snapshot is state, threads is feedback; neither replaces the other. Before parsing JSON, load only that surface's contract. Done when target and script or uncovered raw operation are fixed.
2. Run
Invoke only through <anchor>/scripts/run <script.ts> ..., not node directly.
Node version or ERR_UNKNOWN_FILE_EXTENSION is not failure evidence or a
GraphQL license: use run. Its exit 2 is BLOCKED with tried-runtime list.
User or senior saying "GraphQL is fine" does not skip run.
Script success reports data/posts; red CI/open threads are not runtime failure.
For all unresolved feedback use --json --open --complete; SHA-pin known heads.
Replies use pr-reply only. No resolving, pushing, or merging by this leaf.
Raw gh is permitted only for uncovered operations, after applying
references/raw-gh.md. A covering-script failure never authorizes reimplementing
its GraphQL. Redirect large output, never pipe gh to head.
For HTTP tracing or logs apply references/logs.md.
Done when output is complete, a reply URL exists, or a real error is captured.
3. Report
Summarize observed output. Set cap markers mean incomplete data, not success for an exhaustive consumer. Cite log paths instead of pasting logs. Green CI, zero threads, or posted reply is SUCCESS; a valid red report is also successful inspection, not repaired CI. Terminals: SUCCESS, NO_CHANGES (empty/no PR), BLOCKED.
04 同仓库更多 Skills
use-skill
When the user gives a GitHub link to a skill and wants it run without installing it.
todoist-task
When the user wants a Todoist task created, or shown before it is created.
restate
When the user wants the last reply said again in plain words, wants a catch-up since their last message, or wants the decision they need to make.
upfront-design
When the user wants a design agreed before coding, a draft resumed, or an approved milestone checked.
recon
When the user wants this repository's saved map read, created, or refreshed.
prath-mode
When the user wants a goal sent to one skill or one delivery chain.