create-issue
Create Issue
Draft a focused title and body for a GitHub issue, then file it. Bug reports state reproduction steps and observed versus expected behavior.
Step 1: Gather Context
Determine what the issue is about from the conversation. When the subject is ambiguous, use request_user_input to settle it before drafting.
List the repo's issue templates, read its labels, and search for an existing issue covering the same thing:
ls .github/ISSUE_TEMPLATE/ 2>/dev/null
gh label list --limit 100
gh issue list --search "<keywords>" --state all
When the issue goes to a repository other than the checkout, replace the ls with gh api repos/<owner>/<repo>/contents/.github/ISSUE_TEMPLATE, read the files it lists through the same API, and pass --repo <owner>/<repo> to the label list and the duplicate search.
When the target repository, the checkout included, has no .github/ISSUE_TEMPLATE folder of its own, list its owner's .github repository with gh api repos/<owner>/.github/contents/.github/ISSUE_TEMPLATE, whose files GitHub applies to a repository without that folder.