/peter:update-branch [--merge] [--base=main]from peter
Update current branch with latest main using rebase (default) or merge (--merge). Works with PR branches or any feature branch.
Ships in peter. 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.
Bring the current branch up to date with the base branch (default: main) using rebase (default) or merge.
$ARGUMENTS - Optional arguments:
--merge - Use merge instead of rebase (default is rebase)--base=<branch> - The base branch to update from (default: main)Parse $ARGUMENTS to extract:
--merge is present, use merge. Otherwise, use rebase.--base= flag, or default to main.# Check current branch
git branch --show-current
# Check for uncommitted changes
git status --porcelain
# Check if there's an associated PR
gh pr view --json number,title,headRefName,baseRefName 2>/dev/null || echo "No PR"
# See how far behind base we are
git fetch origin
git rev-list --count HEAD..origin/<base-branch>
If there are uncommitted changes:
git stash push -m "update-branch: auto-stash before rebase/merge"
Track that we stashed so we can pop later.
git fetch origin <base-branch>
Rebase (default):
git rebase origin/<base-branch>
Merge (--merge):
git merge origin/<base-branch> --no-edit
If the rebase or merge produces conflicts:
git diff --name-only --diff-filter=U
resolve-conflicts skill:
git add <resolved-file>
For rebase:
git rebase --continue
If there are additional conflicts in subsequent commits, repeat the resolution process.
For merge:
git commit --no-edit
After successful update, run project verification:
# Check for remaining conflict markers
git diff --check
# Run project checks (check CLAUDE.md for specifics)
pnpm check-types
pnpm test
If verification fails:
If we stashed changes in step 2:
git stash pop
If the pop has conflicts, resolve them.
Ask the user before pushing. The push command depends on the strategy:
After rebase:
# Rebase rewrites history, so force-push is needed
git push --force-with-lease origin <current-branch>
After merge:
git push origin <current-branch>
Important: Always use --force-with-lease (not --force) after rebase to prevent overwriting others' work.
Provide a summary:
--merge when the branch is shared or has many commits--force-with-lease instead of --force after rebaseWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flippyhead/pai --plugin peter14 skills in this plugin
/add-skillUse when Peter wants to turn something into a reusable skill and get it into his skills repo — "skillify this", "make this a skill", "add a skill", "save this as a skill", "turn this into a skill", "new skill for X" — or wants an existing personal skill changed./copa-forum-briefScan the COPA Discourse forum (forum.cirruspilots.org) through Peter's logged-in Chrome session and produce a "forum brief" — a shortlist of threads worth jumping in on, each with a suggested angle and a draft reply in Peter's voice grounded in prior forum threads and COPA content (Commander, Ask COPA U), plus posts worth recognizing with a like or a short attaboy. Use this whenever Peter asks for a forum brief, asks what he should jump in on or reply to, asks where to be visible on the forums, mentions board presence/participation on the forums, or says anything like "find me threads", "what's worth answering on COPA", or "/forum-brief". Requires the Claude-in-Chrome tools and Peter at his desk with Chrome logged in to the forum./explain-usageExplain where this session's tokens went, with one simple chart in plain language. Use when the user says things like "explain my usage", "where did my tokens go", or asks for a usage breakdown.Other plugins' skills for the same job