{"id":"cfdab6a9-8469-4491-a81e-2cf859a211fd","shortId":"BsqUB7","kind":"skill","title":"worktree-execution","tagline":"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.","description":"# Worktree Execution Skill\n\n## Architecture\n\nTwo isolated worktrees enable parallel prompt execution.\n\n```\nOrchestrator\n    │\n    ├── Create Worktrees (in ${TMPDIR:-/tmp}/)\n    │       ├── worktree-rashomon-original-{timestamp}\n    │       └── worktree-rashomon-optimized-{timestamp}\n    │\n    ├── Parallel Execution (Task tool)\n    │       ├── Execution 1 → worktree-rashomon-original\n    │       └── Execution 2 → worktree-rashomon-optimized\n    │\n    ├── Collect Results (await both)\n    │\n    └── Cleanup Worktrees (always)\n```\n\n## Worktree Management\n\n### Creation\n\n**Script**: `scripts/worktree-create.sh`\n\n```bash\n# Default labels (original/optimized) for prompt eval\n./scripts/worktree-create.sh [repo_root]\n\n# Custom labels for skill eval\n./scripts/worktree-create.sh [repo_root] baseline with-skill\n./scripts/worktree-create.sh [repo_root] old-version new-version\n```\n\n**Output** (stdout):\n```\n/tmp/worktree-rashomon-{label_a}-20260114-123456\n/tmp/worktree-rashomon-{label_b}-20260114-123456\n```\n\n**Properties**:\n- Location: `${TMPDIR:-/tmp}/`\n- Naming: `worktree-rashomon-{label}-{timestamp}`\n- Branch: Detached HEAD at current commit\n- Labels default to `original` / `optimized` if not specified\n\n### Cleanup\n\n**Script**: `scripts/worktree-cleanup.sh`\n\n```bash\n# Remove all rashomon worktrees\n./scripts/worktree-cleanup.sh [repo_root]\n\n# Remove specific worktrees\n./scripts/worktree-cleanup.sh [repo_root] path1 path2\n\n# Remove only orphaned worktrees (age > 1 hour)\n./scripts/worktree-cleanup.sh --orphans [repo_root]\n```\n\n**Cleanup Triggers**:\n- After successful report generation\n- In finally block on any failure\n- On timeout\n- On startup (orphan detection)\n\n## Parallel Execution Principle\n\n**Key**: To achieve true parallel execution, spawn both Task calls in a single message.\n\nThe calling command determines which agents to invoke and how to structure the Task calls. This skill provides only the worktree infrastructure.\n\n## Error Handling (Worktree Operations)\n\n| Scenario | Behavior |\n|----------|----------|\n| Creation fails | Report git error, suggest checking repository state |\n| Cleanup fails | Log warning, attempt orphan cleanup on next run |\n| Orphan detected | Force remove worktrees older than 1 hour |\n\n## Scripts Reference\n\n### worktree-create.sh\n\n| Exit Code | Meaning |\n|-----------|---------|\n| 0 | Success |\n| 1 | Not a git repository |\n| 2 | Creation failed |\n\n### worktree-cleanup.sh\n\n| Exit Code | Meaning |\n|-----------|---------|\n| 0 | Success (or nothing to clean) |\n| 1 | Not a git repository |\n| 2 | Cleanup partially failed |\n\n## Constraints\n\n- **No concurrent comparisons**: One rashomon execution per repository\n- **Git required**: git 2.5+ for worktree support\n- **Disk space**: Sufficient space for worktree copies","tags":["worktree","execution","rashomon","shinpr","agent-skills","ai-tools","claude-code","claude-code-plugin","developer-tools","evaluation","llm","prompt-engineering"],"capabilities":["skill","source-shinpr","skill-worktree-execution","topic-agent-skills","topic-ai-tools","topic-claude-code","topic-claude-code-plugin","topic-developer-tools","topic-evaluation","topic-llm","topic-prompt-engineering","topic-prompt-evaluation","topic-prompt-optimization","topic-skills"],"categories":["rashomon"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/shinpr/rashomon/worktree-execution","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add shinpr/rashomon","source_repo":"https://github.com/shinpr/rashomon","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 9 github stars · SKILL.md body (2,766 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T07:03:39.873Z","embedding":null,"createdAt":"2026-04-23T13:04:21.526Z","updatedAt":"2026-04-24T07:03:39.873Z","lastSeenAt":"2026-04-24T07:03:39.873Z","tsv":"'-123456':123,128 '-20260114':122,127 '/scripts/worktree-cleanup.sh':161,167,179 '/scripts/worktree-create.sh':93,101,108 '/tmp':47,132 '/tmp/worktree-rashomon-':119,124 '0':280,294 '1':63,177,272,282,300 '2':69,287,305 '2.5':321 'achiev':206 'age':176 'agent':223 'alway':80 'architectur':34 'attempt':259 'await':76 'b':126 'baselin':104 'bash':86,156 'behavior':245 'block':191 'branch':139 'call':213,219,232 'check':252 'clean':299 'cleanup':26,78,153,183,255,261,306 'code':278,292 'collect':74 'command':220 'commit':144 'comparison':19,312 'concurr':311 'constraint':309 'copi':331 'creat':14,43 'creation':25,83,246,288 'current':143 'custom':96 'default':87,146 'detach':140 'detect':29,200,266 'determin':221 'disk':325 'enabl':38 'environ':16 'error':240,250 'eval':92,100 'execut':3,11,32,41,59,62,68,202,209,315 'exit':277,291 'fail':247,256,289,308 'failur':194 'final':190 'forc':267 'generat':188 'git':4,249,285,303,318,320 'handl':241 'head':141 'hour':178,273 'infrastructur':239 'invok':225 'isol':8,15,36 'key':204 'label':88,97,120,125,137,145 'lifecycl':23 'locat':130 'log':257 'manag':6,21,82 'mean':279,293 'messag':217 'name':133 'new':115 'new-vers':114 'next':263 'noth':297 'old':112 'old-vers':111 'older':270 'one':313 'oper':243 'optim':56,73,149 'orchestr':42 'origin':51,67,148 'original/optimized':89 'orphan':28,174,180,199,260,265 'output':117 'parallel':9,39,58,201,208 'partial':307 'path1':170 'path2':171 'per':316 'principl':203 'prompt':10,18,40,91 'properti':129 'provid':24,235 'rashomon':50,55,66,72,136,159,314 'refer':275 'remov':157,164,172,268 'repo':94,102,109,162,168,181 'report':187,248 'repositori':253,286,304,317 'requir':319 'result':75 'root':95,103,110,163,169,182 'run':264 'scenario':244 'script':30,84,154,274 'scripts/worktree-cleanup.sh':155 'scripts/worktree-create.sh':85 'singl':216 'skill':33,99,107,234 'skill-worktree-execution' 'source-shinpr' 'space':326,328 'spawn':210 'specif':165 'specifi':152 'startup':198 'state':254 'stdout':118 'structur':229 'success':186,281,295 'suffici':327 'suggest':251 'support':324 'task':60,212,231 'timeout':196 'timestamp':52,57,138 'tmpdir':46,131 'tool':61 'topic-agent-skills' 'topic-ai-tools' 'topic-claude-code' 'topic-claude-code-plugin' 'topic-developer-tools' 'topic-evaluation' 'topic-llm' 'topic-prompt-engineering' 'topic-prompt-evaluation' 'topic-prompt-optimization' 'topic-skills' 'trigger':184 'true':207 'two':35 'use':12 'version':113,116 'warn':258 'with-skil':105 'worktre':2,5,22,31,37,44,49,54,65,71,79,81,135,160,166,175,238,242,269,323,330 'worktree-cleanup.sh':290 'worktree-create.sh':276 'worktree-execut':1 'worktree-rashomon':134 'worktree-rashomon-optim':53,70 'worktree-rashomon-origin':48,64","prices":[{"id":"ad85a82c-0ace-4b03-b9b5-08906b20ca23","listingId":"cfdab6a9-8469-4491-a81e-2cf859a211fd","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"shinpr","category":"rashomon","install_from":"skills.sh"},"createdAt":"2026-04-23T13:04:21.526Z"}],"sources":[{"listingId":"cfdab6a9-8469-4491-a81e-2cf859a211fd","source":"github","sourceId":"shinpr/rashomon/worktree-execution","sourceUrl":"https://github.com/shinpr/rashomon/tree/main/skills/worktree-execution","isPrimary":false,"firstSeenAt":"2026-04-23T13:04:21.526Z","lastSeenAt":"2026-04-24T07:03:39.873Z"}],"details":{"listingId":"cfdab6a9-8469-4491-a81e-2cf859a211fd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"shinpr","slug":"worktree-execution","github":{"repo":"shinpr/rashomon","stars":9,"topics":["agent-skills","ai-tools","claude-code","claude-code-plugin","developer-tools","evaluation","llm","prompt-engineering","prompt-evaluation","prompt-optimization","skills"],"license":"mit","html_url":"https://github.com/shinpr/rashomon","pushed_at":"2026-04-04T07:32:14Z","description":"Measure prompt and skill improvements with blind A/B comparison.","skill_md_sha":"d87b201dc6f779608e55d164df68e4af00be6fa2","skill_md_path":"skills/worktree-execution/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/shinpr/rashomon/tree/main/skills/worktree-execution"},"layout":"multi","source":"github","category":"rashomon","frontmatter":{"name":"worktree-execution","description":"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."},"skills_sh_url":"https://skills.sh/shinpr/rashomon/worktree-execution"},"updatedAt":"2026-04-24T07:03:39.873Z"}}