Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
数据分析
github-flow
试用把方案和代码改动转成结构化的 GitHub Issue 与 PR,并处理认证、依赖关系和发布前的隐私扫描。
它能做什么
面向托管在 github.com 上的仓库,驱动从 Issue 到 PR 的整套工作流。子主题覆盖:把 Markdown 方案转换为 Issue 正文、查重后决定登记方式、用 GraphQL 维护 Issue 的 blocked-by/blocking 关系、产出带验证计划的 PR、做结构化 Code Review、把多个 PR 中延后的意见归并成 Epic Issue、以及在向 PUBLIC 仓库发文前对个人信息的硬拦截。每个 Issue/PR 正文都必须带验证计划,`.ralph/`、`.omc/` 等内部工作路径禁止外发。
什么时候用它
- 把研究性 Markdown 转成带验证计划的 GitHub Issue
- 新建分支、起草 PR、跟踪 CI、再转可评审状态
- 用 blocked-by 关系串起一组顺序执行的 Issue
- 把跨 PR 的延后评审意见汇总成单个 Epic Issue
技能文档
GitHub Flow
Convert plans, research, and implementation results into GitHub issues and PRs.
Topics
| Topic | Description | Guide |
|---|---|---|
| auth-scope | gh CLI priority + account mapping + batch scope refresh + org-repo 404 checklist | auth-scope.md |
| commit-message-discipline | Commit message authoring, message update on amend, PUBLIC repo English enforcement, git operation type continuity, verb selection (.md as source code) | commit-message-discipline.md |
| dependencies | Manage native Issue Relationships (blocked-by/blocking) via addBlockedBy/removeBlockedBy GraphQL mutations | dependencies.md |
| epic-bundle | Bundle deferred review findings across multiple PRs into one Epic tracking issue (checklist + native sub-issues + epic label) | epic-bundle.md |
| expand | Decide expand-vs-split when new findings emerge mid-work and update title/body | expand.md |
| identity-auth | Owner-based gh account mapping for commit author identity + gh auth scope refresh + GH_TOKEN env fallback for org repo 404 | identity-auth.md |
| merge | CI success and AI review check then merge with commit cleanup, including pre-merge blockedBy verification | merge.md |
| plan-to-issue | Convert plan/research MD to GitHub issue body or comments | plan-to-issue.md |
| pr | Create PR with structured body, test plan, and optional visual attachments. Multi-PR references in an AskUserQuestion payload are enforced by resources/block-pr-url-gate.sh (PreToolUse:AskUserQuestion, registered in settings.json) — every distinct PR number needs its own clickable URL | pr.md |
| publish | Package a working-tree change into its own branch + draft PR against a staging-base branch, watch CI, ready-transition, content-review ask, merge — the full repeated sequence in one topic | publish.md |
| push-guards | Branch-change ask + push rejection ask + force-push CI status check + main/master push restriction + shared-branch direct-push restriction | push-guards.md |
| register | Evaluate duplicates and decide registration strategy (new issue vs comment vs sub-issue) | register.md |
| review | Review PR code and post structured review comments | review.md |
| review-apply | Apply deferred [REVIEW_FEEDBACK] items from fix_plan to code, update PR Summary | review-apply.md |
| sanitize | HARD STOP scan for personal data before posting to PUBLIC repos | sanitize.md |
| upstream-issue | Register feature requests/bug reports on external open-source repos with duplicate check + draft + sanitize | upstream-issue.md |
Topic Dependencies
github-flow (issue/PR workflow)
├─→ plan-to-issue (issue body content)
├─→ epic-bundle (deferred findings across PRs → one Epic issue)
│ ├─→ uses plan-to-issue (Epic body) + register (dup check) + dependencies (sub-issues)
│ └─→ receives from: consolidate next step (auto-suggest when deferred findings accumulate)
├─→ register (evaluate duplicates and decide strategy)
├─→ pr (PR body content + visual attachments)
├─→ review (post structured review comments)
├─→ expand (mid-work scope expansion)
├─→ dependencies (Issue Relationships: blocked-by/blocking)
│ └─→ used by merge step 5 (pre-merge blockedBy check)
├─→ merge (CI/Review/Test Plan/blockedBy verification → squash+merge)
├─→ review-apply (deferred [REVIEW_FEEDBACK] → code fix → Summary update)
│ └─→ receives from: consolidate Step 7 (deferred registration)
├─→ sanitize (HARD STOP scan before posting to PUBLIC repos)
└─→ upstream-issue (external repo feature request/bug report with duplicate check + draft + sanitize)
- dependencies → merge: dependencies adds blockedBy relationships. merge.md step 5 queries the same field to gate merge until predecessors are CLOSED
- plan-to-issue → dependencies: when a plan has frontmatter
chain:declaring a sequential issue order, dependencies applies it to GitHub - All topics → sanitize: any text published to PUBLIC repos (issue body, PR body, comments, review text) must pass sanitize HARD STOP first
Applicability
This skill applies automatically when git remote get-url origin contains github.com. For non-GitHub remotes (GitLab, Bitbucket, etc.), this skill does not apply.
Core Rules
1. Verification Plan Required
Every issue body and PR body must include a verification/test plan section. This is shared with code-workflow's plan step.
2. No Internal Paths in Issues/PRs
.ralph/docs/, .ralph/fix_plan.md, .omc/ and other internal working paths must never appear in GitHub issue body, comments, or PR body. These are local-only artifacts.
Instead of: "See .ralph/docs/generated/plan-180.md"
Write: The actual content inline, or "See the implementation plan comment below"
3. Body vs Comment Selection
| Content Type | Target | Reason |
|---|---|---|
| Implementation plan (confirmed) | Issue body update | Stable reference for the issue |
| Checklist (impl/verify) | Issue body update | Trackable via GitHub checkbox |
| Discussion items / open questions | Issue comment | Threaded, time-stamped, doesn't clutter body |
| Progress updates | Issue comment | Chronological record |
| Review feedback summary | Issue comment | Preserves review history |
常见问题
- 这个技能能用于 GitLab 或 Bitbucket 吗?
- 不能。只有当 `git remote get-url origin` 包含 github.com 时才会触发,其它远程不在适用范围。
- 内容应该写进 Issue 正文还是评论?
- 已确认的实施方案和清单放正文,方便稳定引用和复选框追踪;未决讨论、进度更新、评审摘要放评论,保留时间线和上下文。
- 合并前会做哪些校验?
- merge 主题会校验 CI 通过、AI 评审通过、验证计划已完成,并确认所有 blocker Issue 已关闭,然后才做 squash 合并。
相关技能
为代码变更提供研究→方案→评审→TDD 实现的标准四阶段流程,可附带 PR 视觉证据。
Use when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use `gh` to inspect checks and logs, summarize failure context, dra...
GitHub repository configuration and verification. Topics — actions (GitHub Actions workflow generation + Dependabot grouping by dependency type), setup (integrations: CodeRabbit, Copilot, issue/PR templates, CODEOWNERS, branch protection), verify (repo prerequisites checklist for github-flow: remote, default branch, PR template, branch protection, GitHub Actions, CONTRIBUTING, LICENSE). Use when: "github actions", "workflow generation", "CI workflow", "dependabot", "dependabot groups", "coderabbit", "copilot setup", "GitHub Actions", "repo setup", "CODEOWNERS", "PR template", "issue template", "branch protection", "repo verify".
Interact with GitHub via the gh CLI — issues, PRs, CI runs and repository health with auto-changelog and issue triage.
Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not...