github
它能做什么
这个工具可以帮你与 GitHub 交互。GitHub 是开发者存放和分享代码的网站。你可以查看项目运行状态、议题以及代码审查情况。
适用场景
- ✓当你想确认某个 GitHub 项目是否运行正常时。
- ✓当你想查看项目中错误的详细信息时。
- ✓当你想列出或查看代码审查(拉取请求)的状态时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/github/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“查看 'my-user/my-project' 仓库中第 55 号拉取请求的状态。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用一个名为 `gh` 的程序直接与 GitHub 通信。你告诉它你想要什么,比如查看某个审查的状态,`gh` 就会为你获取相关信息。
技术内容(原始 SKILL.md)
作者在 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.
When to Use
- When the user asks about GitHub issues, pull requests, workflow runs, or CI failures.
- When you need
gh issue,gh pr,gh run, orgh apifrom the command line.
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:
- Check PR status — identify which checks are failing:
gh pr checks 55 --repo owner/repo - List recent runs — find the relevant run ID:
gh run list --repo owner/repo --limit 10 - View the failed run — see which jobs and steps failed:
gh run view <run-id> --repo owner/repo - 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)"'
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
什么是“拉取请求”?
它是一种请求,用于将代码变更添加到项目中。它允许其他人在变更被接受之前进行审查。
什么是“Actions 运行记录”或“工作流运行记录”?
它们是在 GitHub 上自动运行的任务,比如代码测试,用来确保一切运行正常。
我需要会编程才能使用吗?
不需要。你只需要知道项目名称以及想查看的内容,技术部分由工具来处理。
详情
作者的原始描述
Use the `gh` CLI for issues, pull requests, Actions runs, and GitHub API queries.
热度
- GitHub 星标
- 48k
- 排名
- #4751
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。