# Gh Create Pr

> Create or update GitHub pull requests using the repository-required workflow and template compliance. Use when asked to create/open/update a PR so the assistant reads `.github/pull_request_template.md`, fills every template section, preserves markdown structure exactly, and marks missing data as N/A or None instead of skipping sections.

- Skill: `wike-chi/gh-create-pr` (Agent Skill)
- Install (CLI): `npx skillmds@latest add wike-chi/gh-create-pr`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wike-chi/gh-create-pr/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: wike-chi (https://skillmd.com/u/wike-chi)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wike-chi/gh-create-pr

---


# GitHub PR Creation

## Workflow

1. Read `.github/pull_request_template.md` before drafting the PR body.
2. Collect PR context from the current branch (base/head, scope, linked issues, testing status, breaking changes, release note content).
3. Draft the PR body using the template structure exactly:
   - Keep section order and headings.
   - Keep checkbox and code block formatting.
   - Fill every section; if not applicable, write `N/A` or `None`.
4. Present the full Markdown PR body in chat for review before creating the PR.
5. Ask for explicit confirmation to create the PR with that body.
6. After confirmation, create the PR with `gh pr create --body-file` using a unique temp file path.
7. Report the created PR URL and summarize title/base/head and any required follow-up.

## Constraints

- Never skip template sections.
- Never rewrite the template format.
- Keep content concise and specific to the current change set.
- PR title and body must be written in English.
- Never create the PR before showing the full final body to the user.
- Never rely on command permission prompts as PR body preview.

## Command Pattern

```bash
# read template
cat .github/pull_request_template.md

# show this full Markdown body in chat first
pr_body_file="$(mktemp /tmp/gh-pr-body-XXXXXX).md"
cat > "$pr_body_file" <<'EOF'
...filled template body...
EOF

# run only after explicit user confirmation
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
rm -f "$pr_body_file"
```

