github
它能做什么
该技能让智能体查询和管理 GitHub 上的工作,例如拉取请求、议题和构建检查。适用于把代码放在 GitHub 上的开发者。
适用场景
- ✓当你希望智能体显示某个拉取请求的状态、更改或检查结果时。
- ✓当你希望在 GitHub 上列出、阅读、创建或关闭某个议题时。
- ✓当你需要在发布前确认构建检查是否通过时。
技能链接
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/github/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示我代码仓库中未关闭的拉取请求,以及它们的检查是否通过。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用 gh 工具和 git 读取 GitHub 数据。只有在你要求时,它才会进行修改,例如创建拉取请求或合并。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GitHub
Use gh for GitHub operations and git for local branches, commits, pulls, and pushes. Use code-reading tools for deep reviews.
Prerequisites
Check authentication before making a GitHub request:
gh auth status
If gh is missing or unauthenticated, explain what is required. Do not invent credentials or expose tokens.
Pull requests
gh pr list --repo owner/repo --json number,title,state,author,url
gh pr view 55 --repo owner/repo --json title,body,author,files,commits,reviews,reviewDecision
gh pr checks 55 --repo owner/repo
gh pr diff 55 --repo owner/repo
gh pr create --repo owner/repo --title "feat: title" --body-file /tmp/pr.md
gh pr merge 55 --repo owner/repo --squash
URLs work directly with commands such as gh pr view. Treat create, comment, review, merge, close, release, and workflow rerun operations as external mutations: perform them only when the user requested that action. Before submitting, show or verify the exact repository and target.
Issues
gh issue list --repo owner/repo --state open --json number,title,labels,url
gh issue view 42 --repo owner/repo --json title,body,comments,labels,state
gh issue create --repo owner/repo --title "Bug: ..." --body-file /tmp/issue.md
gh issue comment 42 --repo owner/repo --body-file /tmp/comment.md
gh issue close 42 --repo owner/repo --comment "Fixed in ..."
CI and runs
gh run list --repo owner/repo --limit 10
gh run view <run-id> --repo owner/repo --json status,conclusion,headSha,url
gh run view <run-id> --repo owner/repo --log-failed
gh run rerun <run-id> --repo owner/repo --failed
API
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
gh api repos/owner/repo/labels --jq '.[].name'
gh api --cache 1h repos/owner/repo --jq '{stars: .stargazers_count, forks: .forks_count}'
Prefer --json with --jq for structured output. Use --body-file for comments and bodies containing backticks, shell snippets, environment names, or user-provided text.
常见问题
智能体需要我的 GitHub 密码吗?
不需要。它使用 GitHub 命令行工具,该工具必须已经登录,该技能也说明不要索要令牌。
它能替我合并拉取请求吗?
能,但只有在你要求该操作时才会执行。合并以及其他对 GitHub 的更改,都需要你先发出指示。
如果缺少 GitHub 工具怎么办?
智能体会说明需要什么,而不会静默安装。
详情
作者的原始描述
Use GitHub CLI for repositories, issues, pull requests, reviews, CI runs, releases, and structured GitHub API queries.
repo: EKKOLearnAI/ekko-studio
热度
- GitHub 星标
- 12k
- 排名
- #11566
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
1password
12k帮你的智能体使用 1Password CLI 为命令和配置文件获取机密信息,同时不在聊天、日志或已保存的文件中显示这些信息。
apple-notes
12k帮你的智能体在 Mac 上使用 memo 命令行工具创建、搜索、阅读、编辑、移动或删除 Apple 备忘录。
apple-reminders
12k帮你的智能体在 Mac 上使用 remindctl 工具列出、创建、编辑、完成或删除 Apple 提醒事项及提醒列表。
document-to-action-items
12k帮你的智能体把文档、会议记录或一组笔记,整理成一张清晰的任务、负责人、截止日期和决定的表格。