Create GitHub Issue
Create well-formed GitHub issues in the correct tickets repository (insightt-tickets or foundd-tickets) based on source repository context. Follows a research-first approach to avoid duplicates and produces terse, outcome-oriented issue content.
Agent Directive: Assume the create-github-issue agent persona when executing this skill.
Execution Flow
Follow this sequence. Each phase gates the next. Do not skip the user confirmation step.
Phase 1: Discovery
1. Determine Target Repository
- Extract source repository from context (active file path, user mention, or explicit repo name)
- Apply org family detection:
- If repo name contains "insightt" → target
rapid-recovery-agency-inc/insightt-tickets
- If repo name contains "foundd" → target
rapid-recovery-agency-inc/foundd-tickets
- If unclear → check MCP memory for org hints
- If still unclear → ask user to confirm target repo
- Validate detected target repo:
- Check if target repo is accessible (use GitHub MCP if available)
- If not accessible, fall back to asking user for correct repo
- Prevents routing to archived/legacy repos like "insightt-archive"
2. Gather Context (Evidence-First)
- Aggressively gather evidence before asking user anything. See references/module-research.md.
- Identify: repo name, affected system, problem, expected outcome, scope clues
- Optionally check for
.github/ISSUE_TEMPLATE/ files in target repo (low priority, non-blocking):
- If templates exist, extract useful hints (e.g., required fields, specific labels mentioned)
- Use as supplementary guidance only; never let templates override skill's format
- Primary behavior: always use skill's own format from references/issue-format.md
- Apply Question Priority Discriminator if questions needed:
- P0 (Critical): Blocks creation (wrong repo, ambiguous scope) → Ask immediately
- P1 (High): No business problem inferable → Ask if no evidence
- P2 (Medium): Improves quality but draft usable without → Infer and draft
- P3 (Low): Formatting preferences → Never ask; skill owns these
- Default: Make smart assumptions for P2/P3. Only ask P0/P1.
3. Duplicate Detection
- Search the target tickets repo (not source repo) using:
- Exact symptom search: distinctive error messages or problem descriptions
- Feature/domain search: component names, modules, or feature areas
- Outcome search: similar desired outcomes or acceptance criteria
- Use
search_issues with concise queries, then issue_read to inspect suspected duplicates
- Decision:
- Clear duplicate with open status → Add comment via
add_issue_comment, stop here
- Related but distinct → Proceed, will reference in RELATED ISSUES
- No duplicates → Proceed
- Ambiguous → Proceed, will create with explicit scope and link related
Phase 2: Draft Creation
4. Generate Issue Draft
- Select format variant from references/issue-format.md based on detected type:
- Bug → Use Bug Report template
- Feature request → Use Feature Request template
- Investigation/analysis → Use Investigation/Task template
- Customer support → Use CS template
- Apply crystallized writing from references/technical-writing.md:
- No filler text
- No hedging unless uncertainty matters
- No repeated context from title in body
- Use MUST/SHOULD/MAY for acceptance criteria
- Draft the complete issue (title + body) but do not submit yet
5. Select Labels (Optional)
- Use
list_labels to fetch available labels from target repo
- Intelligently match content patterns to available labels:
- Error/bug/crash → look for
bug, Bug, type/bug variants
- Customer mention → look for
customer-support, CS, support
- New feature → look for
feature, enhancement, New-Feature
- Platform mentions → look for
mobile, web, ios, android
- Priority indicators → look for
priority/high, HIGH-PRIORITY, urgent
- Select matching labels (case-insensitive, handle variations)
- Never create labels, only use existing ones
- If no labels match or
list_labels unavailable, proceed without labels
6. Assign to Project (Optional)
- Check if target repo has existing "Backlog" project (use GitHub MCP if available)
- If "Backlog" project exists, prepare to add issue to it after creation
- Never create projects, only use existing ones
- If no "Backlog" project exists, skip project assignment
- Keep as silent/automatic behavior (P3 - never ask user)
Phase 3: Review and Confirm
7. Present Draft for User Review
CRITICAL: Before creating the issue, present the complete draft to the user:
I've prepared a draft issue for {target_repo}:
Title: [Draft title here]
Body:
[Draft body here in full]
Labels: [Selected labels or "None"]
Target Repository: {target_repo}
Duplicate Check: [Summary of duplicate search results]
Does this look correct? Reply with:
"OK" or "yes" → I will create the issue
"Edit: [specific change]" → I will revise and re-present
"Cancel" → I will discard the draft
Wait for explicit user confirmation
Do not proceed to Phase 4 without user approval
If user requests edits, revise and re-present (return to Phase 2)
Phase 4: Submission
8. Submit Issue (After User Confirmation)
- Use
issue_write with method=create using the confirmed draft
- If "Backlog" project was identified in step 6, add issue to project after creation
- If creation fails, report specific error and offer to retry or save draft
9. Confirm and Output
- Output: "Issue created: [URL as clickable link]"
- Brief summary of what was created
- Stop. Do not proceed further without new user input.
Tool Configuration
Tool Priority Hierarchy
| Priority |
Tool Source |
Detection |
Usage |
| 1st |
github-mcp-server (MCP) |
MCP tools available |
Use issue_write, search_issues, issue_read, add_issue_comment, list_labels |
| 2nd |
gh CLI |
which gh returns path |
Use gh issue create, gh issue list, gh issue view, gh issue comment |
| 3rd |
None available |
Neither MCP nor gh found |
Short-circuit: output issue content as markdown code fence in chat |
Short-Circuit Mode (No Tools)
When neither MCP nor gh CLI is available:
- Do not attempt to post the issue
- Do not ask user to install tools
- Output the fully formatted issue content in a markdown code fence in chat
- Include a note: "GitHub tools not available. Issue content prepared above — copy/paste to create manually."
- At the very end, provide a helpful hint: "Setting up
github-mcp-server or gh CLI tool would allow automatic submission of the issue."
Quality Bar
"Crystallized" means:
- No filler text
- No hedging unless uncertainty matters
- No repeated context from title in body
- No mixing business need with implementation speculation
- Reads like a clean PM/eng ticket, not a chat transcript
Error Handling
| Error |
Response |
| Issue creation fails |
Log error, inform user with specific failure reason |
| Duplicate detection ambiguous |
Note uncertainty in body, proceed with explicit scope |
| Target repo inaccessible |
Inform user which repo was targeted and why |
| Label selection fails |
Create issue without labels, note in response |
| User cancels at review |
Discard draft, confirm cancellation |
Trigger Phrases
Activate this skill when user says:
create an issue for this
file a ticket
should we open an issue
this needs a ticket
track this in GitHub
create a GitHub issue
References
1---2name: create-github-issue3description: Create GitHub issues in the appropriate -tickets repository based on source repo family. Performs duplicate detection and produces crystallized, outcome-oriented issue content. Use when a user request implies creating a ticket from code context, discussion, or identified work.4---56# Create GitHub Issue78Create well-formed GitHub issues in the correct tickets repository (`insightt-tickets` or `foundd-tickets`) based on source repository context. Follows a research-first approach to avoid duplicates and produces terse, outcome-oriented issue content.910> **Agent Directive:** Assume the [create-github-issue agent persona](agents/github-issue-agent.md) when executing this skill.1112## Execution Flow1314Follow this sequence. Each phase gates the next. Do not skip the user confirmation step.1516### Phase 1: Discovery1718#### 1. Determine Target Repository1920- Extract source repository from context (active file path, user mention, or explicit repo name)21- Apply org family detection:22 - If repo name contains "insightt" → target `rapid-recovery-agency-inc/insightt-tickets`23 - If repo name contains "foundd" → target `rapid-recovery-agency-inc/foundd-tickets`24 - If unclear → check MCP memory for org hints25 - If still unclear → ask user to confirm target repo26- Validate detected target repo:27 - Check if target repo is accessible (use GitHub MCP if available)28 - If not accessible, fall back to asking user for correct repo29 - Prevents routing to archived/legacy repos like "insightt-archive"3031#### 2. Gather Context (Evidence-First)3233- Aggressively gather evidence before asking user anything. See [references/module-research.md](references/module-research.md).34- Identify: repo name, affected system, problem, expected outcome, scope clues35- Optionally check for `.github/ISSUE_TEMPLATE/` files in target repo (low priority, non-blocking):36 - If templates exist, extract useful hints (e.g., required fields, specific labels mentioned)37 - Use as supplementary guidance only; never let templates override skill's format38 - Primary behavior: always use skill's own format from [references/issue-format.md](references/issue-format.md)39- Apply **Question Priority Discriminator** if questions needed:40 - **P0 (Critical):** Blocks creation (wrong repo, ambiguous scope) → Ask immediately41 - **P1 (High):** No business problem inferable → Ask if no evidence42 - **P2 (Medium):** Improves quality but draft usable without → Infer and draft43 - **P3 (Low):** Formatting preferences → Never ask; skill owns these44- Default: Make smart assumptions for P2/P3. Only ask P0/P1.4546#### 3. Duplicate Detection4748- Search the **target tickets repo** (not source repo) using:49 - Exact symptom search: distinctive error messages or problem descriptions50 - Feature/domain search: component names, modules, or feature areas51 - Outcome search: similar desired outcomes or acceptance criteria52- Use `search_issues` with concise queries, then `issue_read` to inspect suspected duplicates53- Decision:54 - Clear duplicate with open status → Add comment via `add_issue_comment`, stop here55 - Related but distinct → Proceed, will reference in RELATED ISSUES56 - No duplicates → Proceed57 - Ambiguous → Proceed, will create with explicit scope and link related5859### Phase 2: Draft Creation6061#### 4. Generate Issue Draft6263- Select format variant from [references/issue-format.md](references/issue-format.md) based on detected type:64 - Bug → Use Bug Report template65 - Feature request → Use Feature Request template66 - Investigation/analysis → Use Investigation/Task template67 - Customer support → Use CS template68- Apply crystallized writing from [references/technical-writing.md](references/technical-writing.md):69 - No filler text70 - No hedging unless uncertainty matters71 - No repeated context from title in body72 - Use MUST/SHOULD/MAY for acceptance criteria73- Draft the complete issue (title + body) but **do not submit yet**7475#### 5. Select Labels (Optional)7677- Use `list_labels` to fetch available labels from target repo78- Intelligently match content patterns to available labels:79 - Error/bug/crash → look for `bug`, `Bug`, `type/bug` variants80 - Customer mention → look for `customer-support`, `CS`, `support`81 - New feature → look for `feature`, `enhancement`, `New-Feature`82 - Platform mentions → look for `mobile`, `web`, `ios`, `android`83 - Priority indicators → look for `priority/high`, `HIGH-PRIORITY`, `urgent`84- Select matching labels (case-insensitive, handle variations)85- **Never create labels**, only use existing ones86- If no labels match or `list_labels` unavailable, proceed without labels8788#### 6. Assign to Project (Optional)8990- Check if target repo has existing "Backlog" project (use GitHub MCP if available)91- If "Backlog" project exists, prepare to add issue to it after creation92- **Never create projects**, only use existing ones93- If no "Backlog" project exists, skip project assignment94- Keep as silent/automatic behavior (P3 - never ask user)9596### Phase 3: Review and Confirm9798#### 7. Present Draft for User Review99100**CRITICAL:** Before creating the issue, present the complete draft to the user:101102I've prepared a draft issue for {target_repo}:103104______________________________________________________________________105106**Title:** [Draft title here]107108**Body:**109[Draft body here in full]110111**Labels:** [Selected labels or "None"]112113______________________________________________________________________114115**Target Repository:** {target_repo}116**Duplicate Check:** [Summary of duplicate search results]117118Does this look correct? Reply with:119120- **"OK"** or **"yes"** → I will create the issue121122- **"Edit: [specific change]"** → I will revise and re-present123124- **"Cancel"** → I will discard the draft125126- Wait for explicit user confirmation127128- Do not proceed to Phase 4 without user approval129130- If user requests edits, revise and re-present (return to Phase 2)131132### Phase 4: Submission133134#### 8. Submit Issue (After User Confirmation)135136- Use `issue_write` with `method=create` using the confirmed draft137- If "Backlog" project was identified in step 6, add issue to project after creation138- If creation fails, report specific error and offer to retry or save draft139140#### 9. Confirm and Output141142- Output: "Issue created: [URL as clickable link]"143- Brief summary of what was created144- Stop. Do not proceed further without new user input.145146## Tool Configuration147148### Tool Priority Hierarchy149150| Priority | Tool Source | Detection | Usage |151| -------- | ------------------------- | -------------------------- | ------------------------------------------------------------------------------------ |152| 1st | `github-mcp-server` (MCP) | MCP tools available | Use `issue_write`, `search_issues`, `issue_read`, `add_issue_comment`, `list_labels` |153| 2nd | `gh` CLI | `which gh` returns path | Use `gh issue create`, `gh issue list`, `gh issue view`, `gh issue comment` |154| 3rd | None available | Neither MCP nor `gh` found | Short-circuit: output issue content as markdown code fence in chat |155156### Short-Circuit Mode (No Tools)157158When neither MCP nor `gh` CLI is available:1591601. Do not attempt to post the issue1611. Do not ask user to install tools1621. Output the fully formatted issue content in a markdown code fence in chat1631. Include a note: "GitHub tools not available. Issue content prepared above — copy/paste to create manually."1641. At the very end, provide a helpful hint: "Setting up `github-mcp-server` or `gh` CLI tool would allow automatic submission of the issue."165166## Quality Bar167168"Crystallized" means:169170- No filler text171- No hedging unless uncertainty matters172- No repeated context from title in body173- No mixing business need with implementation speculation174- Reads like a clean PM/eng ticket, not a chat transcript175176## Error Handling177178| Error | Response |179| ----------------------------- | ----------------------------------------------------- |180| Issue creation fails | Log error, inform user with specific failure reason |181| Duplicate detection ambiguous | Note uncertainty in body, proceed with explicit scope |182| Target repo inaccessible | Inform user which repo was targeted and why |183| Label selection fails | Create issue without labels, note in response |184| User cancels at review | Discard draft, confirm cancellation |185186## Trigger Phrases187188Activate this skill when user says:189190- `create an issue for this`191- `file a ticket`192- `should we open an issue`193- `this needs a ticket`194- `track this in GitHub`195- `create a GitHub issue`196197## References198199- [Issue Format Specification](references/issue-format.md)200- [Technical Writing Standard](references/technical-writing.md)201- [Module Research Methodology](references/module-research.md)202- [Agent Skills Specification](https://agentskills.io/specification)203- [GitHub MCP Server](https://github.com/github/github-mcp-server)