No slash command · from Club Med — GitHub
Rebase the current branch onto the latest default branch (detected dynamically from the remote — main, develop, or whatever origin/HEAD points to), safely. Use when the user asks to rebase, update their branch with the default branch, sync with the default branch, resolve a "branch is behind" state, or before pushing/opening a PR. Protects the default branch: if HEAD is on it, it carves a speaking feature branch from the last commit FIRST and never rebases the default branch itself. Attempts safe automatic conflict resolution and only asks the user to arbitrate genuine conflicts. Sub-step of github-publish and github-update — for the general "bring me up to date" intent, prefer github-update, which picks the right method for the situation and never rewrites already-published history. Triggers on the explicit git vocabulary only: "rebase", "rebase on main", "rebase onto the default branch", "rebase before pushing".
Ships in Club Med — GitHub. 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.
Rebase the current branch on top of the latest remote default branch (detected dynamically — main, develop, or whatever origin/HEAD resolves to), keeping history linear before a push or PR. The default branch itself is never rebased — if you are on it, a speaking feature branch is carved first.
# Primary
DEFAULT=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's@^origin/@@')
# Fallback if origin/HEAD is not set
if [ -z "$DEFAULT" ]; then
git remote set-head origin --auto >/dev/null 2>&1
DEFAULT=$(git remote show origin | sed -n 's/.*HEAD branch: //p')
fi
echo "Default branch: $DEFAULT"
CURRENT=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: $CURRENT"
git status --porcelain
If the working tree is dirty, stop and tell the user to commit or stash first (this skill does not stash silently). If HEAD is detached, stop and report.
git fetch origin "$DEFAULT"
If CURRENT equals $DEFAULT, do not rebase it. Carve a speaking branch from the current commit, then reset the local default to the remote:
Speaking branch name — parse the last commit subject git log -1 --pretty=%s:
<type>(scope): desc → <type>/<scope>-<desc-kebab><type>: desc → <type>/<desc-kebab>-, collapse repeats, trim), truncate to ~60 chars.git switch -c "<speaking-branch>"
git branch -f "$DEFAULT" "origin/$DEFAULT" # keep local default clean, no rebase of it
CURRENT="<speaking-branch>"
Report the new branch name to the user. Now proceed to rebase this new branch.
git rebase "origin/$DEFAULT"
Attempt safe automatic resolution only when it is unambiguous:
git diff --name-only --diff-filter=U # list conflicted files
Safe-auto cases (resolve, git add, then git rebase --continue):
For any genuine logic conflict (both sides changed the same statements with different intent), do not guess. Use AskUserQuestion to let the user arbitrate per file/hunk (options: keep ours / keep theirs / describe the merge). Apply the choice, git add <file>, then:
git rebase --continue
Never leave the repo mid-rebase silently. If the user cannot decide or asks to stop:
git rebase --abort # returns to the pre-rebase state
and report that a manual rebase is required.
✔ Rebased <branch> onto origin/<default>
<n> commits replayed
If a branch was carved from the default branch, state it explicitly:
ℹ Was on <default> — carved branch <speaking-branch> before rebasing (default branch untouched)
main, develop, …) — carve a feature branch first--force / force-push without an explicit user requestgit rebase --abort over leaving a broken stateWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub clubmediterranee/ai-core --plugin clubmed-github10 skills in this plugin
/git-commitExecute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping/github-authenticationGenerates, validates, and persists a GitHub personal access token (PAT) to the user-global ~/.claude/settings.json, so it is created once and valid in every repository. Use this skill whenever a GitHub token is needed, missing, expired, or must be refreshed — before any task that calls the GitHub API or connects the GitHub MCP server. Triggers on: "generate github token", "create github token", "set up github token", "update github token", "GITHUB_TOKEN missing", "GITHUB_TOKEN not set", "GITHUB_TOKEN expired", "github token invalid", "github authentication", "connect github mcp", "configure github access", or any task that requires GitHub API access and the token is absent or invalid. Works by checking for an existing valid token first, then manual browser login (the primary path — GitHub enforces 2FA), with optional best-effort auto-login if GITHUB_USERNAME/GITHUB_PASSWORD are available. Token is stored in ~/.claude/settings.json and auto-injected by Claude Code into every shell session; a legacy project-level .claude/settings.local.json is still read and takes precedence when present. Browser automation uses the Playwright MCP./github-cancelAbandon the work in progress: close its pull request (or turn it into a draft), drop the local branch, and return to a clean base. The symmetric inverse of github-publish — the way to undo an attempt at sending work. Always confirms first, spelling out exactly what will be lost and that closing a pull request is visible to the team. Never deletes the remote branch, so a closed pull request can still be reopened. Use when the user wants to cancel, abandon, drop, or throw away what they are working on, close a pull request they opened, or undo something they sent by mistake. Refuses on already-merged pull requests, which need a revert instead. Triggers on: "cancel this", "abandon this work", "drop what I am doing", "close my pull request", "I sent this by mistake", "throw this away", "undo my PR", "/github-cancel"./github-my-prsShow where the user stands: what they are working on right now, the pull requests they have open, the review comments waiting for them, and what they can do next — resume a piece of work, or abandon it. This is the way back to work that was left behind: switching to a pull request from the list restores the branch without the user ever naming it. Also the entry point for closing an older pull request. Use when the user asks what they are working on, wants to see their pull requests, wants to know if anyone reviewed their work, wants to pick something back up, or is simply lost about their current state. Triggers on: "where am I", "what am I working on", "show my pull requests", "list my PRs", "did anyone review my work", "any comments on my PR", "I want to go back to what I was doing", "resume my work", "/github-my-prs"./github-newMove on to something else: leave the work in progress behind and return to a clean, up-to-date base branch, ready to start fresh. Nothing is discarded silently — if the current work only exists locally (uncommitted changes or commits never pushed), the user is asked what to do with it first, because work left behind on a local branch cannot be found again through github-my-prs. Use when the user has finished a piece of work and wants to start another one, asks to go back to a clean state, wants to start from scratch, or says they are done with what they were doing. Never deletes anything without asking. Triggers on: "I want to work on something else", "start something new", "back to a clean base", "I am done with this", "reset my working state", "start fresh", "/github-new"./github-open-prOpen a GitHub pull request for the current branch via the GitHub MCP server (mcp__github__create_pull_request). Use when the user asks to open a PR, create a pull request, or submit their branch for review. Derives owner/repo from the git remote, uses the current branch as head and the default branch as base, and builds a title/body from the last commit. If GITHUB_TOKEN is missing or the GitHub MCP is not connected, it invokes the github-authentication skill first, then retries. Never targets main as head. Triggers on: "open a PR", "create a pull request", "open pull request", "submit for review", "PR this branch", "raise a PR".