Triage GitHub issues, select safe candidates, implement focused fixes, open pull requests, and address actionable review feedback.
64
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./packages/ekko-agent/skills/gh-issues/SKILL.mdUse 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.
owner/repo or infer it from git remote get-url origin.If the user asked only to inspect, triage, or plan, stop before changing files, branches, issues, or PRs.
git remote get-url origin
git status --short
gh auth status
gh repo view OWNER/REPO --json nameWithOwner,defaultBranchRefDerive 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.
gh issue list --repo "$SOURCE_REPO" --state open --limit 10 \
--json number,title,labels,url,body,assignees,milestoneAdd 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.
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/nullSkip 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.
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:
fix/issue-<n>;Delegated subagents cannot ask the user questions or delegate recursively. Resolve ambiguity before delegation.
For each selected issue:
fix/issue-<n> from the verified BASE_BRANCH in its isolated working tree.SOURCE_REPO and BASE_BRANCH.Use a PR body file rather than shell interpolation. Include:
Fixes SOURCE_REPO#<n> when automatic closure is intended.Never mark a test as passing unless it actually ran. If a failure is environmental, separate it from product failures and include the exact evidence.
Discover scoped PRs and comments:
gh pr view <n> --repo "$SOURCE_REPO" \
--json url,headRefName,comments,reviews,reviewDecision
gh api "repos/$SOURCE_REPO/pulls/<n>/comments"
gh api "repos/$SOURCE_REPO/issues/<n>/comments"Process only PRs the user named or PRs created by this workflow within the current task. Group actionable comments by PR. Ignore praise, status-only notes, duplicates, and comments already addressed.
For each PR, checkout its branch in one isolated working tree, make the smallest requested change, run relevant tests, commit, and push normally. Never force-push unless the user explicitly requested it. Reply to review comments only when that external write is part of the request, and reference the actual fix and evidence.
Return a compact result per issue or PR:
07ccb17
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.