submit-pr

Installation
SKILL.md

Submit PR

Overview

Open a PR from the current fork branch to the upstream repository using gh, ensuring the branch is pushed and the base branch is correct.

Workflow

  1. Confirm the working tree is clean and commits exist. If there are uncommitted changes, run the commit workflow first.
  2. Identify the upstream repo and default branch:
    • gh repo view --json parent -q .parent.nameWithOwner (must be non-null for forks)
    • gh repo view <upstream> --json defaultBranchRef -q .defaultBranchRef.name
  3. Ensure an upstream remote exists; add if missing:
    • git remote add upstream https://github.com/<upstream>.git
  4. Push the current branch to the fork:
    • git push -u origin <branch>
  5. Create the PR targeting the upstream repo:
    • gh pr create --repo <upstream> --base <default-branch> --head <fork-owner>:<branch> --title "<subject>" --body "<body>"
  6. Confirm the PR URL with gh pr view --repo <upstream> --json url -q .url and report it.
Installs
1
First Seen
Apr 6, 2026