# Creating Pr From Branch

> Create a pull request from the current branch. Analyzes commits, generates title+body from PR template, pauses for approval, then pushes and creates PR. Use after committing changes.

- **Type:** Skill
- **Install:** `agentstack add skill-qte77-claude-code-plugins-creating-pr-from-branch`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [qte77](https://agentstack.voostack.com/s/qte77)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [qte77](https://github.com/qte77)
- **Source:** https://github.com/qte77/claude-code-plugins/tree/main/plugins/commit-helper/skills/creating-pr-from-branch
- **Website:** https://qte77.github.io/claude-code-plugins/

## Install

```sh
agentstack add skill-qte77-claude-code-plugins-creating-pr-from-branch
```

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

## About

# Create PR from Current Branch

**Base branch**: $ARGUMENTS (default: `main`)

## Step 1: Analyze Branch

Run using the Bash tool:

- `git branch --show-current` — current branch name
- `git log --oneline ..HEAD` — commits to include
- `git diff --stat ..HEAD` — overall diff stats
- `git remote -v` — verify remote exists

If no commits ahead of base, stop and inform the user.

## Step 2: Generate PR Title and Body

**Title**: Derive from commits using conventional commit format.
- Single commit: use commit subject as-is
- Multiple commits: synthesize a summary title (`type[(scope)]: description`)
- Keep under 72 characters

**Body**: Check for `.github/pull_request_template.md`. If it exists, populate
its sections. If not, use this minimal format:

```markdown
## Summary

## Commits

```

**Body guidelines:**
- Fill template checkboxes where applicable (check items that are done)
- Include `Closes #N` if the branch name contains an issue number
- Keep it concise — the diff speaks for itself

## Step 3: Pause for Approval

Present the title and body. Ask the user:

- **Approve**: "yes", "y", "create", "go ahead"
- **Edit**: Provide changes to title or body
- **Cancel**: "no", "cancel", "stop"

## Step 4: Push and Create PR

Once approved:

```bash
# Push branch (set upstream)
git push -u origin 

# Create PR
# In Codespaces: override token if GH_PAT is needed for cross-repo
gh pr create --base  --title "" --body "$(cat 
EOF
)"
```

**Auth handling**: If `gh pr create` fails with 403/422, retry with
`GITHUB_TOKEN="" GH_TOKEN="${GH_PAT}"` prefix (Codespaces token override).

After creation, output the PR URL.

## Step 5: Post-Create

- `gh pr view --web` — open in browser (optional, ask user)

## Source & license

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

- **Author:** [qte77](https://github.com/qte77)
- **Source:** [qte77/claude-code-plugins](https://github.com/qte77/claude-code-plugins)
- **License:** Apache-2.0
- **Homepage:** https://qte77.github.io/claude-code-plugins/

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-qte77-claude-code-plugins-creating-pr-from-branch
- Seller: https://agentstack.voostack.com/s/qte77
- 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%.
