Pi Bare Worktrees — Development skill for Claude Code
Flexible and blazing-fast --bare checkout worktree support for the Pi agent harness.
How to install Pi Bare Worktrees
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open jordyvanvorselen/pi-bare-worktrees and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Pi Bare Worktrees does
Flexible and blazing-fast --bare checkout worktree support for the Pi agent harness.
Alternatives in Development
- Clean Worktree (Interactive) — Interactive cleanup of worktrees: lists merged/stale branches and asks confirmation before deleting 25.5k ★
- Worktree Cleanup — Remove worktrees and branches that have been merged: $ARGUMENTS 23.4k ★
- Cancel Pua Loop — 取消当前活跃的 PUA Loop(原子级联:state + worktree + 记录) 19.5k ★
README
pi-bare-worktrees
Git worktrees for `--bare` checkouts in [pi](https://pi.dev). One worktree per task, shared env files linked in, protected branches kept read-only, and a `worktree` tool the agent calls itself.
What it does
- Every change gets its own worktree.
mainand other protected branches are read-only. The first edit on them is blocked with a message that tells the model to callworktree create. It then continues in the new worktree without acd. - Shared env, zero config. Every file under
/.shared-env/is symlinked into each worktree at the same relative path. Real files are never overwritten. - Fast. No git process on session start or on tool calls. Root detection, worktree listing and link checks read the filesystem. Git runs only when you create, remove, clean, or in the background for the footer.
- Native. The tool shows up in the system prompt, the footer shows the active worktree, state survives
/resume, and subagents inherit the worktree.
Layout it expects
project/
├── .bare/ bare repo (core.bare = true)
├── .shared-env/ gitignored files to mirror, e.g. connect-backend/.env.keys
├── main/ worktree for main
└── feat/login/ worktree for feat/login
Path equals branch name. Create one with:
mkdir project && cd project
git clone --bare git@github.com:org/repo.git .bare
git --git-dir=.bare config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
git --git-dir=.bare fetch
git --git-dir=.bare worktree add main main
Outside this layout the extension turns itself off and says so once at startup.
Install
pi install npm:@jordyvanvorselen/pi-bare-worktrees
Then, inside a worktree:
/wt setup
Setup opens one screen with every setting prefilled: shared env directory, base branch, protected patterns, branch template, fetch before create, auto-link, post-create commands and copy list. Press Enter through the fields to keep the defaults,
Related Skills
Sciris
Fast, flexible tools to simplify scientific Python
Sync Target
Clone or fast-forward the local checkout of the target repo (cgbarlow/braintrust) into target/braintrust.
Clean Worktree
Clean stale worktrees (pruned, merged, or orphaned branches)
Tereditor
Workbench where Claude Code and Codex manage worktrees that you can see and get worktree-aware LSP and Intelli
Sdlc Wave
Run one Seeds-backed worktree wave — select ready Seeds, spawn workers in worktrees, review, reconcile
Wend
Find, recover & resume your past Claude Code sessions — fast, local, single-binary CLI + plugin. Keyword + sem
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
DevOps Systems Engineer
Systems engineer who composes PaaS and bare metal for speed and low cost — fast flight for PaaS/SaaS and onlin
Fk Orchestrator
Runs the fast-kernel optimization loop for a campaign and coordinates the other agents (profiler, kernel engin