Skill
session-plugin:session-distill — the Cross-Repo Promotion ([PROMOTE]) hand-off.
What happened
The promote hand-off instructs:
PLUGINS_REPO="$HOME/repos/laurigates/claude-plugins"
git -C "$PLUGINS_REPO" fetch origin
git -C "$PLUGINS_REPO" switch -c <branch> origin/main
# ... Write/Edit the SKILL.md under "$PLUGINS_REPO" ...
It operates directly on the shared, long-lived local checkout of claude-plugins. In this portfolio that checkout is frequently a contended checkout — another Claude session was actively working in it (branch fix/redundant-write-permission-rule, editing .claude/rules/agentic-permissions.md). The sequence raced:
- My session
switch -c'd the promote branch and edited SKILL.md.
- The concurrent session's operation autostashed my in-flight edit (it appeared as
stash@{0}: … carried-over justfile-expert edit) and moved HEAD to its own branch.
- My
git add/commit then found "nothing to commit, working tree clean" — the edit had been stashed away under me.
A git worktree add <my-branch> then failed (already used by worktree) because HEAD had moved again between calls. I recovered by making an isolated git clone --single-branch of the promote branch, re-applying the edit there, committing, and pushing — which cannot touch the contended checkout (landed as claude-plugins#2110).
Suggested fix
The promote hand-off should be isolated from the shared PLUGINS_REPO working tree by construction, since a promote can fire mid-session while a coworker session owns that checkout. Options:
- Do the promote in a throwaway
git clone --depth 1 --single-branch --branch <b> (or a dedicated git worktree), edit + commit + push there, then remove it — never switch -c the shared checkout.
- At minimum, cross-reference the existing shared-checkout rules (
repos/.claude/rules/concurrent-session-pr-check.md, shared-checkout-branch-isolation.md, git-plugin:git-coworker-check) in the promote section, and gate on a coworker check before mutating PLUGINS_REPO.
Evidence
Skill
session-plugin:session-distill— the Cross-Repo Promotion ([PROMOTE]) hand-off.What happened
The promote hand-off instructs:
It operates directly on the shared, long-lived local checkout of
claude-plugins. In this portfolio that checkout is frequently a contended checkout — another Claude session was actively working in it (branchfix/redundant-write-permission-rule, editing.claude/rules/agentic-permissions.md). The sequence raced:switch -c'd the promote branch and editedSKILL.md.stash@{0}: … carried-over justfile-expert edit) and movedHEADto its own branch.git add/committhen found "nothing to commit, working tree clean" — the edit had been stashed away under me.A
git worktree add <my-branch>then failed (already used by worktree) because HEAD had moved again between calls. I recovered by making an isolatedgit clone --single-branchof the promote branch, re-applying the edit there, committing, and pushing — which cannot touch the contended checkout (landed as claude-plugins#2110).Suggested fix
The promote hand-off should be isolated from the shared
PLUGINS_REPOworking tree by construction, since a promote can fire mid-session while a coworker session owns that checkout. Options:git clone --depth 1 --single-branch --branch <b>(or a dedicatedgit worktree), edit + commit + push there, then remove it — neverswitch -cthe shared checkout.repos/.claude/rules/concurrent-session-pr-check.md,shared-checkout-branch-isolation.md,git-plugin:git-coworker-check) in the promote section, and gate on a coworker check before mutatingPLUGINS_REPO.Evidence