github

GitHub

基于 gh CLI 与 GitHub 交互,支持 PR、Issue 管理及 CI/CD 流水线状态检查。提供调试失败流程的标准化步骤及高级 API 查询方法,辅助开发者高效完成代码审查与发布运维任务。

github/SKILL.md Dimillian/Skills

触发场景

检查 PR 的 CI 状态 列出或查看工作流运行记录 调试失败的 CI 流水线 查询 GitHub Issue 或 PR 信息 使用 gh api 进行高级数据查询

安装

npx skills add Dimillian/Skills --skill github -g -y
更多选项

非标准路径

npx skills add https://github.com/Dimillian/Skills/tree/main/github -g -y

不安装直接使用

npx skills use Dimillian/Skills@github

指定 Agent (Claude Code)

npx skills add Dimillian/Skills --skill github -a claude-code -g -y

安装 repo 全部 skill

npx skills add Dimillian/Skills --all -g -y

预览 repo 内 skill

npx skills add Dimillian/Skills --list

SKILL.md

Frontmatter
{
    "name": "github",
    "description": "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. Use when the user asks about GitHub issues, pull requests, workflows, or wants to interact with GitHub repositories from the command line — including tasks like check CI status, create PR, list issues, or query the GitHub API."
}

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:

gh pr checks 55 --repo owner/repo

List recent workflow runs:

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

View a run and see which steps failed:

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

View logs for failed steps only:

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

Debugging a CI Failure

Follow this sequence to investigate a failing CI run:

  1. Check PR status — identify which checks are failing:
    gh pr checks 55 --repo owner/repo
    
  2. List recent runs — find the relevant run ID:
    gh run list --repo owner/repo --limit 10
    
  3. View the failed run — see which jobs and steps failed:
    gh run view <run-id> --repo owner/repo
    
  4. Fetch failure logs — get the detailed output for failed steps:
    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:

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:

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

版本历史

  • 05ba982 当前 2026-07-25 07:25

同 Skill 集合

app-store-changelog/SKILL.md
bug-hunt-swarm/SKILL.md
ios-debugger-agent/SKILL.md
macos-menubar-tuist-app/SKILL.md
macos-spm-app-packaging/SKILL.md
orchestrate-batch-refactor/SKILL.md
project-skill-audit/SKILL.md
react-component-performance/SKILL.md
review-and-simplify-changes/SKILL.md
review-swarm/SKILL.md
swift-concurrency-expert/SKILL.md
swiftui-liquid-glass/SKILL.md
swiftui-performance-audit/SKILL.md
swiftui-ui-patterns/SKILL.md
swiftui-view-refactor/SKILL.md

元信息

文件数
0
版本
05ba982
Hash
be99dc6f
收录时间
2026-07-25 07:25

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 18:40
浙ICP备14020137号-1 $访客地图$