github
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub
GitHub
Work GitHub end to end with the CLI (REST fallback where noted): auth,
issues, the PR lifecycle, issue-to-PR delivery, code review, and repo
management. This skill consolidates six former skills; each workflow lives
complete in its reference file — ALWAYS read the matching reference before
starting that workflow, the body below only routes.
gh通过 CLI端到端处理GitHub操作(标注处会回退使用REST):认证、议题、PR生命周期、从议题到PR的交付、代码评审以及仓库管理。该技能整合了此前的六项技能;每个工作流程都完整存放在对应的参考文件中——开始任一工作流程前,请务必阅读对应的参考文件,下文仅作为导航指引。
ghRouting
导航
| Task | Read first |
|---|---|
| Auth broken / new machine / token or SSH setup / gh login | |
| Create, triage, label, assign, close issues | |
| Branch, commit, open PR, watch CI, merge | |
| Carry an ISSUE to a verified PR (full delivery loop) | |
| Review someone's PR: diffs, inline comments, verdict | |
| Clone/create/fork repos, remotes, releases | |
Supporting assets: +
(auth helpers), (PR bodies, bug report, feature request),
, ,
, .
scripts/gh-env.shscripts/git-credential-token.pytemplates/references/ci-troubleshooting.mdreferences/conventional-commits.mdreferences/github-api-cheatsheet.mdreferences/review-output-template.md| 任务 | 先阅读 |
|---|---|
| 认证失效/新机器配置/令牌或SSH设置/gh登录 | |
| 创建、分类、标记、分配、关闭议题 | |
| 分支、提交、开启PR、监控CI、合并 | |
| 将议题转化为已验证的PR(完整交付流程) | |
| 评审他人的PR:差异对比、行内评论、评审结论 | |
| 克隆/创建/复刻仓库、远程仓库、发布版本 | |
配套资源: + (认证辅助工具)、(PR正文、Bug报告、功能请求模板)、、、、。
scripts/gh-env.shscripts/git-credential-token.pytemplates/references/ci-troubleshooting.mdreferences/conventional-commits.mdreferences/github-api-cheatsheet.mdreferences/review-output-template.mdCore discipline (applies to every workflow)
核心准则(适用于所有工作流程)
- Preflight once per session: — if it fails, go to
gh auth statusbefore anything else.references/auth.md - Prefer over raw REST; drop to
ghonly for endpoints the porcelain lacks (the cheatsheet lists them).gh api - Never report CI green without checking yourself; never claim merged without verifying
gh pr checks.state,mergedAt - Read full context before writing: /
gh issue view --comments— decisions live in threads, not titles.gh pr view --comments - Sweep for duplicates before creating anything:
/
gh pr list --search.gh issue list --search
- 每次会话前预检:执行——如果失败,请先查看
gh auth status,再进行其他操作。references/auth.md - 优先使用而非原生REST;仅当
gh未覆盖对应端点时,才使用gh(相关端点列在速查表中)。gh api - 未亲自查看,切勿报告CI已通过;未验证
gh pr checks,切勿声称已合并。state,mergedAt - 撰写内容前先阅读完整上下文:/
gh issue view --comments——决策记录在讨论线程中,而非标题里。gh pr view --comments - 创建任何内容前先排查重复项:/
gh pr list --search。gh issue list --search
Verification
验证
- The workflow's own reference file defines done for that task.
- Cross-cutting: every claim about remote state (CI, merge, release,
issue state) is backed by a fresh read, never memory.
gh
- 每个工作流程的完成标准由其对应的参考文件定义。
- 跨流程要求:所有关于远程状态的声明(CI、合并、发布、议题状态)都必须基于最新的查询结果,而非记忆。
gh