concurrent-session-checkout-clobbers-shared-worktree SKILL.md skillA
concurrent-session-checkout-clobbers-shared-worktree from wan-huiyan/agent-traffic-control is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add wan-huiyan/agent-traffic-control/concurrent-session-checkout-clobbers-shared-worktree@v1.2.0Pins v1.2.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- wan-huiyan/agent-traffic-control
- Path
plugins/agent-traffic-control/skills/concurrent-session-checkout-clobbers-shared-worktree/SKILL.md- Versions recorded
- 4
- Latest version
- v1.2.0, committed Sep 12, 2026
- First version recorded
- May 29, 2026
- Size
- 7,348 bytes
- Repository stars
- 3
- License
- MIT
A second Claude Code session (or agent/person) sharing the same working directory runs `git checkout`/`git switch`, flipping the branch for the whole working tree underneath your session and clobbering your uncommitted work. Use when: (1) a file you just edited has silently reverted — often with a "file was modified, either by the user or by a linter" system reminder, (2) `git branch --show-current` shows a branch you didn't switch to, (3) `git reflog` shows a `checkout: moving from X to Y`…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Concurrent session's `git checkout` clobbers your shared working directory ## Problem Two Claude Code sessions (or any two agents/people) operate in the **same** working directory on the same clone. `git checkout` / `git switch` changes `HEAD` for the *entire working tree* — it is not per-session. When session B switches branches, session A's tree changes underneath it: - Uncommitted edits to tracked files may be carried across, reverted, or left in a confusing half-state. - Untracked files (new files you created) stay on disk but risk being swept into session B's next `git add -A`. - Edits get silently lost — e.g. a config field you added disappears. It is invisible until something breaks: a function you wrote is "gone", a test errors on a symbol you defined, or a harness emits *"file was modified, either by the user or by a linter"* for a file you didn't expect to change. ## Context / Trigger Conditions - A file you edited reverted to an older version with no action from you. - `git branch --show-current` is not the branch you were working on. - `git status` lists changes or untracked files you don't recognize. …
Read the whole file at its exact version.
How to install
mdr add wan-huiyan/agent-traffic-control/concurrent-session-checkout-clobbers-shared-worktree@sha256:e9138c707caf8605The line at the top of this page pins the label v1.2.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_d4f23qhxw2nlljgu)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between May 29, 2026 and Sep 12, 2026, about one every 35 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.2.0 latest | 2026-09-12 | aec1aa9 | 7,348 B | A | view · diff |
| v1.2.0 | 2026-08-07 | d679ef6 | 7,297 B | A | view · diff |
| v1.1.0 | 2026-07-08 | f1254dd | 6,086 B | A | view · diff |
| v1.0.0 | 2026-05-29 | 059688a | 4,725 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7348 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
wan-huiyan/agent-traffic-control · 3 stars · license MIT · pushed 2026-09-22 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_d4f23qhxw2nlljgu GET https://markdownregistry.com/api/v1/resolve?ref=wan-huiyan/agent-traffic-control/concurrent-session-checkout-clobbers-shared-worktree GET https://markdownregistry.com/api/v1/blob/e9138c707caf86053cae6119f97352ce37b525d36537b3bf3739b2a847ca4a00
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.