git-plugin/skills/git-upstream-pr/SKILL.md
Submit PRs to upstream repos from a fork — commit selection, squashing, cross-fork creation. Use when contributing changes upstream or cherry-picking fork commits.
npx skillsauth add laurigates/claude-plugins git-upstream-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Submit clean, atomic PRs to upstream repositories from fork work.
| 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 |
git branch --show-currentgit status --porcelain=v2 --branchgit remote -vgit remote get-url upstreamgit remote get-url origingit remote get-url upstreamgit log --oneline --max-count=20git stash listParse 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 |
Execute this fork-to-upstream PR workflow:
git rev-parse --git-dirupstream remote exists (from context)upstream remote:
gh repo view --json parent -q '.parent.nameWithOwner'git remote add upstream https://github.com/<owner/repo>.gitgit fetch upstreamgit stash push -m "upstream-pr: WIP before upstream PR"Report the fork's divergence from upstream:
Fork status:
Upstream: <upstream-repo>
Behind upstream/main: N commits
Ahead of upstream/main: M commits
If --dry-run is set, also show which commits would be selected and stop here.
If --commits provided:
git rev-parse --verify <sha>If --commits not provided:
git log --oneline --format='%h %s (%cr)' upstream/main..HEAD
--branch not provided:
feat(auth): add OAuth -> feat/auth-add-oauth)upstream-pr/<date>git switch -c <branch-name> upstream/main
git cherry-pick <sha1> <sha2> ...
git cherry-pick --continuegit reset --soft upstream/main
git commit -m "<conventional commit message>"
git push -u origin <branch-name>
If --dry-run, show the command without executing.
--upstream or detected remote)origin remote URL)gh pr create \
--repo <upstream-owner/upstream-repo> \
--base main \
--head <fork-owner>:<branch-name> \
--title "<conventional commit title>" \
--body "<PR description>"
Add --draft if the flag was provided.git switch <original-branch>
git stash pop
Upstream PR created:
PR: <url>
Branch: <branch-name>
Commits: N cherry-picked, squashed into 1
Original branch restored: <branch>
| Error | Recovery |
|-------|----------|
| Cherry-pick conflict | Show conflicted files, reference git-conflicts skill |
| Push rejected | Check if branch already exists on fork; suggest --branch override |
| No upstream remote | Auto-detect from gh repo view --json parent or ask user |
| Upstream/main not found | Try upstream/master; ask user for correct branch name |
| No commits ahead of upstream | Report "Nothing to contribute" and exit |
| Context | Command |
|---------|---------|
| Divergence check | git rev-list --left-right --count upstream/main...HEAD |
| Commits ahead | git log --oneline --format='%h %s' upstream/main..HEAD |
| Validate SHA | git rev-parse --verify --short <sha> |
| Fork owner | git remote get-url origin \| sed -E 's#.*github.com[:/]##; s#\.git$##; s#/.*##' |
| Upstream repo | git remote get-url upstream \| sed -E 's#.*github.com[:/]##; s#\.git$##' |
| Cross-fork PR | gh pr create --repo <upstream> --head <fork-owner>:<branch> |
tools
Scaffold a new ComfyUI custom-node repo (pyproject, CI, release-please, vitest+pytest, JS extension skeleton) in the picker/gesture vein. Use when bootstrapping or init-ing a comfyui node pack.
tools
Orchestrate a ComfyUI node pack from idea to registry: scaffold, create + seed the repo, open the gitops adoption PR. Use when releasing or spinning up a new comfyui node pack.
testing
macOS EndpointSecurity/EDR high CPU & battery drain. Use when Kandji ESF / XProtect pegs a core; trace the exec storm via powermetrics + eslogger.
development
odiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.