gh-cli
GitHub operations via gh CLI — use this instead of GitHub MCP server tools for all PR, issue, release, and CI work.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- gh-cli
- description
- GitHub operations via gh CLI — use this instead of GitHub MCP server tools for all PR, issue, release, and CI work.
02 资源文件 2
- 参考文档evals/eval_queries.json771 B
- 参考文档evals/evals.json5.3 KB
03 SKILL.md 正文
GitHub via gh CLI
Always use gh CLI for GitHub operations. Never use GitHub MCP server tools.
The gh CLI is always available, scriptable, and produces predictable output. MCP server tools introduce unnecessary indirection and cause confusion when their side effects (push, create, close) occur even if you later reject the agent's response.
When a read-only GitHub MCP server is what the harness provides (no shell), the github skill covers reading through it; writes still go through gh here, and only when asked.
Read Freely, Write Only When Asked
Reads change nothing: list, view, checks, diff, status, search, run view, and gh api GETs. Run as many as the question needs.
Writes change what other people see: create, comment, edit, merge, close, review, run rerun, release delete, and gh api with -X POST, PATCH, PUT or DELETE. Run one only when the user asked for that change. When a read turns up something worth doing (a rerun, a comment, a merge), report it and offer; don't do it.
For scripting, ask for --json <fields> and filter with --jq rather than parsing the table output.
What's Waiting on Me
gh pr list only covers the current repository; review requests and assigned issues can live anywhere.
gh status # assigned issues and PRs, review requests, mentions, across repos
gh pr list --author @me # my open PRs here
gh search prs --review-requested=@me --state=open # PRs waiting on my review, every repo
gh issue list --assignee @me
Report each PR with what blocks it: failing checks, review required, draft, or ready to merge.
Pull Requests
gh pr create --base <branch> --title "<title>" --body "<body>"
gh pr list
gh pr view <number>
gh pr view <number> --comments
gh pr checks <number>
gh pr checks <number> --watch
gh pr merge <number> --squash
gh pr edit <number> --base <branch>
gh pr close <number>
Issues
gh issue list
gh issue view <number>
gh issue create --title "<title>" --body "<body>"
gh issue comment <number> --body "<body>"
gh issue close <number>
gh issue edit <number> --add-label "<label>"
CI / Workflow Runs
gh run list --workflow=<name>.yml --limit 5
gh run view <run-id>
gh run watch <run-id>
gh run watch <run-id> --exit-status # blocks until complete; exits non-zero on failure
gh run list --branch <branch> --workflow=ci.yml --limit 1
gh run list --commit <sha> --workflow=ci.yml
Why Did CI Fail?
Go from the PR to the failing step's output, then read the code it points at:
gh pr checks <number> # which check failed; its link holds the run and job IDs
gh run view <run-id> # the run's jobs and the failed step
gh run view <run-id> --log-failed # only the failed steps' log
gh run view <run-id> --job <job-id> --log # one job's full log, when the failed lines need context
An aggregate check (such as All Clear) fails because another job did: report the job that actually failed. Rerunning is a write: suggest it for a failure that looks flaky, and run it only when asked.
Releases
gh release list
gh release view v{VERSION}
gh release delete v{VERSION} --yes
Branches and Repos
gh repo view
gh repo clone <owner>/<repo>
gh api repos/{owner}/{repo}/branches # when gh doesn't have a direct command
Passing Multi-line Bodies
Always use a HEREDOC to avoid quoting issues:
gh pr create --base develop --title "feat: my feature" --body "$(cat <<'EOF'
## Summary
- Did the thing
## Testing
- [ ] make check passes
EOF
)"
04 同仓库更多 Skills
doctor
暂无简介
add-seat
Add a named seat to a Wheelhouse - a crew member, a standing role (such as a dispatcher) or a worker - as a ynh harness with its charter, standing orders and only the tools its job needs, named from the Wheelhouse's roster. Use when asked to add, create or set up a seat, role, worker or agent in a Wheelhouse (a release manager, a PR watcher, a dispatcher, a designer, more workers), or to give a role a name, or to start on a Wheelhouse's team (its starter team), one role at a time. Also use to trial, make official or drop a seat.
voice
How voices work - what a voice skill contains, how to write a new one, and how several voices compose into one reply. Use whenever drafting a reply in a named voice, or when asked to create or change a voice.
voice-warm
A friendly voice that acknowledges the person and their effort. Compose with direct for friendly but brief.
voice-formal
A careful, complete voice for people outside the team - customers, partners, senior stakeholders.
voice-direct
A plain, brief voice that leads with the answer. The default when no voice is named.