# Gh Create Pr

> Create a GitHub PR from the current branch. Use when the user asks to "create a PR", "open a pull request", or "submit a PR".

- **Type:** Skill
- **Install:** `agentstack add skill-gjoranv-claude-plan-skills-gh-create-pr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [gjoranv](https://agentstack.voostack.com/s/gjoranv)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [gjoranv](https://github.com/gjoranv)
- **Source:** https://github.com/gjoranv/claude-plan-skills/tree/main/gh-create-pr

## Install

```sh
agentstack add skill-gjoranv-claude-plan-skills-gh-create-pr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Create GitHub pull request(s) from the current branch. If this session touched multiple repos (check conversation context, plan issue, or ask the user), create a PR in each repo. Run steps 1-8 for each repo in sequence.

1. **Check state**: Run `git status` and `git branch --show-current`.
2. **Prepare a branch**:
   - Always fetch the latest base branch (main/master) first.
   - If the current branch is main/master, create a new branch off the freshly fetched base. Pick a short, descriptive branch name from the conversation context (e.g. `resource-tags-docs`). Move any uncommitted changes to the new branch.
   - Otherwise, rebase the current branch onto the freshly fetched base. If there are conflicts, stop and ask the user to resolve them.
3. **Handle uncommitted changes**: If there are uncommitted changes on the (now non-master) branch, ask the user if they want to commit first. Do not proceed until the working tree is clean.
4. **Push the branch**: Push the current branch to remote with `git push -u origin`.
5. **Gather context**: Read the git log for all commits on this branch since it diverged from the base branch. If a plan issue was referenced in this conversation, read it for additional context. Check for a PR template at `.github/pull_request_template.md` or `.github/PULL_REQUEST_TEMPLATE.md` in the repo. If one exists, use it as the structure for the PR description.
6. **Create the PR**: Use `gh pr create` with `--title`, `--body`, and `--web` (opens the browser with the PR pre-filled for editing). Do not use `--edit` (opens a terminal editor, unreliable).
   - A concise title (under 70 characters)
   - Body: for trivial PRs (single commit, simple change), a few plain-text sentences covering what, why, and how it was tested. For non-trivial PRs (multi-commit, multi-file, or complex changes), use three sections: `## What`, `## Why`, `## Tested`. Use bullet lists when listing multiple changes or test steps. Keep each section concise; reviewers read the diff for details.
   - Link to the plan issue only if it is in the same repo as the PR. Do not link to plan issues in other repos.
   - Do not set reviewers or labels.
   - **Footer**: Check for `~/.claude/skills/gh-create-pr/pr-footer.md`. If it exists, append its content to the PR body, separated by `---`. Replace `{{model}}` with the full model slug including version and variant (e.g. "Claude Opus 4.8", "GPT-5.6 Sol").
7. **Post-creation**: After the PR is created:
   - If creating PRs across multiple repos, cross-link them in each PR description (e.g. "Related: owner/other-repo#N"). Do NOT cross-link from a public repo to a non-public repo.

Rules:
- Never create a PR without pushing the branch first.
- Keep the description concise. No empty boilerplate sections.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [gjoranv](https://github.com/gjoranv)
- **Source:** [gjoranv/claude-plan-skills](https://github.com/gjoranv/claude-plan-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-gjoranv-claude-plan-skills-gh-create-pr
- Seller: https://agentstack.voostack.com/s/gjoranv
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
