herdr-sidebar: Skill for Claude Code

.claude/skills/feature-worktree/SKILL.md

feature-worktree is a skill for Claude Code from alexarthurs/herdr-sidebar. It costs 84 tokens per session (3,784 once invoked), scanned C, original, MIT.

A workflow rule for keeping each new feature in its own Git worktree, branch, and Herdr terminal pane. A Git worktree is a separate project folder connected to the same repository.

In plain words
What is it for?
Starting isolated work on a new feature, view, panel, or other sizable change in either plugin.
Why use it?
It prevents parallel coding sessions from sharing files or terminals and accidentally mixing unfinished changes.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is alexarthurs/herdr-sidebar's own configuration. It tells Claude Code how to work on herdr-sidebar itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything herdr-sidebar configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/alexarthurs/herdr-sidebar/main/.claude/skills/feature-worktree/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/alexarthurs/herdr-sidebar

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexarthurs/herdr-sidebar/feature-worktree.svg)](https://agentmods.dev/skills/alexarthurs/herdr-sidebar/feature-worktree)
Your own site
<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>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,784 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.00084 $0.03784
Opus 5 $0.00042 $0.01892
Sonnet 5 $0.00017 $0.00757
Haiku 4.5 $0.00008 $0.00378

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

Security

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']
.claude/skills/feature-worktree/SKILL.md · 226 lines

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

  1. 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.

  2. Not in Herdr? Fall back to in-place. If HERDR_ENV is not 1, 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.

  3. Derive a short kebab-case slug from the request ("add a diff view to herdr-aa-git" → git-diff-view).

  4. Spawn the feature's pane, then hand it the task. Do this from the current session; keep your own focus where it is (--no-focus everywhere).

    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 an origin remote, fetch and branch from origin/main; otherwise branch from main:

    git fetch origin && git worktree add .claude/worktrees/<slug> -b <slug> origin/main
    # no origin yet:
    git worktree add .claude/worktrees/<slug> -b <slug> main
    

    Order 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-Location after 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.

Read the full file on GitHub · 226 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. 8d ago First seen · 226 lines · 84 tokens per session scan C 09e1d595a144

Subscribe to this mod's changes

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.