Agent skill
next-github-issue
Fetch the oldest open GitHub issue and implement it. Automatically delegates to /feature based on issue scope.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/next-github-issue
SKILL.md
Next GitHub Issue Skill - Orchestrator
Orchestrator ONLY spawns Opus subagents and collects summaries. ALL work is delegated.
Critical Rules
- NEVER run bash commands - subagents run commands
- NEVER read files - subagents read files
- Orchestrator only: spawns agents, tracks todos, reports summaries
Phase 1: Fetch Issues Subagent
Spawn a single subagent to fetch and select the oldest issue:
Task(general-purpose, model: opus):
Fetch open GitHub issues and select the oldest.
---
## Tasks
1. **Fetch issues**:
```bash
gh issue list --state open --json number,title,createdAt,labels,url --jq 'sort_by(.createdAt)'
-
Skip issues with labels: blocked, wontfix, duplicate
-
Select the oldest non-blocked issue
-
Fetch full issue details:
bashgh issue view <number> --json number,title,body,labels,createdAt,author,comments
Output Format
---
ALL_ISSUES:
- number: 42
title: "Add blog section"
age_days: 14
labels: [enhancement]
- number: 15
title: "Fix animation flicker"
age_days: 12
labels: [bug]
SELECTED_ISSUE:
number: 42
title: "Add blog section"
url: "https://github.com/.../issues/42"
body: "[full issue body]"
comments: "[any comments]"
labels: [enhancement]
created_at: "2025-01-01"
author: "username"
NO_ISSUES_FOUND: false
---
**If NO_ISSUES_FOUND: true** → Report to user and exit.
---
## Phase 2: Compose User Story
Based on the selected issue, compose a user story for `/feature`:
```yaml
USER_STORY:
title: "[derive from issue title]"
description: |
## User Story
**As a** visitor to wouterwisse.com
**I want** [derive from issue title]
**So that** [derive from issue description]
## GitHub Issue
- Issue: #[number]
- URL: [url]
## Description
[full issue body]
## Acceptance Criteria
[convert issue requirements to checkboxes]
- [ ] [criterion 1]
- [ ] [criterion 2]
- [ ] Closes GitHub issue #[number]
## Comments
[any discussion from issue]
Phase 3: Invoke /feature Skill
Invoke the skill directly to implement the user story:
Skill(feature)
Pass the composed user story as input. The /feature skill will handle the full implementation workflow including:
- Research and planning
- Implementation via /task skill
- Verification and PR creation
Important: Ensure the PR body includes "Fixes #[number]" to auto-close the issue.
Wait for /feature to complete, then collect the PR URL from its output.
Phase 4: Link Issue Subagent
After /feature completes, spawn subagent to link issue:
Task(general-purpose, model: opus):
Link GitHub issue to the created PR.
---
## Context
ISSUE_NUMBER: [number]
PR_URL: [from Phase 3]
---
## Tasks
1. Comment on the issue with PR link:
```bash
gh issue comment <number> --body "Implemented in PR #<pr_number>
The PR will auto-close this issue when merged."
Output Format
---
ISSUE_LINKED: true | false
COMMENT_ADDED: true | false
---
---
## Phase 5: Report to User
Summarize all results:
```markdown
## GitHub Issue Implemented
### Issue
- **Issue**: #42 - Add blog section
- **URL**: https://github.com/.../issues/42
### Implementation
Delegated to `/feature` workflow.
### PR Created
- PR: https://github.com/.../pull/123
### Issue Linked
Comment added linking to PR
### Next Steps
1. Review the PR
2. Run `/fix-pr` to address review comments
3. Merge PR → Issue auto-closes
Progress Tracking
Use TodoWrite throughout:
todos:
- content: "Fetch issues"
status: completed
- content: "Select oldest issue"
status: completed
- content: "Compose user story"
status: completed
- content: "Delegate to /feature"
status: in_progress
- content: "Link issue to PR"
status: pending
Key Principles
- Orchestrator is minimal - only spawns agents, invokes skills, and collects results
- Issue fetching is delegated - subagent runs gh commands
- Skill invocation by orchestrator - only orchestrator can invoke Skill tool
- Implementation via /feature - full workflow delegation
- Issue linking is delegated - subagent posts comment
- Auto-close setup - PR body includes "Fixes #X"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?