Skip to content
Skills Library
Programming · Tool integration

github-workflow

/github-workflow

当用户要操作 GitHub PR / Issue / CI、代码审查、合并 PR、查看工作流运行、读取或更新远程仓库文件时使用。

Repository
zhiwei ↗
Licence
MIT
Last repository change
13.06.2026

Assessment and security

86/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

当用户要操作 GitHub PR / Issue / CI、代码审查、合并 PR、查看工作流运行、读取或更新远程仓库文件时使用。

Original author description

当用户要操作 GitHub PR / Issue / CI、代码审查、合并 PR、查看工作流运行、读取或更新远程仓库文件时使用。

How it works

  1. 适用场景
  2. 不适用场景
  3. 工作流(按操作分流)
  4. 详细参考
Original SKILL.md headings · 44 lines, 249 words
SKILL.md preview
---
name: github-workflow
description: 当用户要操作 GitHub PR / Issue / CI、代码审查、合并 PR、查看工作流运行、读取或更新远程仓库文件时使用。
version: 2.1.0
metadata:
  zhiwei:
    tags:
      - github
      - pr
      - issue
      - ci
      - code-review
      - gh-cli
      - actions
    suggested_tools:
      - shell_exec
      - web_fetch
      - file_read
      - file_write
    requires:
      bins:
        - gh
      env:
        - GITHUB_TOKEN
---

# GitHub 协作指南

`gh` CLI + REST/GraphQL API 管理 GitHub PR / Issue / CI / 代码审查。

## 适用场景

- PR 创建 / 审查 / 合并
- Issue 创建 / 管理 / 关闭
- CI / Actions 状态查 + 失败排查
- 代码审查(看 diff、留 review comment)
- 远程仓库文件查看与编辑(Contents API)

## 不适用场景

- 纯本地 Git 操作(commit / branch / log)→ `shell_exec` / `shell_exec`
- 代码编写本身 → code-assistant
- 其他平台(Gitee / GitLab / Bitbucket)→ `shell_exec` 调对应 CLI 或 API

## 工作流(按操作分流)

| 操作 | 路径 |
|---|---|
| 本地 commit + push + 创 PR | `shell_exec(command="git add ... && git commit -m '...'")` → `shell_exec(command="git push")` → `gh pr create` |
| 仅 GitHub 侧(看 / 评论 / 合并 PR) | `shell_exec` + `gh pr ...` |
| Issue 创建 / 查询 / 评论 | `shell_exec` + `gh issue ...` |
| CI 状态 + 失败排查 | `shell_exec` + `gh run list / view --log-failed` |
| 代码审查(拉 diff + 留意见) | `gh pr diff` + `gh pr review` |
| 远程文件直改(不 clone) | `shell_exec` + `gh api`(Contents API) |
| 复杂查询(跨仓 / 批量) | `gh api graphql` 或 `web_fetch` GraphQL |

各路径要点:

- **CI 通过才合并**:合 PR 前 `gh pr checks <pr>` 看全绿
- **git 操作走 shell_exec**:所有 git 命令(status/diff/log/commit/push 等)统一用 `shell_exec` 执行
- **Contents API 整体解码**:返回的 Base64 含换行,必须先去空白再整体 base64 解码;逐行解会破坏多字节 UTF-8
- **时间窗口收窄**:`since` / `until` 限定范围;结果太多缩窗口而不是 `--paginate`
- **token 走 env**:`GITHUB_TOKEN` 由系统注入,命令里不写明文

## 详细参考

- gh CLI 命令速查(PR / Issue / CI / 审查):`{skill_dir}/references/gh-cli-reference.md`
- Contents API 文件更新(Bash / PowerShell)+ 时间范围查询:`{skill_dir}/references/content-api.md`
Files in this package (3)
  • SKILL.md 2 KB
  • references/content-api.md 1 KB
  • references/gh-cli-reference.md 2 KB

Versions

RepositoryScoreLicence
This page · ntygod/zhiwei86MIT
decentraland/unity-explorer100Apache-2.0
masscodeio/masscode100AGPL-3.0
ibrain-bvba/gutt-claude-code-plugin100MIT
transilienceai/communitytools100MIT
hihol-labs/product-factory-os100MIT
jmfontaine/jmf-claude-plugins90Apache-2.0
ameghcoder/claude-code-starter-kit90MIT

Database snapshot: 13.11.2026 · package version 2e0cc6a9c20d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90github-repository-management
    通过 GitHub MCP 管理仓库协作时使用,例如检索仓库、提 Issue、起草或创建 PR、查看评论、回复评审和做合并前检查。当用户要操作 GitHub 仓库协作流程而不是修改本地代码实现时优先使用。
  • 100github
    Interact with GitHub using the `gh` CLI. Use when users ask about pull requests, issues, CI/CD status, workflow runs, repository information, or want to create, review, or merge PRs. Covers `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, pull requests, actions, checks,…
  • 86merge-github-pr
    Use when safely merge GitHub pull requests that are ready
  • 100github
    Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUB_TOKEN environment variable and GitHub CLI. Use when working with code hosted on GitHub or managing GitHub resources.
  • 91github-pr-audit
    Use when auditing a GitHub PR or issue before merge.
  • 100github
    Create and manage GitHub issues, pull requests, workflows, and repositories using the gh CLI. Use when asked to open a PR, merge a pull request, check repo actions, list issues, create a branch, or manage GitHub projects.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.