/alon-skills:up-to-date [optional: 'docs' to also refresh library docs, or a path to scope the PR/issue check]from alon-skills
Preflight sync brief before repo work: shows ahead/behind against origin, recent commits, open PRs and issues, dirty tree, and a first action. Read-only; never pulls or merges without confirmation.
Ships in alon-skills. 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.
!echo "--- git rev-parse --show-toplevel"; git rev-parse --show-toplevel 2>&1 || true; echo "--- git remote -v"; git remote -v 2>&1 || true; echo "--- git branch --show-current"; git branch --show-current 2>&1 || true; echo "--- git status --short"; git status --short 2>&1 || true; echo "--- git stash list"; git stash list 2>&1 || true; echo "--- git fetch --all --prune"; git fetch --all --prune 2>&1 || true; echo "--- git rev-list --left-right --count @{upstream}...HEAD"; git rev-list --left-right --count @{upstream}...HEAD 2>&1 || true; echo "--- git log --oneline -15"; git log --oneline -15 2>&1 || true; echo "--- gh pr list --limit 20"; gh pr list --limit 20 2>&1 || true; echo "--- gh issue list --limit 20"; gh issue list --limit 20 2>&1 || true
The block above is this repo's git and GitHub state, captured once before you see the rest of this skill — raw command output, not analysis.
Get current before doing work. Goal: a short situational brief so you build on the latest code with full context. Read-only by default. Never mutate a dirty tree, never force, never discard local work without explicit confirmation — that holds even when this skill fired proactively.
Read it; don't re-run those commands as tool calls. Only run one again if the block shows it failed for a transient reason (a network blip on fetch, say) — a missing remote, no upstream, or gh unauthenticated are expected outcomes to report, not errors to retry.
rev-parse line errored → not a git repo; say so and stop, there's nothing to sync.git remote -v came back empty → no remote; say so in one line and start the task. Skip divergence and PR/issue checks entirely.@{upstream} count errored (branch never pushed, or detached HEAD) → say there is no upstream, never report that as "in sync", then run git rev-list --left-right --count origin/HEAD...HEAD (origin/main or origin/master if origin/HEAD is missing) and brief against the default branch. The brief still happens before any work.rev-list line failed (fresh local branch, detached HEAD) → say so plainly, note the branch is unpushed, and fall back to comparing against origin/<default-branch>. Never report "in sync" from a failed command.gh pr list / gh issue list errored or came back empty (no gh, unauthenticated, non-GitHub remote) → skip that section and say so; don't guess at open work.git log.The brief is something the user reads, not a check you run silently. If you carry on into the task in the same turn, the final message still opens with it — at minimum the branch line, naming what the ahead/behind counts are relative to (origin/main, say) — and the task result follows. Running the comparison without reporting it doesn't count.
git pull --ff-only. Do it only on confirm.Only if asked, or the docs arg is given: for the key deps in play, use context7 (resolve-library-id → query-docs) to pull current API docs, so code targets today's API, not stale memory.
pull, rebase, merge, checkout, stash pop) without explicit user OK.git fetch + git status answers it without the full brief.When work is about to start in a repo with a remote, invoke this without being asked: announce in one line ("Running up-to-date on <repo>") and proceed. The sync decision still requires explicit confirmation, proactive or not.
architect next, before code.What SKILL.md sets; muted values are Claude Code's defaults
Use unasked before starting work in any repo with a remote. Also on "up-to-date", "sync first", "pull latest", "catch me up on the repo". Not for a repo with no remote: say so in one line, then start the task. Not for a mid-task re-check in a repo already briefed this session: git fetch and git status answer that.
6 skills in this plugin
/architectWrites the design docs before code (SOURCE_OF_TRUTH.md, ARCHITECTURE_ROADMAP.md, TODO_WORKFLOW.md, CLAUDE.md) and audits existing docs against the code./ask-the-councilSeats a panel of Claude advisors with opposed mandates, then a Chairman commits to one recommendation and names the strongest dissent./ponytailForces the laziest solution that works: YAGNI, reuse, stdlib and native platform before new code or dependencies./prompt-generatorTurns a rough ask into a grounded, token-efficient prompt for another agent or LLM, with testable done criteria and agent-discipline rules for coding-agent hand-offs.npx claudepluginhub alonbaron/claude-skills --plugin alon-skillsOther plugins' skills for the same job