/clubmed-github:github-updatefrom Club Med — GitHub
Get the latest version: bring whatever the user is currently on up to date, choosing the right method for their situation — a clean base is pulled, work that was never sent is rebased onto the latest base, and work with an open pull request is updated through GitHub itself so nothing already sent is rewritten. Also detects work whose pull request was already merged and offers to return to a clean base. Never force-pushes, never rewrites published history, and refuses to run over uncommitted changes. Use when the user wants the latest changes, thinks they are out of date, is told their pull request is behind or conflicting, or wants to catch up before continuing. Triggers on: "get the latest version", "update my work", "am I up to date", "my PR is behind", "sync with the latest", "catch up before I continue", "pull the latest changes", "/github-update".
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.
Bring the user up to date. What that means depends entirely on where they are, and picking the wrong method is how people end up with rejected pushes and rewritten history — so this skill identifies the situation first and only then acts.
The audience is often non-technical. "Update" to them means "make sure I have the latest, and that what I sent is not stale". They should never have to know which mechanism achieved it.
The published-work path uses the GitHub MCP (mcp__github__*). If those tools are unavailable or a call fails with an auth error, invoke the github-authentication skill, then retry once.
DEFAULT=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's@^origin/@@')
[ -z "$DEFAULT" ] && DEFAULT=$(git remote show origin | sed -n 's/.*HEAD branch: //p')
CURRENT=$(git rev-parse --abbrev-ref HEAD)
git status --porcelain
git fetch origin
If HEAD is detached, stop and report — there is no branch to update.
If the working tree is dirty, stop. Never stash: a rebase over stashed changes moves work the user did not expect to move, and a stash is invisible to someone who does not know git. Offer, via AskUserQuestion, to send the current changes first (github-publish) or to set them aside properly (github-new).
✗ You have changes that are not saved yet.
Send them first, or put them aside, then try again.
If CURRENT is the default branch → clean base, go to 3a.
Otherwise resolve owner/repo from git remote get-url origin and look up the pull request for this branch — mcp__github__list_pull_requests with head: "<owner>:<CURRENT>", state: "all":
git pull --ff-only
✔ You have the latest version
If --ff-only fails, the local base has diverged from the remote. Do not paper over it with a merge or a reset: report it and say a developer should look, because on a base branch a divergence usually means something went wrong earlier.
Nothing has been sent, so local history can safely be replayed on top of the latest base. Invoke the git-rebase-branch skill: it handles the fetch, the rebase onto origin/<default>, safe automatic conflict resolution, and asks the user to arbitrate genuine conflicts.
✔ Your work is now based on the latest version
The branch is on the remote and a pull request points at it. Rebasing here would rewrite commits that are already published and make the next push non-fast-forward, with force-push as the only way out. So do not rebase — let GitHub merge the base into the branch server-side:
mcp__github__update_pull_request_branch { "owner": ..., "repo": ..., "pullNumber": <n> }
Then bring the local copy in line:
git pull --ff-only
✔ «<PR title>» is up to date with the latest version
PR : <html_url>
If GitHub reports a conflict it cannot resolve, the two sides changed the same lines and someone has to choose. Say that plainly, name the files, and offer to resolve them locally — do not improvise a force-push:
⚠ «<PR title>» conflicts with the latest version
Same lines changed on both sides: <files>
This needs a human decision — I can walk you through it.
There is nothing left to update: the work is published and the remote branch may already be gone (which is why the old behaviour failed here with a fetch error). Say so and offer a way forward with AskUserQuestion:
github-new.✔ «<PR title>» has been published (PR #<n> was merged)
git rebase --abort over leaving a broken mid-rebase stategit pull --ff-only fails on the default branch, stop and report — do not merge or reset to force it throughWhat SKILL.md sets; muted values are Claude Code's defaults
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.