Commits changes, pushes to a feature branch, and opens a GitHub PR for review. Handles branch context detection, test running, and conventional commits.
Ships in caliper. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Commit, push, and create PR — ready for external review.
Core principle: Never commit directly to main. All changes go through feature branches and PRs.
Workflow stops at PR creation. After bots and reviewers post feedback, use /pr-review to address it, then /pr-merge to merge and clean up.
git status && git diff --stat && git log --oneline -5
A clean tree alone isn't a reason to stop: a fully committed, unpushed branch (orchestrate hands one over) still needs a push and a PR. Step 2 decides.
git branch --show-current
git symbolic-ref --short refs/remotes/origin/HEAD
Line 1 is CURRENT_BRANCH; line 2 is origin/<DEFAULT_BRANCH>. If line 2 errors (the clone has no origin/HEAD), run git remote set-head origin --auto and repeat it. Plain calls, read and carried forward, because the worktree-isolation guard refuses tests on $(git …) results (See: skills/design/worktree-isolation.md).
Use <DEFAULT_BRANCH> (never hardcode main) for all subsequent steps. <BASE> is the --base branch when given, else <DEFAULT_BRANCH>.
Nothing to ship? If Step 1 showed no uncommitted changes, fetch (a stale origin/<BASE> overcounts) and list the commits ahead of the base:
git fetch origin
git log --oneline origin/<BASE>..HEAD
Stop only if this is empty too: no uncommitted changes and no commits ahead of the base means there's nothing to push or open a PR for.
If on default branch:
pop after an empty stash takes another session's entry from the shared stackgit checkout -b <descriptive-branch-name>If on feature branch: Continue on current branch.
Check if changes require updates to README.md, CLAUDE.md, or docs/. Make updates if needed, stage with code changes.
Auto-detect the project's test runner and run tests. If tests fail, stop and help fix. If no tests found, note and continue.
Skip with --skip-tests or -T. If neither flag was passed, check caliper-settings get skip_tests — if it returns true, skip tests.
Skip this step when the tree is clean (the work is already committed). Otherwise stage specific files (avoid git add . to prevent accidental secrets inclusion).
Show staged diff summary before committing. Create conventional commit with HEREDOC:
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<body - what and why>
Co-Authored-By: Claude <[email protected]>
EOF
)"
Rebase onto <BASE> (from Step 2):
git fetch origin
git rebase origin/<BASE>
Use bare git fetch origin (no branch arg) so refs/remotes/origin/<BASE> actually advances. git fetch origin <BASE> only updates FETCH_HEAD, leaving the remote-tracking ref stale — git rebase origin/<BASE> then rebases onto an outdated tip.
If conflicts occur, resolve them and re-run tests before continuing. If the rebase leaves nothing ahead (git log --oneline origin/<BASE>..HEAD is empty, e.g. the work already landed on the base), stop and report it: there's nothing to push.
git push -u origin HEAD
If branch was rebased and already has remote, use git push -u origin HEAD --force-with-lease. Always use origin HEAD explicitly — worktrees lose upstream tracking after rebase, so bare git push fails.
If gh pr view already shows an open PR for this branch, the push updated it: report its URL and skip creation. Otherwise add --base <BASE> only when --base was given — written in as a literal, since a shell test in the same call as a body that mentions git gets the whole call refused under isolation:
gh pr create --title "<commit subject>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
<what was tested>
Co-Authored-By: Claude <[email protected]>
EOF
)"
When --base is provided (e.g., from orchestrate for phase PRs), the PR targets that branch instead of <DEFAULT_BRANCH>. This enables the integration branch model where phase PRs target integrate/<feature>.
Report: branch name, test results, files changed, commit hash, PR URL.
| Arg | Effect |
|---|---|
| (none) | Full workflow |
--docs -d | Review docs only |
--quick -q | Skip doc review |
--no-push | Commit only |
--skip-tests -T | Skip tests |
-m "..." | Use provided message |
--base <branch> | Target specific base branch for PR (default: <DEFAULT_BRANCH>) |
| Mistake | Why It Matters |
|---|---|
Hardcoding main instead of <DEFAULT_BRANCH> | Some repos use master |
| Pushing unknown commits on local main | May push unintended WIP/experimental work |
Using --force instead of --force-with-lease | Can overwrite others' work |
| Merging in /pr-create | Always stop at PR creation for external review |
Auto-invoked by: orchestrate — after implementation-review passes
Followed by: pr-review — after bots and reviewers post feedback
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
19 skills in this plugin
/caliper-settingsUse when the user wants to view, change, or reset their persistent preferences, or when triggered by "/caliper-settings", "my settings", "change defaults"./codebase-reviewUse when asked to audit a codebase, find DRY/YAGNI/complexity issues repo-wide, or perform periodic code quality review/conversateUse when the user invokes /conversate, or asks to talk a change through with you — your recommendations, their decisions, open questions — before anything gets built./caliper:pr-createfrom caliper
npx claudepluginhub nikhilsitaram/claude-caliper --plugin caliperOther plugins' skills for the same job