Borrowing it
Nothing to install: this file belongs to alexarthurs/herdr-sidebar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/alexarthurs/herdr-sidebar/main/.claude/skills/feature-worktree/SKILL.mdgit clone --depth 1 https://github.com/alexarthurs/herdr-sidebarWrote 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.
[](https://agentmods.dev/skills/alexarthurs/herdr-sidebar/feature-worktree)<a href="https://agentmods.dev/skills/alexarthurs/herdr-sidebar/feature-worktree"><img src="https://agentmods.dev/badge/skills/alexarthurs/herdr-sidebar/feature-worktree.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00084 | $0.03784 |
| Opus 5 | $0.00042 | $0.01892 |
| Sonnet 5 | $0.00017 | $0.00757 |
| Haiku 4.5 | $0.00008 | $0.00378 |
Grade C, and why
feature-worktree 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 8d 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.
refuses the delete), `rm -rf` it — an orphan you missed in step 4 is still holding it. Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
tabs=json.loads(subprocess.check_output(['herdr','tab','list','--workspace',ws]))['result']['tabs'] How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Feature worktree
When the user asks for a new feature, give it its own git worktree (own folder + branch) and its own Herdr pane before writing code — several agent sessions often run against this repo at once, and a shared checkout means branch switches and half-finished edits land under each other's feet. One feature = one worktree = one pane, named after the feature.
Steps
-
Already isolated? Just build. If this session's cwd is already under
.claude/worktrees/, you ARE the feature pane — implement the request right here, don't nest another worktree or spawn another pane. Skip to step 5. -
Not in Herdr? Fall back to in-place. If
HERDR_ENVis not1, there are no panes to spawn — enter the worktree in THIS session with the EnterWorktree tool (name: <slug>) and build here. Skip the pane steps. -
Derive a short kebab-case slug from the request ("add a diff view to herdr-aa-git" →
git-diff-view). -
Spawn the feature's pane, then hand it the task. Do this from the current session; keep your own focus where it is (
--no-focuseverywhere).a. Create the worktree FIRST — before the pane exists. You are running Bash (Git Bash), so
&&is fine here; it is only the PowerShell panes that reject it. If the repo has anoriginremote, fetch and branch fromorigin/main; otherwise branch frommain:git fetch origin && git worktree add .claude/worktrees/<slug> -b <slug> origin/main # no origin yet: git worktree add .claude/worktrees/<slug> -b <slug> mainOrder matters: doing this first lets the pane START inside the worktree (step c), which buys two things. (1) herdr's recorded cwd for that pane is then honest — if you instead
Set-Locationafter the shell boots, herdr keeps reporting the shell's START dir (the main checkout) forever, so every feature pane claims to be somewhere it is not. (2) No shell chaining in the pane at all — launching Claude becomes a bare command.
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.
- 8d ago First seen · 226 lines · 84 tokens per session scan C 09e1d595a144
feature-worktree is a skill published in the GitHub repository alexarthurs/herdr-sidebar (285 stars, last pushed 2d ago), licensed MIT. It adds 84 tokens to every session and 3,784 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
contributor-onboarding
Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
gh-close-issues
Close resolved Codewhale issues only after verifying the landed commit/behavior, with a positive crediting comment; never from title alone.
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.