worktree-devproxy

worktree-devproxy is a skill for Claude Code, Codex from onsager-ai/dev-skills. It costs 274 tokens per session (2,713 once invoked), scanned C, original, MIT.

A setup for running several Git worktrees, or separate branch directories, each with its own Docker development environment behind one shared local web proxy.

In plain words
What is it for?
Use it to create browser-accessible local URLs for each worktree, isolate its containers and volumes, and connect to the environments through one SSH tunnel.
Why use it?
It lets developers run multiple branches at the same time without assigning separate host ports, configuring DNS, or managing TLS certificates.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; positional $N argument.

Good fit Use it to create browser-accessible local URLs for each worktree, isolate its containers and volumes, and connect to the environments through one SSH tunnel.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onsager-ai/dev-skills/worktree-devproxy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add onsager-ai/dev-skills --skill worktree-devproxy
Clone the repo
git clone --depth 1 https://github.com/onsager-ai/dev-skills

Made for: Claude Code, Codex.

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 worktree-devproxy

README.md
[![agentmods](https://agentmods.dev/badge/skills/onsager-ai/dev-skills/worktree-devproxy/github.svg)](https://agentmods.dev/skills/onsager-ai/dev-skills/worktree-devproxy)
Your own site
<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/worktree-devproxy"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/worktree-devproxy/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 worktree-devproxy

Your own site · 80×15
<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/worktree-devproxy"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/worktree-devproxy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 274 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,713 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. 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.00274 $0.02713
Opus 5.5 $0.00110 $0.01085
Sonnet 5.5 $0.00055 $0.00543
Haiku 4.5 $0.00027 $0.00271

Measured 1mo ago against content hash 9304bd7a041d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

worktree-devproxy scanned grade C with 2 findings 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| `wt rm` fails `Permission denied` | Root-owned files written by containers into the bind mount. The bundled `wt` already chowns via a throwaway alpine container and falls back to `rm -rf` + `git worktree prune`. |

Makes network callslowCapability

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

3. Verify: `curl -s --noproxy '*' localhost:8080/api/version` returns the Traefik version; `curl localhost:8000` returns 404 (no routes yet — correct).
skills/worktree-devproxy/SKILL.md · 164 lines

How it starts

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

worktree-devproxy

One shared Traefik + one compose stack per git worktree. Each instance is reachable at http://<worktree>.<repo>.localhost:8000; a laptop reaches it through a single SSH tunnel. Nothing else touches the host network.

laptop browser → SSH tunnel (:8000) → Traefik (127.0.0.1 only)
              → Host-header match → per-worktree compose stack (devproxy network)

Invariants (don't trade these away when adapting):

  1. No host ports except Traefik's own 127.0.0.1:8000 (web) and 127.0.0.1:8080 (dashboard/API). Everything else flows over the shared external docker network devproxy.
  2. Routing is Host-header only — *.localhost resolves to loopback by OS convention, so there is no DNS, no TLS, and no port allocation table.
  3. Worktree isolation is COMPOSE_PROJECT_NAME (set by .envrc via direnv): independent networks, volumes, and container names per worktree.

One-time machine setup

Prerequisites: docker (with compose plugin), git, direnv (hook it into the shell rc).

  1. Copy references/dev-proxy.docker-compose.yml to ~/dev-proxy/docker-compose.yml, mkdir -p ~/dev-proxy/dynamic, and docker compose up -d (run with COMPOSE_PROJECT_NAME=dev-proxy or from a direnv-free shell — a stray project name from another repo's .envrc creates a second Traefik that loses the :8000 bind race). Two flags in it are load-bearing, learned the hard way:
    • image: traefik:v3 (not an old pin) — Traefik ≤ v3.3 hardcodes Docker API 1.24, which Docker Engine 29+ rejects outright.
    • --providers.docker.network=devproxy — app containers sit on [default, devproxy]; without the pin Traefik dials the default network's IP it can't reach and every request 504s.
  2. Install scripts/wt and scripts/devproxy-route to ~/bin/, chmod +x, make sure ~/bin is on PATH.
  3. Verify: curl -s --noproxy '*' localhost:8080/api/version returns the Traefik version; curl localhost:8000 returns 404 (no routes yet — correct).

Read the full file on GitHub · 164 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 164 lines · 274 tokens per session scan C 9304bd7a041d

Subscribe to this mod's changes

worktree-devproxy is a skill published in the GitHub repository onsager-ai/dev-skills (6 stars, last pushed 7d ago), licensed MIT. It adds 274 tokens to every session and 2,713 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.