agentleFS
L-LesterYuL-LesterYu/OpenClaw-hot-skills-zh/skills/github-zh/SKILL.md

github

Skill56 starsChanged 9 months agoMITView on GitHub

使用 `gh` CLI 与 GitHub 交互。使用 `gh issue`、`gh pr`、`gh run` 和 `gh api` 处理问题、PR、CI 运行和高级查询。

  • Installs packages
  • Commits and pushes

96 other projects use a version of this, 21 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use gifgrep, goplaces and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • seedprodSkill

    gifgrep

    Search GIF providers with CLI/TUI, download results, and extract stills/sheets.

    Also in 8 projects that use this

  • seedprodSkill

    goplaces

    Query Google Places API (New) via the goplaces CLI for text search, place details, resolve, and reviews. Use for human-friendly place lookup or JSON output for scripts.

    Also in 6 projects that use this

  • +9 more from seedprod

The file

Files
SKILL.md

GitHub 技能

使用 gh CLI 与 GitHub 交互。当不在 git 目录中时,始终指定 --repo owner/repo,或直接使用 URL。

Pull Requests(拉取请求)

检查 PR 的 CI 状态:

gh pr checks 55 --repo owner/repo

列出最近的 workflow 运行:

gh run list --repo owner/repo --limit 10

查看运行记录并查看哪些步骤失败:

gh run view <run-id> --repo owner/repo

仅查看失败步骤的日志:

gh run view <run-id> --repo owner/repo --log-failed

高级查询 API

gh api 命令对于访问其他子命令无法获取的数据非常有用。

获取 PR 的特定字段:

gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'

JSON 输出

大多数命令支持 --json 以获得结构化输出。你可以使用 --jq 进行过滤:

gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'

常用命令示例

Issues(问题)

列出仓库的 issues:

gh issue list --repo owner/repo

创建新 issue:

gh issue create --repo owner/repo --title "标题" --body "描述"

查看 issue 详情:

gh issue view 123 --repo owner/repo

Pull Requests(拉取请求)

创建 PR:

gh pr create --repo owner/repo --title "PR 标题" --body "PR 描述"

查看 PR 详情:

gh pr view 55 --repo owner/repo

合并 PR:

gh pr merge 55 --repo owner/repo

Workflows(工作流)

查看特定的 workflow 运行:

gh run view <run-id> --repo owner/repo

重新运行失败的 workflow:

gh run rerun <run-id> --repo owner/repo

Repositories(仓库)

克隆仓库:

gh repo clone owner/repo

创建新仓库:

gh repo create repo-name --public

查看仓库信息:

gh repo view owner/repo

使用场景

  • CI/CD 监控:检查持续集成状态,查看构建失败原因
  • Issue 管理:创建、查看和管理 GitHub issues
  • PR 工作流:处理拉取请求的完整生命周期
  • 自动化脚本:在脚本中使用 GitHub API 进行自动化操作
  • 项目协作:管理团队项目和代码审查流程

安装

确保已安装 GitHub CLI (gh):

# macOS
brew install gh

# Linux
# 参考: https://github.com/cli/cli/blob/trunk/docs/install_linux.md

# Windows
winget install GitHub.cli

首次使用需要进行身份认证:

gh auth login

提示

  • 使用 --help 标志查看任何命令的详细帮助
  • 使用 --json 和 --jq 进行灵活的数据提取和处理
  • 在脚本中使用 --quiet 或 --silent 减少输出
  • 使用 gh api 访问 GitHub REST API 的任何端点

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.