Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Github Implement Top Issue

ASecurity

Use when asked to find and implement the highest-priority GitHub issue for the current project — e.g. "work the top issue", "pick up the next issue", "implement the most important open issue". Detects the repo from the current directory, ranks open issues, implements the winner, opens a draft PR, and drives it to mergeable via github:pr-ship.

8 stars
0 votes
0 copies
0 views
Added 9/20/2026
ai-agentsgobashgit

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add tstapler/dotfiles --skill github-implement-top-issue --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Implement Top Issue?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Github Implement Top Issue
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tstapler-github-implement-top-issue/badge)](https://www.skillsdirectory.com/skills/tstapler-github-implement-top-issue)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: github-implement-top-issue
description: Use when asked to find and implement the highest-priority GitHub issue for the current project — e.g. "work the top issue", "pick up the next issue", "implement the most important open issue". Detects the repo from the current directory, ranks open issues, implements the winner, opens a draft PR, and drives it to mergeable via github:pr-ship.
---

# Implement the top GitHub issue

1. **Resolve the repo** from the current directory: `gh repo view --json nameWithOwner --jq .nameWithOwner`. If that fails (not a GitHub repo, no `gh` auth), stop and say so.

2. **Rank open issues** with this one-liner (adjust `--limit` if the repo has more than 100 open issues). It excludes already-assigned issues and `blocked`/`wontfix`/`duplicate`/`invalid`, then sorts by priority label → comment count → age (oldest first):

   ```bash
   gh issue list --state open --limit 100 \
     --json number,title,body,labels,assignees,comments,createdAt,url \
     --jq '
       map(select(
         (.assignees | length) == 0
         and (([.labels[].name] | any(test("blocked|wontfix|duplicate|invalid";"i"))) | not)
       ))
       | map(. + {
           prio: (
             if   ([.labels[].name] | any(test("P0|priority:\\s*critical";"i"))) then 0
             elif ([.labels[].name] | any(test("P1|priority:\\s*high";"i")))     then 1
             elif ([.labels[].name] | any(test("P2|priority:\\s*medium";"i")))   then 2
             elif ([.labels[].name] | any(test("P3|priority:\\s*low";"i")))      then 3
             else 4 end
           ),
           commentCount: (.comments | length)
         })
       | sort_by([.prio, -.commentCount, .createdAt])
     '
   ```

   This repo has no priority labels, so everything falls into bucket 4 and ties break on
   comments/age — that's expected, not a bug in the query.

   If the array is empty, tell the user there's nothing eligible (all issues are assigned or
   filtered out) and stop.

3. **Check the top-ranked candidate for a stale close** before announcing it — some repos have
   issues that were already fixed by a merged PR but never got closed (e.g. an issue filed by an
   automated agent, or `Closes #n` omitted from the fixing PR). For the top candidate:

   - `git log --oneline --all | grep -i "<keyword from the issue title>"` to look for a merged
     commit/PR touching the same area.
   - If a plausible match turns up, open that PR (`gh pr view <n> --json title,body,mergedAt,state`)
     and do one quick read of the current relevant source to confirm the fix is actually present
     in the code today (not just claimed in the PR body — code can regress after merge).
   - If confirmed already fixed: close the issue with a comment citing the PR and what you
     verified, then drop to the next-ranked candidate and repeat this check on it. Keep going
     until you land on a candidate that is genuinely still open, or you run out of candidates
     (in which case tell the user the queue is empty of real work and stop).
   - If nothing turns up in a quick search, or the match is ambiguous, treat the candidate as
     open and proceed — this check is a cheap grep-and-read, not a deep investigation. Don't
     spend more than a couple of minutes per candidate on it.

4. **Announce the pick** in one line: issue number, title, and why (matched a priority label,
   or "no priority labels — oldest/most-discussed open issue"). Mention any candidates skipped
   as already-fixed in step 3.

5. **Read the issue** (`gh issue view <n> --json title,body,comments`) and implement it following
   this repo's own conventions (CLAUDE.md, existing tests/lint) — state the root-cause hypothesis
   before changing code, don't invent scope beyond what the issue asks for.

6. **Verify**: run the repo's tests/build/lint before claiming done.

7. **Open a draft PR** (`gh pr create --draft`) with `Closes #<n>` in the body, following this
   repo's normal commit/PR conventions.

8. **Ship it**: invoke the `github:pr-ship` skill on the PR you just opened and let it iterate
   (local CI, code review, remote CI, review comments, merge conflicts) until the PR is
   mergeable. Opening the draft PR is not the finish line — do not report the task done, hand
   back to the user, or stop until `github:pr-ship` reports the PR is ready to merge (or reports
   a blocker only the user can resolve, e.g. a design question or missing credential). If
   `github:pr-ship` surfaces such a blocker, report it plainly and say what's needed — don't
   silently give up and call it done.

Skip steps 5-8 and just report the ranked list if the user only asked which issue is next, not
to implement it. Still run the step-3 stale-close check in this mode, and report any candidates
you closed as already-fixed alongside the list.

Attribution

tstaplertstapler
View sourceMore from tstapler →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →