GitHub 技能
通过 gh CLI 与 GitHub 交互,管理 Issue、PR、CI 运行及高级 API 查询。
它能帮你做什么
先看懂,再决定要不要交给 AI。
该技能封装了 GitHub 官方命令行工具 gh 的常用操作,涵盖 Issue 列表与查看、Pull Request 检查与状态查询、CI/Workflow 运行查看及日志检索,以及通过 gh api 进行高级数据查询。支持 --repo 参数指定仓库或直接使用 URL,并提供 --json 与 --jq 选项以结构化输出与过滤结果,便于脚本化处理与集成。
怎么交给 AI
在线读取优先,本地安装作为备选。
适合能访问网页的 ChatGPT、Agent 或其他 AI。
请访问 https://skills.dhmip.cn/skills/skillhub/github/SKILL.md,读取并按照该 Skill 完成任务;如当前环境支持本地安装,也可以下载该 Skill。未登录时可使用公共安装文档;登录后可以按不同 AI 分开管理。
请根据 https://skills.dhmip.cn/install/skillhub.md,安装 @skillhub/github。兼容性与要求
安装或使用前,先确认环境是否匹配。
适用客户端
使用要求
- 系统已安装并认证 gh CLI
- 具备目标仓库的访问权限
- 使用 --repo 参数或 URL 明确指定仓库
⌘技术详情查看完整 SKILL.md 与原始内容⌄
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."
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
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)"'