mid-session-master-advance-rebase
Use when `git diff origin/master..HEAD` (or main) shows files you never touched as DELETED/modified, yet `git status` is clean and `git log` shows only your…
Skill by hjr15
Chalk Labs
Need help deploying mid-session-master-advance-rebase?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hjr15-mid-session-master-advance-rebase
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mid-session-master-advance-rebase
What's inside
- Skill name
mid-session-master-advance-rebase- Description
- Use when `git diff origin/master..HEAD` (or main) shows files you never touched as DELETED/modified, yet `git status` is clean and `git log` shows only your commits — origin advanced past your fork point and the diff shows its new commits inverted. Fix with `git fetch && git rebase`.
- License
- MIT
- Instructions
- 53 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Mid-Session Master Advance Rebase ## Overview When sister sessions are running in parallel and merging to the default branch, `origin/master` (or `origin/main`) advances without your worktree noticing. `git diff origin/master..HEAD` becomes misleading: it shows the **inverse** of any new upstream commits — a file added on master shows as DELETED in your diff; a line added shows as removed. Easy to mistake for cross-session contamination of your worktree. ## When to Use - Pre-push verification: `git diff origin/master..HEAD` shows unfamiliar file changes - `git status` says the working tree is clean - `git log --oneline <fork-point>..HEAD` shows only your own commits - You're in a worktree with one or more sister worktrees on other branches ## Diagnosis ```bash git fetch origin git log --oneline origin/master | head -3 # has master moved past your fork point? git log --oneline <my-branch> | head -3 # what's your branch tip? git merge-base HEAD origin/master # is your fork point now behind origin? ``` If origin/master has commits beyond your fork point, that's the source of the "spurious diff" — it is upstream's new work shown inverted, not anything in your tree. ## Fix ```bash git rebase origin/master # rebases are usually clean for non-overlapping packages — re-run the test suite to verify git diff origin/master..HEAD # now shows only your changes ``` ## Why rebase rather than just push Pushing as-is works (GitHub computes its own merge-base), but rebasing first: - Makes the local `git diff origin/master..HEAD` honest, so pre-PR verification is meaningful - Catches real conflicts EARLY instead of in the PR - Keeps your branch linearisable for squash-merge ## Neighbouring hazards (dirty tree, not the clean-diff case) This skill assumes a **clean** worktree where the confusion is only in the diff base. Two dirty-tree variants of "origin advanced" need different handling: - **Untracked file blocks the ff-pull / rebase.** If `git fetch && git rebase` or `git pull --ff-only` aborts with *"untracked working tree files would be overwritten by merge"*, an untracked local copy — often a parallel lane's file or an Obsidian phantom — collides with a file the incoming history adds as tracked. Confirm content-equality (`git show origin/<branch>:<path>` + `git diff --no-index`), move the untracked copy to `/tmp`, re-pull, then discard the copy. - **The user's checkout is many commits behind origin AND dirty.** Distinct from the agent's own clean worktree: never blow it away to "get latest". Snapshot everything (tracked + untracked) onto a `wip-backup-<date>` branch (`git switch -c wip-backup-<date> && git add -A && git commit` — skip `.claude/`), then `git branch -f <main> origin/<main>` + `git switch <main>` to surface the merged work losing nothing. Prove no loss by diffing `wip-backup-<date>` vs `origin/<main>` (the "lost edits" are usually just stale older copies) before declaring done; leave the backup branch in place as a safety net. ## Related - parallel worktree tasks — the multi-worktree setup that makes this happen - Distinct from a *dirty-tree* hazard — here the tree is clean and the confusion is purely in the diff base.
From hjr15/claude-kit, MIT.
More from hjr15/claude-kit
- 0.524score
architect-team
hjr15
Deploy the architecture agents (architect, code-architect, backend-architect) as a coordinated design council to design or review a feature/system before it's…
SkillBFreshness: BClaude Code +9 - 0.524score
code-team
hjr15
Deploy the code-quality agents (code-quality-reviewer, code-architect) alongside the /code-review skill to answer "is this code well-built?" — clean code…
SkillBFreshness: BClaude Code +9 - 0.524score
doc-accuracy-audit
hjr15
Use when validating that a repo's READMEs and docs are still accurate against the current code — endpoints, ports, counts, env vars, commands, schemas, event…
SkillBFreshness: BClaude Code +9 - 0.524score
backport-review-fix-into-plan-of-record
hjr15
Use when a per-task review during subagent-driven development catches and fixes a real bug in code that a plan-of-record authored — edit the plan itself to…
SkillBFreshness: BClaude Code +9 - 0.524score
fix-blocker-rather-than-override
hjr15
Use when a pre-existing master CI gate is red and blocking your unrelated PR — decide between fix-the-blocker (compounds across all PRs) and admin-override…
SkillBFreshness: BClaude Code +9 - 0.524score
generator-oracle-zero-diff-verify
hjr15
Use when building a code-generator, sanitizer, or export pipeline whose output already exists as a hand-maintained artifact — make zero-git-diff against that…
SkillBFreshness: BClaude Code +9 - 0.524score
multi-agent-branch-collision-recovery
hjr15
Use when a commit landed on the wrong branch because a parallel agent shifted the active branch in a shared working directory.
SkillBFreshness: BClaude Code +9 - 0.519score
ghcr-first-push-403-seed-and-link
hjr15
Use when a CI build succeeds but the GHCR push fails 403 Forbidden for a service whose package never existed, on a personal (non-org) account.
SkillBFreshness: BClaude Code +9 - 0.517score
symlink-vs-realfile-classify-before-deleting-fanout-dups
hjr15
Use before deleting "duplicates" during a skill/config dedup on a symlink-fanned tree — run a `test -L` classification loop first, so you remove only genuine…
SkillBFreshness: BClaude Code +9 - 0.517score
git-checkout-B-from-worktree-moves-a-foreign-checkouts-branch
hjr15
Use before `git checkout -B <branch>` / `git branch -f` / `git reset --hard` on a SHARED branch name from inside a worktree — `-B` force-moves the ref even…
SkillBFreshness: BClaude Code +9 - 0.499score
grill-brainstorm-build
hjr15
Use when the user wants to go from a rough idea to implementation, running through interrogation, options exploration, and build in one flow.
SkillBFreshness: BClaude Code +9 - 0.474score
mobile-team
hjr15
Deploy the mobile agents (mobile-app-builder, mobile-ux-optimizer) — with ui-designer/ux-researcher/frontend-developer on call — to design and build native or…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 18, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hjr15/claude-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hjr15
- 0.524score
fix-blocker-rather-than-override
hjr15
Use when a pre-existing master CI gate is red and blocking your unrelated PR — decide between fix-the-blocker (compounds across all PRs) and admin-override…
SkillBFreshness: BClaude Code +9 - 0.524score
backport-review-fix-into-plan-of-record
hjr15
Use when a per-task review during subagent-driven development catches and fixes a real bug in code that a plan-of-record authored — edit the plan itself to…
SkillBFreshness: BClaude Code +9 - 0.524score
code-team
hjr15
Deploy the code-quality agents (code-quality-reviewer, code-architect) alongside the /code-review skill to answer "is this code well-built?" — clean code…
SkillBFreshness: BClaude Code +9 - 0.524score
architect-team
hjr15
Deploy the architecture agents (architect, code-architect, backend-architect) as a coordinated design council to design or review a feature/system before it's…
SkillBFreshness: BClaude Code +9 - 0.524score
doc-accuracy-audit
hjr15
Use when validating that a repo's READMEs and docs are still accurate against the current code — endpoints, ports, counts, env vars, commands, schemas, event…
SkillBFreshness: BClaude Code +9 - 0.524score
generator-oracle-zero-diff-verify
hjr15
Use when building a code-generator, sanitizer, or export pipeline whose output already exists as a hand-maintained artifact — make zero-git-diff against that…
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get mid-session-master-advance-rebase running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
mid-session-master-advance-rebase skill. Agent Mart. https://agentmart.dev/skills/hjr15-mid-session-master-advance-rebase (last updated 2026-10-24)