/pr — Ship It
One command to go from working changes to a reviewed PR. Handles commit, push, PR creation, and Gemini review.
Usage
/pr — commit all staged/unstaged changes, push, create PR, run Gemini review
/pr --no-review — skip the Gemini review step
/pr --draft — create as draft PR
/pr fix the auth redirect bug — use the provided text as context for the commit message and PR description
Steps
1. Safety Check
Run git branch --show-current. If on main or master:
- STOP immediately
- Tell the user: "You're on main. Create a feature branch first:
git checkout -b feature/your-feature"
- Do NOT proceed
2. Assess Changes
Run these in parallel:
git status — see what's changed (never use -uall flag)
git diff — see unstaged changes
git diff --cached — see staged changes
git log main..HEAD --oneline — see commits already on this branch
3. Commit (if there are uncommitted changes)
- Stage relevant files (prefer specific files over
git add .)
- Do NOT stage .env files, credentials, or secrets — warn if found
- Write a conventional commit message (feat:, fix:, chore:, etc.) based on the actual changes
- Do NOT add Co-Authored-By lines
- If no uncommitted changes exist, skip to step 4
4. Push
- Push the branch with
-u flag to set upstream tracking
- If the branch has no remote yet, this creates it
5. Create PR
- Use
gh pr create with:
- A concise title (under 70 chars) using the conventional commit prefix
- A body with:
## Summary — 1-3 bullet points describing what changed and why
## Test plan — how to verify the changes work
- If user provided context text with the command, use it to inform the title and description
- If
--draft flag was passed, add --draft to the gh command
Use a HEREDOC for the body to preserve formatting:
gh pr create --title "feat: title here" --body "$(cat <<'EOF'
## Summary
- bullet points here
## Test plan
- [ ] verification steps here
EOF
)"
6. Gemini Code Review (unless --no-review)
Check if gemini CLI is available. If yes:
- Get the diff:
git diff main...HEAD
- Run Gemini review:
gemini -p "Review this pull request diff for bugs, security issues, TypeScript best practices, and any issues. Be concise — list only actionable findings categorized as Critical / Warning / Suggestion: $(git diff main...HEAD)"
- Summarize findings to the user
If gemini is not available, skip and note that Gemini CLI is not installed.
7. Fix Critical Issues (if any)
If Gemini found Critical issues:
- Ask the user if they want to fix them now
- If yes: fix, commit with
fix: address code review feedback, push, and note the PR will update automatically
8. Report
Display:
- PR URL (from gh pr create output)
- Branch name
- Number of commits included
- Gemini review summary (if run)
Source: kabirdos/claude-toolkit — distributed by TomeVault.
1---2name: pr-103description: Commit, push, create PR, and optionally run Gemini code review — the full ship-it workflow in one command Use when this capability is needed.4---56# /pr — Ship It78One command to go from working changes to a reviewed PR. Handles commit, push, PR creation, and Gemini review.910## Usage1112- `/pr` — commit all staged/unstaged changes, push, create PR, run Gemini review13- `/pr --no-review` — skip the Gemini review step14- `/pr --draft` — create as draft PR15- `/pr fix the auth redirect bug` — use the provided text as context for the commit message and PR description1617## Steps1819### 1. Safety Check2021Run `git branch --show-current`. If on `main` or `master`:2223- STOP immediately24- Tell the user: "You're on main. Create a feature branch first: `git checkout -b feature/your-feature`"25- Do NOT proceed2627### 2. Assess Changes2829Run these in parallel:3031- `git status` — see what's changed (never use -uall flag)32- `git diff` — see unstaged changes33- `git diff --cached` — see staged changes34- `git log main..HEAD --oneline` — see commits already on this branch3536### 3. Commit (if there are uncommitted changes)3738- Stage relevant files (prefer specific files over `git add .`)39- Do NOT stage .env files, credentials, or secrets — warn if found40- Write a conventional commit message (feat:, fix:, chore:, etc.) based on the actual changes41- Do NOT add Co-Authored-By lines42- If no uncommitted changes exist, skip to step 44344### 4. Push4546- Push the branch with `-u` flag to set upstream tracking47- If the branch has no remote yet, this creates it4849### 5. Create PR5051- Use `gh pr create` with:52 - A concise title (under 70 chars) using the conventional commit prefix53 - A body with:54 - `## Summary` — 1-3 bullet points describing what changed and why55 - `## Test plan` — how to verify the changes work56 - If user provided context text with the command, use it to inform the title and description57 - If `--draft` flag was passed, add `--draft` to the gh command5859Use a HEREDOC for the body to preserve formatting:6061```bash62gh pr create --title "feat: title here" --body "$(cat <<'EOF'63## Summary64- bullet points here6566## Test plan67- [ ] verification steps here68EOF69)"70```7172### 6. Gemini Code Review (unless --no-review)7374Check if `gemini` CLI is available. If yes:7576- Get the diff: `git diff main...HEAD`77- Run Gemini review: `gemini -p "Review this pull request diff for bugs, security issues, TypeScript best practices, and any issues. Be concise — list only actionable findings categorized as Critical / Warning / Suggestion: $(git diff main...HEAD)"`78- Summarize findings to the user7980If `gemini` is not available, skip and note that Gemini CLI is not installed.8182### 7. Fix Critical Issues (if any)8384If Gemini found Critical issues:8586- Ask the user if they want to fix them now87- If yes: fix, commit with `fix: address code review feedback`, push, and note the PR will update automatically8889### 8. Report9091Display:9293- PR URL (from gh pr create output)94- Branch name95- Number of commits included96- Gemini review summary (if run)9798---99> Source: [kabirdos/claude-toolkit](https://github.com/kabirdos/claude-toolkit) — distributed by [TomeVault](https://tomevault.io).100<!-- tomevault:4.0:skill_md:2026-05-23 -->