Gh create pr

From ComeOnOliver/skillshub · View interactive version

Gh create pr is an AI agent skill from the GitHub repository ComeOnOliver/skillshub. 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

How to use this skill

Skill file

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. Check if the current branch has been pushed to remote. If not, push it first:

```bash

git push -u <remote> <head-branch>

```

  1. Determine the base branch:
  1. Create a temp file and write the PR body:
  1. Preview the temp file content. Show the file path (e.g., /tmp/gh-pr-body-XXXXXX.md) and ask for explicit confirmation before creating. Skip this step if the user explicitly indicates no preview/confirmation is needed (for example, automation workflows).
  2. After confirmation, create the PR:

```bash

gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"

```

  1. Clean up the temp file: rm -f "$pr_body_file"
  2. Report the created PR URL and summarize title/base/head and any required follow-up.

Constraints

| Change type | Release note | Docs [x] |

|---|---|---|

| New user-facing feature / setting / UI | Describe the change | ✅ |

| Bug fix visible to users | Describe the fix | ✅ if behavior changed |

| Behavior change / default value change | Describe + action required | ✅ |

| Security fix in a user-facing dependency | Describe the fix | ✅ if usage changed |

| CI / GitHub Actions changes | NONE | ❌ |

| Internal refactoring (user cannot tell) | NONE | ❌ |

| Dev / build tooling changes | NONE | ❌ |

| Dev-only dependency bump | NONE | ❌ |

| Test-only / code style changes | NONE | ❌ |

Command Pattern

# 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"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.