flask-debug-cross-worktree-edit-stale

flask-debug-cross-worktree-edit-stale is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 345 tokens per session (2,522 once invoked), scanned A, original, MIT.

A troubleshooting guide for when a local web server keeps showing old files while you edit a different Git worktree. A Git worktree is a separate checkout of the same repository.

In plain words
What is it for?
Use it to diagnose stale template, CSS, static-file, or view changes in Flask, Django, Rails, and similar local development servers.
Why use it?
It identifies that the server and your editor are using different physical copies of the files, so restarting caches or clearing the browser cannot show the other copy’s edits.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/.../the-project-repo.

Part of the agent-traffic-control plugin — 105 skills shipped together

Good fit Use it to diagnose stale template, CSS, static-file, or view changes in Flask, Django, Rails, and similar local development servers.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add wan-huiyan/agent-traffic-control
Claude Code
/plugin install agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flask-debug-cross-worktree-edit-stale

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flask-debug-cross-worktree-edit-stale

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/flask-debug-cross-worktree-edit-stale.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 345 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,522 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00345 $0.02522
Opus 5 $0.00172 $0.01261
Sonnet 5 $0.00069 $0.00504
Haiku 4.5 $0.00034 $0.00252

Measured 9d ago against content hash cd57462d0c00, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

flask-debug-cross-worktree-edit-stale scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

checkout X` in B too, (4) `curl http://127.0.0.1:PORT/page` returns
plugins/agent-traffic-control/skills/flask-debug-cross-worktree-edit-stale/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flask debug edits cross-worktree stale

Problem

You're running a Flask dev server (python app.py with debug=True, or flask run --debug) from one git worktree. You're editing template / static / view files from a sibling worktree of the same repo, because the branch you want to ship is checked out at the running worktree and git checkout <branch> fails in your editing worktree.

You hit curl http://127.0.0.1:PORT/the-page after each edit, and the response bytes don't change. You hypothesize Jinja bytecode cache, Flask @_ttl_cache, browser caching, CDN, or stale __pycache__. You try touch app.py to bust Flask's debug-reload, restart the process, clear browser cache. Nothing fixes it.

Root cause: git worktrees have independent working trees on disk. Each git worktree directory has its own copy of every tracked file. Flask is reading from <worktree-A>/templates/page.html. Your edits live in <worktree-B>/templates/page.html. They're physically different files; the dev server has no way to see B's edits until A's disk state changes.

Trigger conditions (high-confidence diagnosis)

Fire this skill when ALL of these are true:

  1. git worktree list shows ≥2 worktrees of the same repo.
  2. A dev server is bound to a known port; lsof -i :PORT shows the server process.
  3. The server's CWD (lsof -p <PID> | grep cwd, or check the script that launched it) is in worktree A.
  4. Your editor is making changes in worktree B (different path, same repo).
  5. curl against the page returns byte-identical responses despite confirmed-saved edits in worktree B.
  6. The file you're editing is tracked (git knows about it) — not a new untracked file. (Untracked files exist in only one worktree anyway.)

If condition 6 is FALSE (you created a new file), the new file simply doesn't exist in worktree A's tree. Same root cause, different shape: either commit + ff-merge into A's branch, or create the file in A.

Diagnostic recipe

Read the full file on GitHub · 230 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 230 lines · 345 tokens per session scan A cd57462d0c00

Subscribe to this mod's changes

flask-debug-cross-worktree-edit-stale is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 4d ago), licensed MIT. It adds 345 tokens to every session and 2,522 once invoked, about $0.0017 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cloudflare-workers-observability

Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors.

secondsky/claude-skills · 47 tokens

cloudflare-workers-dev-experience

Cloudflare Workers local development with Wrangler, Miniflare, hot reload, debugging. Use for project setup, wrangler.jsonc configuration, or encountering local dev, HMR, binding simulation errors.

secondsky/claude-skills · 47 tokens

cloudflare-workers-performance

Cloudflare Workers performance optimization with CPU, memory, caching, bundle size. Use for slow workers, high latency, cold starts, or encountering CPU limits, memory issues, timeout errors.

secondsky/claude-skills · 42 tokens

api-error-handling

Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building production APIs, implementing error recovery patterns, or integrating error monitoring services.

secondsky/claude-skills · 40 tokens

skeptical-triage

Reusable 3-round self-challenge + arbiter pattern for filtering false positives from findings/verdicts. Use when the cost of a false-positive gate block exceeds the cost of 4 extra LLM turns.

avelikiy/great_cto · 49 tokens

anti-patterns

Catalogue of known SDLC anti-patterns that greatcto agents must actively reject when reviewing architecture, plans, code, or post-mortems. Used by architect (pre-impl), pm (planning), senior-dev (impl), l3-support (post-incident).

avelikiy/great_cto · 59 tokens