skills/create-issue/SKILL.md
Create comprehensive GitHub issues with TDD plans, acceptance criteria, and agent instructions for autonomous PR lifecycle management
npx skillsauth add dsifry/metaswarm create-issueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create comprehensive, well-structured GitHub issues with embedded agent instructions for autonomous PR lifecycle management.
This skill generates GitHub issues that are self-contained work packets. Each issue includes:
/create-issue
Ask the user:
What type of issue is this?
1. Feature - New functionality
2. Bug - Something broken
3. Refactor - Improving existing code
Brief description of the problem or feature? (1-2 sentences)
What's the estimated complexity?
1. Simple (< 1 day)
2. Medium (2-5 days)
3. Complex (> 1 week)
Any related files, services, or issues I should reference?
(Or say "explore codebase" and I'll investigate)
Based on inputs, generate the full issue using the appropriate template below.
## Summary
[1-2 sentence description]
**Complexity**: [simple|medium|complex]
**Estimated Effort**: [X days]
---
## Problem
[What problem does this solve? Why is it needed?]
### Evidence
[Logs, metrics, user reports, or reasoning]
### Scope
- IN SCOPE: [what's included]
- OUT OF SCOPE: [what's explicitly NOT included]
---
## Architecture Decision
**Decision**: [What approach will be taken]
**Rationale**: [Why this approach, why NOT alternatives]
---
## Technical Specification
### Types/Interfaces
```typescript
// Key type definitions
```
// Validation schemas
| Method | Path | Description | | ------ | ---- | ----------- |
[Schema changes, migrations needed]
it("should [expected behavior]", async () => {
// Test code
});
it("should handle [error case]", async () => {
// Test code
});
| Scenario | Behavior | Logging | | -------- | -------- | ------- |
path/to/new/file.tspath/to/existing/file.ts - [what changes]pnpm typecheck)pnpm lint)pnpm test --run)docs/SERVICE_INVENTORY.md updated (if new/modified service)CRITICAL: Follow this protocol when implementing this issue. A PR is NOT complete until ALL steps are done.
Read these files first to avoid reinventing the wheel:
Service Inventory - Check for existing services that might already do what you need:
# Read the service inventory
cat docs/SERVICE_INVENTORY.md
# Or search for specific functionality
grep -i "embedding\|search\|cache" docs/SERVICE_INVENTORY.md
Mock Factories - Review existing mocks to reuse patterns:
ls src/test-utils/factories/
Similar Services - Find services with similar patterns:
# Find orchestrator patterns
ls src/lib/services/*-orchestrator*.ts
# Find persistence patterns
ls src/lib/services/*-persistence*.ts
Why this matters: Reusing existing services and patterns saves time, maintains consistency, and prevents duplicate code.
git checkout -b feat/[short-name]pnpm lint && pnpm typecheck && pnpm test --run/create-prWait for code reviews before proceeding. Do NOT mark complete after pushing code.
For EACH code review iteration:
Fetch ALL comments (including trivial, nitpicks, and out-of-scope):
PR_NUMBER=XXX
OWNER=$(gh repo view --json owner -q .owner.login)
REPO=$(gh repo view --json name -q .name)
gh api "repos/$OWNER/$REPO/pulls/$PR_NUMBER/comments" --paginate
Address ALL comments by category:
| Type | Action | | ---------------------- | ---------------------------------------------------- | | Critical/Major | Fix immediately | | Medium/Minor | Fix before merge | | Trivial/Nitpick | Fix these too! Do NOT skip | | Out-of-scope | Investigate thoroughly - often the BEST insights |
For each comment:
After making changes:
pnpm lint && pnpm typecheck && pnpm test --run
git add . && git commit -m "fix: address review feedback" && git push
Respond to EVERY comment thread individually:
COMMENT_ID=XXX
CURRENT_USER=$(gh api user -q '.login')
gh api "/repos/$OWNER/$REPO/pulls/$PR_NUMBER/comments/$COMMENT_ID/replies" \
-X POST \
-f body="Fixed in commit $(git rev-parse --short HEAD). [explanation]
*(Response by Claude on behalf of @$CURRENT_USER)*"
Wait for next review cycle - Do NOT resolve threads yourself
Repeat steps 1-6 until reviewer confirms satisfaction
Only AFTER reviewer approval:
Re-fetch all threads to get current IDs
Resolve each thread:
THREAD_ID="PRRT_xxx"
gh api graphql -f threadId="$THREAD_ID" -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { id isResolved }
}
}'
Verify all threads resolved before proceeding
PR is ready for merge ONLY when ALL are true:
IMPORTANT: Always use squash merge, never regular merge.
Squash and merge the PR (combines all commits into one clean commit):
# Via GitHub CLI
gh pr merge $PR_NUMBER --squash --delete-branch
# Or via GitHub web UI:
# Click "Squash and merge" (NOT "Merge" or "Rebase and merge")
Delete the feature branch (automatically done with --delete-branch flag):
# If branch wasn't auto-deleted:
git push origin --delete feat/[branch-name]
git branch -d feat/[branch-name]
Update local main:
git checkout main
git pull origin main
See the /metaswarm:handle-pr-comments command for detailed protocol.
---
### Bug Template
Use the Feature template with these modifications:
**Title format**: `fix: [brief description]`
**Replace "Problem" section with**:
```markdown
## Bug Report
**Priority**: [P0-Critical|P1-High|P2-Medium|P3-Low]
**Affected Users**: [scope of impact]
**First Reported**: [date/source]
### Expected Behavior
[What should happen]
### Actual Behavior
[What actually happens]
### Steps to Reproduce
1. Step 1
2. Step 2
3. Step 3
### Root Cause Analysis
[If known, explain why this is happening]
### Evidence
[Logs, stack traces, screenshots]
Replace "TDD Implementation Plan" with:
## Test Cases
### Test 1: Verify fix for reported issue
```typescript
it("should [correct behavior] when [condition]", async () => {
// Reproduce the bug scenario
// Verify it's now fixed
});
```
it("should not regress [related functionality]", async () => {
// Ensure fix doesn't break other things
});
---
### Refactor Template
Use the Feature template with these modifications:
**Title format**: `refactor: [brief description]`
**Add after "Summary"**:
```markdown
## Background
[Why is this refactor needed? What triggered it?]
### Review Feedback Being Addressed
> [Quote the review comment that prompted this work]
- Original PR: #XXX
- Comment by: @reviewer
Add to "Acceptance Criteria":
- [ ] No breaking changes to public APIs
- [ ] All existing tests still pass without modification
- [ ] Performance not degraded (if applicable)
After generating the issue content:
Show preview to user
Ask for modifications if needed
Create issue with appropriate labels:
# Feature
gh issue create --title "feat: [title]" --body "[content]" \
--label "enhancement" --label "complexity:[level]"
# Bug
gh issue create --title "fix: [title]" --body "[content]" \
--label "bug" --label "priority:[level]"
# Refactor
gh issue create --title "refactor: [title]" --body "[content]" \
--label "refactor" --label "complexity:[level]"
Report issue number to user
documentation
Interactive project setup — detects your project, configures metaswarm, writes project-local files
development
Take screenshots of web pages and UI using Playwright for visual review and iteration
business
Diagnostic status report — shows metaswarm installation state, project setup, and potential issues
development
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work