Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By simpleapps-comv2026.11.1MITIn 1 marketplace
Claude Code only. Worktree hooks: places worktrees at {project}/worktrees/<name> in the SimpleApps layout (or <repo>/.claude/worktrees/<name>), detached; never removes one that holds work git can see, and never forces; session end removes that session's empty worktrees.
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code only. For SimpleApps developers. It does nothing in claude.ai chat or Cowork.
A hooks plugin: Claude Code's worktree hooks (WorktreeCreate, WorktreeRemove), plus SubagentStop and SessionEnd cleanup, so claude -w <name> and subagent worktrees land where SimpleApps projects keep them and committed or tracked work is never removed:
{project}/worktrees/<name> in the SimpleApps layout ({project}/repo is the git repo), or <repo>/.claude/worktrees/<name> in a plain repo. A folder that is itself a repo wins over a nested repo/; a session started in a subfolder of a plain repo uses that repo.git worktree add --detach, so there is no local branch to clean up.git status --porcelain prints nothing, no commit in it is missing from every branch and remote, and no branch is checked out in it. A check that fails or does not finish counts as work. Removal is plain git worktree remove, never --force.git status does not show them, and git worktree remove deletes them with the worktree: an edited .env, a local database or build output in a worktree is lost when it is removed. Copy anything you need out first./clear or /resume.This hooks plugin runs scripts on your machine with your permissions. It is its own plugin, so it can be turned off on its own in /plugin.
Requires Node 22.18 or later on your PATH: the hook is TypeScript run directly by Node's type stripping.
/plugin install simpleapps-worktrees --marketplace simpleapps-com/augur-plugins
/reload-plugins
On Claude Code older than 2.1.275, add the marketplace first with /plugin marketplace add simpleapps-com/augur-plugins, then run /plugin install simpleapps-worktrees@augur.
Moving from the augur-skills marketplace: its simpleapps plugin has the same hooks. Uninstall that copy first, or both run.
Every decision is a small TypeScript function in scripts/worktree-rules.ts, proved with LemmaScript and Dafny to match a model (models/Worktrees.dfy in this repo); scripts/worktree.ts only reads files, runs git and reports.
WorktreeCreate): the name MUST match ^[A-Za-z0-9][A-Za-z0-9._-]*$ and not contain .., so it is one folder name. An existing worktree at the path is re-entered; any other folder there is refused. A new worktree starts from Claude Code's worktree.baseRef setting, read from .claude/settings.local.json, then .claude/settings.json, then your user settings: fresh (the default) starts from origin/HEAD (else origin/main, else origin/master, else local HEAD), fetching it first unless the repo fetched in the last day (10 second limit; a failed fetch only warns); head starts from the main checkout's commit. Files listed in .worktreeinclude that are also gitignored (such as .env) are copied in. When the worktree has a pnpm-lock.yaml, pnpm install --frozen-lockfile runs (not for subagent worktrees, agent-*), then lefthook's git hooks are pointed back at the main checkout.WorktreeRemove): looks only at a path git worktree list shows as a linked worktree of the repo (symlinks resolved), never the main checkout or another folder, and removes it only when it holds no work; otherwise exits non-zero so Claude Code keeps it.SubagentStop): removes the subagent's agent-<agent_id> worktree when it holds no work. That folder name was seen in use (Claude Code 2.1.322); the docs do not state it. An id that does not make a valid name is ignored.SessionEnd): removes only worktrees recorded for the ending session, outside the folder the session is in, that hold no work. It always exits 0. The session marker (claude-session in the worktree's git folder) is compared exactly, not trimmed: this hook writes the bare id, so a marker with a newline or spaces was written by something else, and that worktree is kept.git runs with GIT_TERMINAL_PROMPT=0 and, unless you set your own GIT_SSH_COMMAND, ssh -o BatchMode=yes, so a hook never waits on a password prompt.
Where it differs from Claude Code's own worktree setup (worktrees docs): head mode starts from the main checkout's commit, where Claude Code uses the current worktree's HEAD when run inside one; the fetch gives up after 10 seconds, where Claude Code's is capped at five.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub simpleapps-com/augur-plugins --plugin simpleapps-worktreesPlugins from other owners that cover similar ground