recollect-worktree
π―Skillfrom timelessco/recollect
Manages Git worktrees for Recollect development, enabling isolated PR reviews and parallel feature work with automatic dependency setup.
Installation
npx skills add https://github.com/timelessco/recollect --skill recollect-worktreeSkill Details
Manages Git worktrees for Recollect development. Creates worktrees in .worktrees/, copies .env.local, and runs pnpm install. Use when reviewing PRs in isolation or working on features in parallel.
Overview
Manage Git worktrees for isolated parallel development in the Recollect repository.
What it does:
- Creates worktrees from main branch with clear branch names
- Copies
.env.localautomatically (Supabase/Cloudflare keys) - Runs
pnpm installto make worktrees dev-ready - Lists, switches between, and cleans up worktrees
When to use:
- Code review (
/review): Isolated environment for reviewing PRs - Feature work (
/work): Parallel work on multiple features - Testing: Test a feature branch without switching
```bash
# Create a new worktree (copies .env.local, runs pnpm install)
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh create feature-name
# List all worktrees
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh list
# Switch to a worktree
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh switch feature-name
# Clean up inactive worktrees
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh cleanup
```
create
Creates new worktree with dependencies installed.
```bash
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh create feature-login
```
What happens:
- Checks if worktree already exists
- Updates base branch from remote
- Creates new worktree and branch
- Copies
.env.local - Runs
pnpm install - Shows path for cd-ing to worktree
list or ls
Lists all worktrees with their branches and status.
switch or go
Switches to an existing worktree.
cleanup or clean
Removes inactive worktrees with confirmation.
PR Review:
```bash
# Create worktree for PR review
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh create pr-664-lightbox
# Move to worktree and start dev
cd .worktrees/pr-664-lightbox
pnpm run dev
# After review, return and cleanup
cd ../..
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh cleanup
```
Parallel Development:
```bash
# Start first feature
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh create feature-a
# Start second feature
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh create feature-b
# Switch between them
bash .claude/skills/recollect-worktree/scripts/worktree-manager.sh switch feature-a
```
/review command:
- Check current branch
- If already on PR branch β stay there
- If different branch β offer worktree:
"Use worktree for isolated review? (y/n)"
- yes β call recollect-worktree skill
- no β proceed with PR diff on current branch
/work command:
- Ask: "How do you want to work?"
- New branch on current worktree (live work)
- Worktree (parallel work)
- If worktree β call recollect-worktree skill
KISS: One manager script, simple commands, sensible defaults
Opinionated Defaults:
- Worktrees from
main(unless specified) - Stored in
.worktrees/directory - Branch name becomes worktree name
.env.localcopied automaticallypnpm installruns automatically
Safety First:
- Confirms before creating/removing
- Won't remove current worktree
- Clear error messages
Directory structure:
```
.worktrees/
βββ feature-login/
β βββ .git
β βββ .env.local # Copied from main
β βββ node_modules/ # Installed via pnpm
β βββ ...
βββ pr-664-lightbox/
βββ ...
```
How it works:
- Uses
git worktree addfor isolated environments - Each worktree has its own branch
- Share git history with main repo
- Lightweight (filesystem links, no duplication)
Worktree is ready when:
- [ ]
.worktrees/directory exists/ - [ ]
.env.localis present in worktree - [ ]
node_modules/exists (pnpm install completed) - [ ]
pnpm run devstarts successfully