| name | github-issue-create |
| description | Create a GitHub issue with an auto-generated description. Use when the user asks to open an issue for a bug, feature request, or task. |
| allowed-tools | Bash(git status:*), Bash(git log:*), Bash(git config:*), Bash(gh issue:*), Bash(gh repo:*), Bash(gh auth:*) |
github-issue-create
Create a GitHub issue using gh issue create with an auto-generated title and description.
Behavior
-
Check git/gh user consistency:
- Run
git config user.name to get the local git identity
- Run
gh auth status to identify the active GitHub user
- If
gh auth status shows X Failed to log in ... (keyring) for all accounts (even though the user has authenticated):
- This is a known keyring issue in some environments — treat it as a keyring-unavailable environment
- Do NOT stop; proceed to the Keyring-unavailable fallback section below
- If they differ:
- If acting autonomously: run
gh auth switch --user "$(git config user.name)"
- If switch succeeds: continue
- If switch fails: defer this skill. After all other work is done, report to the user: the git/gh user mismatch and that the switch failed
- If not acting autonomously: stop the skill and ask the user to resolve the mismatch before continuing
-
Review the context provided by the user (bug description, feature request, task details, etc.)
-
Inspect the repository to understand context if needed:
git log --oneline -10 — recent commits for context
gh issue list — existing issues to avoid duplicates
-
Scan for sensitive information before creating (see Secret Scan below)
-
Generate an appropriate title and description based on the issue type
-
Create the issue using gh issue create
Issue Types and Labels
Select appropriate labels based on the issue type:
bug — Something isn't working correctly
enhancement — New feature or improvement request
documentation — Documentation improvements
question — Further information is requested
chore — Maintenance or internal tasks
Issue Description Format
The issue description should be written in English and follow this structure:
Bug Report
## Description
Brief description of the bug.
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What should happen.
## Actual Behavior
What actually happens.
## Environment
- OS / version information if relevant
Feature Request
## Summary
Brief description of the requested feature (1-3 bullet points).
## Motivation
Why this feature is needed or what problem it solves.
## Proposed Solution
Description of the proposed implementation or behavior.
Task / Chore
## Summary
Brief description of the task.
## Details
- Specific actions or changes needed
- Each item as a separate bullet point
Secret Scan
Before creating the issue, check the content (title, description, any referenced code snippets) for:
- API keys and tokens: strings starting with
ghp_, gho_, AKIA, sk-, xox, or matching -----BEGIN.*PRIVATE KEY
- Variables with sensitive names holding a value: patterns like
API_KEY=, _SECRET=, _TOKEN=, PASSWORD=
- Hardcoded absolute home paths:
/Users/<name>/ or /home/<name>/ (prefer ~)
- Personal or organizational proper nouns that could identify specific individuals or organizations
If any of the above are found, do not create the issue. Use AskUserQuestion to present these options:
- "Create as-is" — proceed despite the finding
- "Fix then create" — cancel so the user can fix the issue first
- "Cancel" — abort without further action
Only proceed if the user selects "Create as-is", or if nothing suspicious was found.
Does Not
- Create an issue if the title or description is empty or unclear — ask the user for more details
- Create duplicate issues — check existing issues first
- Add assignees or milestones without explicit user request
Keyring-unavailable fallback
When gh auth status shows keyring errors for all accounts (the environment cannot use the system keyring), gh issue create will also fail. Use this fallback instead:
- Write the issue body to a file:
- Use
~/tmp/ if it exists, otherwise use /tmp/
- Filename:
issue-body-<slug>.md where <slug> is a short kebab-case summary of the issue title (e.g. issue-body-fix-login-error.md)
- Write the full issue body (the markdown content that would be passed to
--body) to that file
- Tell the user the issue could not be created automatically due to the keyring issue, and provide the exact command to run manually:
gh issue create --title "<title>" --body-file <path-to-file> --label "<label>"
- Also mention: if
gh itself is not authenticated, they may need to run gh auth login first
Notes
- If uncertain about the issue title or description, ask the user before creating
- Use the issue type and context to select appropriate labels
- Do NOT add signatures or co-author tags to issue descriptions
- Neovim-related issues must use 'Neovim: ' prefix in the title (e.g.,
Neovim: Fix autocmd issue)