跳到正文
Skillpedia
通用编程12k · #11565

gh-issues

它能做什么

该技能引导智能体从一个 GitHub 议题走到完成的拉取请求。适用于希望智能体在代码仓库中处理常规缺陷修复的开发者。

适用场景

  • ✓当你希望智能体挑选几个未关闭的 GitHub 议题,并修复其中一个时。
  • ✓当你希望把修复变成 GitHub 上的拉取请求时。
  • ✓当审查人员在拉取请求上留下评论,你希望智能体予以回应时。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请查看我们代码仓库中未解决的缺陷,挑选一个可以安全修复的,并发起拉取请求。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查代码仓库和 GitHub 登录状态,列出候选议题,并在分支上做有针对性的修改。它只会为你要求的结果进行推送或发起拉取请求。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

GitHub issues to pull requests

Use this workflow for issue-to-PR work. Use gh for GitHub data and mutations, git for the local checkout, and delegate_task only when an isolated subtask is genuinely useful.

Read the bundled github Skill before executing this workflow. GitHub writes, commits, pushes, PR creation, and review replies must stay within the outcome the user requested.

Inputs

  • Repository: accept owner/repo or infer it from git remote get-url origin.
  • Optional filters: label, milestone, assignee, state, and limit.
  • Optional fork: push a branch to a named fork and open the PR against the source repository.
  • Dry run: list candidates and planned actions without changing local or remote state.
  • Reviews only: skip issue selection and process explicitly scoped PR feedback.

If the user asked only to inspect, triage, or plan, stop before changing files, branches, issues, or PRs.

1. Resolve and verify the repository

git remote get-url origin
git status --short
gh auth status
gh repo view OWNER/REPO --json nameWithOwner,defaultBranchRef

Derive and keep explicit:

  • SOURCE_REPO: repository containing the issue.
  • PUSH_REPO: fork when explicitly requested, otherwise the source.
  • BASE_BRANCH: source default branch unless the user named another.
  • PUSH_REMOTE: configured fork remote or origin.

Stop if GitHub authentication is unavailable. Never search local configuration files for tokens, print gh auth token, or ask the user to paste a token into chat.

Do not mix issue work with unrelated uncommitted changes. If the checkout is dirty, preserve those changes and either ask the user how to proceed or create a dedicated git worktree after confirming the repository and base branch.

In fork mode, show the exact source, fork, base branch, and remote before adding or changing a git remote.

2. Fetch candidates

gh issue list --repo "$SOURCE_REPO" --state open --limit 10 \
  --json number,title,labels,url,body,assignees,milestone

Add only the filters the user requested. gh issue list excludes pull requests. If there are no matches, report that and stop. For a dry run, show a compact candidate list with issue number, title, labels, and URL, then stop.

3. Avoid duplicate work

For each candidate, look for an existing fix before selecting it:

gh pr list --repo "$SOURCE_REPO" --search "$SOURCE_REPO#<n>" --state open \
  --json number,url,title,headRefName
gh pr list --repo "$SOURCE_REPO" --head "fix/issue-<n>" --state open \
  --json number,url
gh api "repos/$PUSH_REPO/branches/fix/issue-<n>" >/dev/null

Skip an issue that already has an open PR or branch unless the user asked to continue that work. Read the issue body and relevant code before deciding it is actionable. Prefer small, reproducible issues with a clear acceptance condition; flag ambiguous or security-sensitive issues for clarification.

When several issues match and the user did not already select them, present the candidates and ask which issue numbers to fix.

4. Isolate the work

Default to one issue at a time. Ekko subagents share the workspace, so never let concurrent workers checkout different branches in the same working tree.

For one issue, either implement locally or call delegate_task in foreground mode with a self-contained goal and all required context. For independent parallel work, first create one dedicated git worktree per issue and give each background subagent its exact worktree path. Use background mode only when enabled and useful; progress is visible to the user, but the parent must not pretend it synchronously collected a result.

The task context must include:

  • issue URL, title, body, labels, and acceptance conditions;
  • source and push repositories, base branch, push remote, and fork mode;
  • isolated working directory and target branch fix/issue-<n>;
  • required tests and proof;
  • the authorized mutation boundary, including whether commit, push, and PR creation were requested.

Delegated subagents cannot ask the user questions or delegate recursively. Resolve ambiguity before delegation.

5. Implement and prove the fix

For each selected issue:

  1. Create fix/issue-<n> from the verified BASE_BRANCH in its isolated working tree.
  2. Reproduce or locate the problem.
  3. Implement the smallest coherent fix; avoid unrelated refactors.
  4. Add or update focused tests when appropriate.
  5. Run the relevant tests, type checks, and build steps.
  6. R
常见问题

如果我只是想要一份列表,它会修改任何内容吗?

不会。如果你只要求检查、分诊或规划,它会在修改文件、分支、议题或拉取请求之前停止。

它能把修复推送到分支副本(fork)吗?

能,如果你指定了分支副本。然后它会针对原始代码仓库发起拉取请求。

它使用哪个 GitHub 工具?

它使用 GitHub 命令行工具 gh,你需要先登录它。

详情

作者的原始描述

Triage GitHub issues, select safe candidates, implement focused fixes, open pull requests, and address actionable review feedback.

repo: EKKOLearnAI/ekko-studio

热度

GitHub 星标
12k
排名
#11565
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能