登录
github.md已公开
current skill~ /skills/github

github

通过 `gh` 命令行界面(CLI)执行 GitHub 操作:问题、拉取请求、持续集成运行、代码审查、API 查询。适用场景:(1)检查拉取请求状态或持续集成情况,(2)创建/评论问题,(3)列出/筛选拉取请求或问题,(4)查看运行日志。不适用于:需要手动浏览器流程的复杂网页用户界面交互(可用时使用浏览器工具),跨多个仓库的批量操作(使用 gh api 编写脚本),或未配置 gh 认证的情况。

code
downloads
40
updated
2026/04/15
author
Admin
visibility
已公开
downloads.trend.tsxlast 7 days

当前技能最近 7 天下载趋势

用和首页一致的趋势图,快速判断这个 skill 最近是否还在被持续下载和使用。

7d total
1
quickstart.shinstall
安装命令
npx skills add github
使用建议

先看趋势和左侧结构化信息,再决定是直接下载、复制安装命令,还是继续阅读原始 `SKILL.md`。

overview.tsdecision summary
Use the gh CLI to interact with GitHub repositories, issues, PRs, and CI.
✅ USE this skill when:
SKILL.md previewcollapsible

name
github
description
通过 `gh` 命令行界面(CLI)执行 GitHub 操作:问题、拉取请求、持续集成运行、代码审查、API 查询。适用场景:(1)检查拉取请求状态或持续集成情况,(2)创建/评论问题,(3)列出/筛选拉取请求或问题,(4)查看运行日志。不适用于:需要手动浏览器流程的复杂网页用户界面交互(可用时使用浏览器工具),跨多个仓库的批量操作(使用 gh api 编写脚本),或未配置 gh 认证的情况。
---
name: github
description: "GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available), bulk operations across many repos (script with gh api), or when gh auth is not configured."
metadata:
  {
    "openclaw":
      {
        "emoji": "🐙",
        "requires": { "bins": ["gh"] },
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (brew)",
            },
            {
              "id": "apt",
              "kind": "apt",
              "package": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (apt)",
            },
          ],
      },
  }
---

# GitHub Skill

Use the `gh` CLI to interact with GitHub repositories, issues, PRs, and CI.

## When to Use

✅ **USE this skill when:**

- Checking PR status, reviews, or merge readiness
- Viewing CI/workflow run status and logs
- Creating, closing, or commenting on issues
- Creating or merging pull requests
- Querying GitHub API for repository data
- Listing repos, releases, or collaborators

## When NOT to Use

❌ **DON'T use this skill when:**

- Local git operations (commit, push, pull, branch) → use `git` directly
- Non-GitHub repos (GitLab, Bitbucket, self-hosted) → different CLIs
- Cloning repositories → use `git clone`
- Reviewing actual code changes → use `coding-agent` skill
- Complex multi-file diffs → use `coding-agent` or read files directly

## Setup

```bash
# Authenticate (one-time)
gh auth login

# Verify
gh auth status
```

## Common Commands

### Pull Requests

```bash
# List PRs
gh pr list --repo owner/repo

# Check CI status
gh pr checks 55 --repo owner/repo

# View PR details
gh pr view 55 --repo owner/repo

# Create PR
gh pr create --title "feat: add feature" --body "Description"

# Merge PR
gh pr merge 55 --squash --repo owner/repo
```

### Issues

```bash
# List issues
gh issue list --repo owner/repo --state open

# Create issue
gh issue create --title "Bug: something broken" --body "Details..."

# Close issue
gh issue close 42 --repo owner/repo
```

### CI/Workflow Runs

```bash
# List recent runs
gh run list --repo owner/repo --limit 10

# View specific run
gh run view <run-id> --repo owner/repo

# View failed step logs only
gh run view <run-id>

预览已截断。下载完整技能包可查看全部文件内容。

next-steps.mdrecommended flow

1. 先判断它是否匹配你的任务、运行环境和依赖边界。

2. 再结合最近 7 天下载趋势,决定是直接安装还是先下载完整包审阅。

3. 需要程序化集成时,再去 Docs 查看 API 和 OpenAPI 描述。