GitHub Issue Writer
by @djc00p
Draft well-structured GitHub issues from a description, error, or idea. Supports bug reports, feature requests, enhancements, and tasks. Optionally submits d...
clawhub install gh-issue-writerπ About This Skill
name: gh-issue-writer description: Draft well-structured GitHub issues from a description, error, or idea. Supports bug reports, feature requests, enhancements, and tasks. Optionally submits directly via the GitHub CLI or API. Use when someone says "write a GitHub issue", "open an issue for", "file a bug", "create a feature request", or describes a problem that needs to be tracked. metadata: {"clawdbot":{"emoji":"π","requires":{"bins":["gh","git","curl"]},"primaryEnv":"GH_TOKEN","os":["linux","darwin","win32"]}}
gh-issue-writer
Draft clear, actionable GitHub issues from a brief description, error message, or idea. Covers bug reports, feature requests, enhancements, and tasks.
Step 1 β Understand the Input
Ask (or infer from context):
1. What type of issue? Bug | Feature Request | Enhancement | Task | Question
2. What repo? (detect from git remote get-url origin if in a git dir, otherwise ask)
3. What happened / what's wanted? (the raw description, error, or idea)
4. Optional: Labels, assignee, milestone, environment details
If the user gives you enough context, proceed without asking β draft and show for confirmation.
Step 2 β Draft the Issue
Use the appropriate template below. Fill every field; omit sections only if genuinely not applicable.
Bug Report
## Description
Steps to Reproduce
1.
2.
3.Expected Behavior
Actual Behavior
Environment
OS:
Browser / Runtime / Version:
Relevant config or dependencies: Logs / Screenshots
Additional Context
Feature Request
## Problem / Motivation
Proposed Solution
Alternatives Considered
Acceptance Criteria
[ ]
[ ] Additional Context
Enhancement (improvement to existing behavior)
## Current Behavior
Desired Behavior
Why This Matters
Suggested Implementation
Task / Chore
## What needs to be done
Why / Context
Definition of Done
[ ]
[ ]
Step 3 β Write a Strong Title
Title format by type:
| Type | Pattern | Example |
|------|---------|---------|
| Bug | Bug: | Bug: 500 on POST /login when payload missing field |
| Feature | Feature: | Feature: CSV export for admin reports |
| Enhancement | Enhance: | Enhance: error messages β add field-level detail |
| Task | Task: | Task: upgrade Stripe SDK to v16 |
Rules:
Step 4 β Suggest Labels & Metadata
Recommend labels based on type and content:
| Signal | Suggested Labels |
|--------|-----------------|
| Bug | bug, needs-repro |
| Feature | enhancement, feature-request |
| High impact / blocking | priority:high |
| Needs more info | needs-info |
| Good for contributors | good first issue |
| Security | security |
| Performance | performance |
| Docs | documentation |
Also suggest:
Step 5 β Present for Review
Show the complete draft:
Title: Type: Bug / Feature / Enhancement / Task
Suggested labels: bug, priority:high
Suggested assignee: (if known)
Ask: "Does this look right? I can adjust the title, add details, or submit it directly."
Step 6 β Optional: Submit
> Prerequisites for submission:
> - gh CLI (authenticated via gh auth login) β preferred path
> - GH_TOKEN env var β required for the curl API fallback
> - git β used to detect the repo from git remote get-url origin
>
> Drafting (Steps 1β5) works without any of these.
If the user says "submit", "create it", "go ahead", or similar:
Via GitHub CLI (preferred)
gh issue create \
--repo owner/repo \
--title "" \
--body " " \
--label "bug,priority:high" \
--assignee "@me"
Via GitHub API (fallback if gh isn't available)
curl -s -X POST \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/{owner}/{repo}/issues \
-d '{
"title": "",
"body": " ",
"labels": ["bug"],
"assignees": []
}'
On success, output the issue URL. On error, show the response and offer to retry.
Quality Checklist
Before presenting the draft, verify:
Tips for Better Issues
Do:
#Don't:
See Also
.github/ISSUE_TEMPLATE/ in your repo