跳到正文
Skillpedia
部署与云(DevOps)12k · #11566

github

它能做什么

该技能让智能体查询和管理 GitHub 上的工作,例如拉取请求、议题和构建检查。适用于把代码放在 GitHub 上的开发者。

适用场景

  • ✓当你希望智能体显示某个拉取请求的状态、更改或检查结果时。
  • ✓当你希望在 GitHub 上列出、阅读、创建或关闭某个议题时。
  • ✓当你需要在发布前确认构建检查是否通过时。

技能链接

https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/github/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/github/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能