harness-read-write-base-repo-path-in-worktree-stale-tree SKILL.md skillA
harness-read-write-base-repo-path-in-worktree-stale-tree 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/harness-read-write-base-repo-path-in-worktree-stale-tree@v1.0.0Pins v1.0.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/harness-read-write-base-repo-path-in-worktree-stale-tree/SKILL.md- Versions recorded
- 1
- Latest version
- v1.0.0, committed Jul 8, 2026
- Size
- 5,279 bytes
- Repository stars
- 3
- License
- MIT
In a git-worktree session, your OWN Read/Write/Edit tool calls that use a BASE-repo absolute path (one MISSING the `.claude/worktrees/<name>/` segment) silently operate on the base repo's working tree — a DIFFERENT, often month-stale branch sharing the same `.git`. Use when: (1) a `Read`'s line numbers / function locations don't match a `grep` you ran in the worktree cwd (Bash sees the worktree; Read with a base path sees the base repo); (2) a `Write`/`Edit` "succeeds" but the file never…
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
# Read/Write/Edit with a base-repo path silently hits the stale base tree in a worktree session ## Problem You're working in a worktree (`<repo>/.claude/worktrees/<name>/`). Your `Bash` tool runs with cwd = the worktree, so `grep`/`git`/`wc` see the worktree's branch. But `Read`/`Write`/`Edit` take **absolute paths verbatim** — if you write `/…/<repo>/path` (the BASE repo path, missing the `.claude/worktrees/<name>/` segment) you operate on the **base repo's working tree**, a *different* checkout that shares the same `.git` and is usually parked on an unrelated, often **month-stale** branch. The two trees diverge silently and you don't get an error. ## Context / Trigger Conditions - A `Read`'s line numbers or the functions it shows **disagree with a `grep`/`wc`** you ran in the worktree cwd (e.g. `def get_top_drivers` at L2926 via Read vs L3795 via grep). - A `Write` reports success but the new file is **absent from `git status -sb`** in the worktree (it was created in the base repo, untracked there). - A `Write` to an existing file's path "works" but later edits to "the same file" via worktree-relative paths don't see your change. …
Read the whole file at its exact version.
How to install
mdr add wan-huiyan/agent-traffic-control/harness-read-write-base-repo-path-in-worktree-stale-tree@sha256:c854fa172156d639The line at the top of this page pins the label v1.0.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_nwtky6wd5em4jkmy)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jul 8, 2026.
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 (5279 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_nwtky6wd5em4jkmy GET https://markdownregistry.com/api/v1/resolve?ref=wan-huiyan/agent-traffic-control/harness-read-write-base-repo-path-in-worktree-stale-tree GET https://markdownregistry.com/api/v1/blob/c854fa172156d639ccc20747f102aa66be786e1c8b0aec492a0b5ffb1afefec9
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.