From create-issue
Create a GitHub issue using the gh CLI with tmpfile-based body content to avoid permission prompts from large multiline Bash arguments. Use when the user says "create issue", "create a GitHub issue", "file an issue", "open an issue", "new issue", "report a bug", "request a feature", or asks to create an issue on a GitHub repository. Requires the gh CLI to be installed and authenticated.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-issue:create-issueThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create GitHub issues cleanly by writing the body to a tmpfile and passing it via `--body-file`.
Create GitHub issues cleanly by writing the body to a tmpfile and passing it via --body-file.
When creating GitHub issues, passing a large multiline --body string directly to gh issue create in a Bash command triggers Claude Code permission prompts because the command appears complex. This skill avoids that by using the Write tool to create a temporary file containing the issue body, then passing a short, simple gh issue create --body-file command to Bash.
Determine the issue title, body, labels, and assignees from the user's request. If the user's request is vague, ask clarifying questions. At minimum, you need:
Optional fields:
bug, enhancement, documentation)If the user specifies a repository (e.g., "file an issue on org/repo"), use the --repo flag. Otherwise, the issue will be created in the current repository.
First, generate a unique temporary file path using mktemp:
mktemp /tmp/gh-issue-body-XXXXXX
# Returns a unique path, e.g.: /tmp/gh-issue-body-a1b2c3
Then use the Write tool to write the full issue body in Markdown format to the exact path returned by mktemp. In the examples below, TMPFILE is a placeholder for that path.
This is the critical step that avoids permission prompts: the Write tool handles multiline content natively, keeping the subsequent Bash command short and simple.
Run a single, short gh issue create command using the tmpfile path from step 3:
gh issue create --title "Issue title here" --body-file TMPFILE
Add optional flags as needed:
gh issue create --title "Issue title here" --body-file TMPFILE --label "bug" --label "enhancement" --assignee "@me"
For a different repository:
gh issue create --repo owner/repo --title "Issue title here" --body-file TMPFILE
Always remove the tmpfile after the issue creation attempt, regardless of whether it succeeded or failed. Issue the cleanup as a separate Bash tool call, not chained onto gh issue create:
rm -f TMPFILE
Each Bash tool call runs unconditionally and the prior call's exit code is preserved by the harness, so a separate call cleans up after both successful and failed issue creations without any shell-level wrapping. Never combine the two with ; followed by an exit-code preservation idiom such as gh issue create ...; status=$?; rm -f TMPFILE; exit $status. In zsh (the macOS default shell), status is a read-only built-in alias for $?, so the assignment fails with read-only variable: status and falsely reports a successful issue creation as failed. See plugins/use-git/skills/use-git/references/tmpfile-pattern.md for the full rationale.
Share the issue URL returned by gh issue create with the user.
gh is not installed or not authenticated, instruct the user to install it from https://cli.github.com/ and run gh auth login--repo flagrm -f), even if the gh command failsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub cboone/agent-harness-plugins --plugin create-issue