multi-worktree-file-url-stale-contentlisted
Install: claude install-skill wan-huiyan/agent-traffic-control
# Multi-worktree `file://` URL stale content
## Problem
The user opens a `file://` URL pointing to a deliverable / static HTML / docs file in the repo. They see old content. They report "the fix isn't there" or "I still see the thing we removed". They are correct about what they see — but the file IS fixed on `origin/main`. The disconnect is that the `file://` URL doesn't know what git branch is checked out at that path. The browser just reads whatever bytes are on disk.
In a repo with multiple `git worktree` checkouts, each worktree is on a different branch. The primary checkout at the repo root is *also* on a branch — usually the last feature branch someone was working on, NOT main. After a PR merges to main, none of the on-disk paths automatically update. The user's bookmark keeps showing the same stale content.
## Context / Trigger Conditions
All of:
- Repo uses git worktrees (`git worktree list` shows 2+ entries)
- File in question is a deliverable / static asset / docs file that humans open directly (HTML, MD-rendered-to-HTML, JSON viewer, PDF), not a service-rendered URL
- User opens it via `file://` URL bookmark (not via a running web server, not via VSCode preview)
- Recent merge to main updated that file
- User reports the file looks wrong / old / unchanged
Smoking-gun signal: the user-reported file path contains `.claude/worktrees/<name>/`, `worktrees/`, `.git/worktrees/`, or you can see `2+` worktrees via `git worktree list` and the bookmarked path is one o