Github

mitsuhiko/agent-stuff/skills/github

作者 mitsuhiko0865c849befd2021490679f96a8dee58c84ac857无许可证收录于 2026年10月9日更新于 2026年10月9日

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.

仅含说明DevOps & Cloud
AI 生成的概览

指导使用 gh 命令行工具查看 GitHub 的拉取请求、议题、CI 运行和 API 数据。

功能
该技能提供通过 gh 命令行工具与 GitHub 交互的说明。它演示如何检查拉取请求的 CI 状态、列出并查看工作流运行、查看失败步骤的日志,以及通过 gh api 查询数据。它还介绍了结构化 JSON 输出和用 --jq 进行过滤。
适用场景
当你需要从命令行查看 GitHub 的拉取请求、议题、CI 运行或仓库数据时使用。它适合已安装 gh 并希望获得具体命令示例而非通用 GitHub 指导的场景。
运行要求
需要安装并完成身份验证的 gh 命令行工具,以及对 GitHub 的网络访问。该技能不附带脚本,仅为说明文档。

GitHub Skill

Use the gh CLI to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.

Pull Requests

Check CI status on a PR:

bash
gh pr checks 55 --repo owner/repo

List recent workflow runs:

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

View a run and see which steps failed:

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

View logs for failed steps only:

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

API for Advanced Queries

The gh api command is useful for accessing data not available through other subcommands.

Get PR with specific fields:

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

JSON Output

Most commands support --json for structured output. You can use --jq to filter:

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

来源与署名

来源:mitsuhiko/agent-stuff位于skills/github提交0865c84

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架