| name | git-upstream-pr |
| description | Submit PRs to upstream repos from a fork — commit selection, squashing, cross-fork creation. Use when contributing changes upstream or cherry-picking fork commits. |
| args | [--commits sha1,sha2] [--branch name] [--upstream owner/repo] [--draft] [--dry-run] |
| allowed-tools | Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git remote *), Bash(git fetch *), Bash(git switch *), Bash(git cherry-pick *), Bash(git reset *), Bash(git commit *), Bash(git push *), Bash(git stash *), Bash(git rev-list *), Bash(git rev-parse *), Bash(git branch *), Bash(gh pr *), Bash(gh repo *), Bash(gh auth *), AskUserQuestion, Read, Grep, Glob, TodoWrite |
| argument-hint | --commits abc123,def456 or --branch feat/my-upstream-pr |
| disable-model-invocation | true |
| created | "2026-03-02T00:00:00.000Z" |
| modified | "2026-06-18T00:00:00.000Z" |
| reviewed | "2026-03-02T00:00:00.000Z" |
/git:upstream-pr
Submit clean, atomic PRs to upstream repositories from fork work.
When to Use This Skill
| Use this skill when... | Use something else instead when... |
|---|
| Contributing changes back to the upstream repo | Committing to your own fork/repo → /git:commit |
| Cherry-picking fork commits for upstream PR (single or multi-commit, squashing) | Creating a PR within the same repo → /git:pr |
| Fork and upstream are roughly aligned | Fork has substantially diverged from upstream → /git:upstream-pr-diverged (patch-id eligibility, re-derive fallback, scrubbing) |
| Need a clean branch based on upstream/main | Working on a branch already tracking upstream |
Context
- Current branch: !
git branch --show-current
- Git status: !
git status --porcelain=v2 --branch
- Remotes: !
git remote -v
- Has upstream: !
git remote -v
- Origin URL: !
git remote -v
- Upstream URL: !
git remote -v
- Recent commits: !
git log --oneline --max-count=20
- Stash list: !
git stash list
Parameters
Parse these from $ARGUMENTS:
| Parameter | Required | Description |
|---|
--commits sha1,sha2,... | No | Comma-separated commit SHAs to cherry-pick (interactive selection if omitted) |
--branch name | No | Name for the upstream PR branch (auto-generated if omitted) |
--upstream owner/repo | No | Override upstream repo (detected from remote if omitted) |
--draft | No | Create PR as draft |
--dry-run | No | Show what would happen without making changes |
Execution
Execute this fork-to-upstream PR workflow: