Worktree execution
Git worktree management for isolated parallel prompt execution. Use when creating isolated environments for prompt comparison or managing worktree lifecycle. Provides creation, cleanup, and orphan detection scripts.From its SKILL.md
npx -y skills add shinpr/rashomon --skill worktree-executionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- reads credentialsReads from 1 credential source: `RASHOMON_LEASE_SECONDS`.
- 17 stars17 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 7 commands, including `./scripts/worktree-create.sh [repo_root]` and 6 more.
SKILL.md
3.6 KB, 797 tokens by cl100k_base, as published. Nobody here has run it
Worktree Execution Skill
Architecture
Two isolated worktrees enable parallel prompt execution.
Orchestrator
│
├── Create Worktrees (in ${TMPDIR:-/tmp}/)
│ ├── worktree-rashomon-original-{timestamp}
│ └── worktree-rashomon-optimized-{timestamp}
│
├── Parallel Execution (Task tool)
│ ├── Execution 1 → worktree-rashomon-original
│ └── Execution 2 → worktree-rashomon-optimized
│
├── Collect Results (await both)
│
└── Cleanup Worktrees (always)
Worktree Management
Creation
Script: scripts/worktree-create.sh
# Default labels (original/optimized) for prompt eval
./scripts/worktree-create.sh [repo_root]
# Custom labels for skill eval
./scripts/worktree-create.sh [repo_root] baseline with-skill
./scripts/worktree-create.sh [repo_root] old-version new-version
# Pin every pair in an evaluation run to the same commit
./scripts/worktree-create.sh [repo_root] trial-a trial-b [base_sha]
Output (stdout):
/tmp/worktree-rashomon-{label_a}-20260114-123456
/tmp/worktree-rashomon-{label_b}-20260114-123456
Properties:
- Location:
${TMPDIR:-/tmp}/ - Naming:
worktree-rashomon-{label}-{timestamp} - Branch: Detached HEAD at the pinned base commit
- Base commit: Caller-supplied SHA, resolved once per evaluation
- Active marker: Git worktree lock containing run ID, owner PID, start time, and lease expiry
- Labels default to
original/optimizedif not specified
Cleanup
Script: scripts/worktree-cleanup.sh
# Remove all rashomon worktrees
./scripts/worktree-cleanup.sh [repo_root]
# Remove specific worktrees
./scripts/worktree-cleanup.sh [repo_root] path1 path2
# Remove registered orphaned worktrees, including expired Rashomon locks
./scripts/worktree-cleanup.sh --orphans [repo_root]
Cleanup Triggers:
- After successful report generation
- In finally block on any failure
- On timeout
- On startup (orphan detection)
Parallel Execution Principle
Key: To achieve true parallel execution, spawn both Task calls in a single message.
The calling command determines which agents to invoke and how to structure the Task calls. This skill provides only the worktree infrastructure.
Error Handling (Worktree Operations)
| Scenario | Behavior |
|---|---|
| Creation fails | Report git error, suggest checking repository state |
| Cleanup fails | Log warning, attempt orphan cleanup on next run |
| Unlocked orphan | Remove registered Rashomon worktree after 1 hour |
| Crashed locked run | Remove after owner disappearance plus orphan age, or after lease expiry |
| Active long run | Set RASHOMON_LEASE_SECONDS before creation so the lease covers the run |
Scripts Reference
worktree-create.sh
| Exit Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Not a git repository |
| 2 | Creation failed |
worktree-cleanup.sh
| Exit Code | Meaning |
|---|---|
| 0 | Success (or nothing to clean) |
| 1 | Not a git repository |
| 2 | Cleanup partially failed |
Constraints
- No concurrent comparisons: One rashomon execution per repository
- Git required: A version supporting
git worktree lock - Disk space: Sufficient space for worktree copies
What ships with it: 2 files
9.7 KB alongside SKILL.md, 2 of them executable
scripts/
- worktree-cleanup.shruns5.9 KB
- worktree-create.shruns3.8 KB
Gives 0 of the 12 instructions most agent orchestration skills give in 797 tokens
Counted across 848 of the 1,300 authors here whose files we hold, read 2026-09-06
- Dispatch one agent per independent problem domainin 56 of 848, across 42 files
- Run full test suite after integrationin 55 of 848, across 42 files
- Verify fixes do not conflictin 40 of 848, across 32 files
- Review each summary when agents returnin 40 of 848, across 31 files
- Write a handoff document summarising the current conversationin 30 of 848, across 25 files
- Reference existing artifacts by path or URLin 26 of 848, across 24 files
- Give each agent a specific scopein 19 of 848, across 10 files
- Give each agent a clear goalin 19 of 848, across 10 files
- Include a suggested skills section in the documentin 18 of 848, across 16 files
- Tailor the doc to the user argumentsin 18 of 848, across 15 files
- Issue all subagent dispatches in the same responsein 17 of 848, across 11 files
- Use git worktrees for isolationin 17 of 848, across 8 files
Said here and by no other author read
- Spawn tasks in a single message
- Clean up worktrees after report generation
- Clean up worktrees on timeout
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.