worktree-execution

worktree-execution is a skill for Claude Code, Codex from shinpr/rashomon. It costs 39 tokens per session (864 once invoked), scanned A, original, MIT.

A toolset for managing separate Git worktrees during parallel prompt executions. A Git worktree is an additional working folder linked to the same repository, allowing isolated changes without switching the main folder.

In plain words
What is it for?
Use it to create paired worktrees for prompt comparisons, run tasks against a fixed commit, detect abandoned worktrees, and clean them up.
Why use it?
It keeps competing runs separate and provides a consistent way to create, identify, and clean up their working folders.

Skill for Claude CodeCodex

Part of the rashomon plugin — 5 skills, 7 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/shinpr/rashomon/worktree-execution
Any agent
npx skills add shinpr/rashomon --skill worktree-execution
Clone the repo
git clone --depth 1 https://github.com/shinpr/rashomon

Made for: Claude Code, Codex.

Or install rashomon, the plugin that ships this one along with the rest of its 5 skills, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for worktree-execution

README.md
[![agentmods](https://agentmods.dev/badge/skills/shinpr/rashomon/worktree-execution.svg)](https://agentmods.dev/skills/shinpr/rashomon/worktree-execution)
Your own site
<a href="https://agentmods.dev/skills/shinpr/rashomon/worktree-execution"><img src="https://agentmods.dev/badge/skills/shinpr/rashomon/worktree-execution.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 864 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00864
Opus 5 $0.00019 $0.00432
Sonnet 5 $0.00008 $0.00173
Haiku 4.5 $0.00004 $0.00086

Measured 3d ago against content hash c52f3fbb474b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

worktree-execution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/worktree-cleanup.sh, scripts/worktree-create.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/worktree-execution/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 / optimized if 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

Read the full file on GitHub · 121 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 121 lines · 39 tokens per session scan A c52f3fbb474b

Subscribe to this mod's changes

worktree-execution is a skill published in the GitHub repository shinpr/rashomon (18 stars, last pushed 3d ago), licensed MIT. It adds 39 tokens to every session and 864 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

interview-me

Deep-dive spec interviewer. Reads a file, GitHub issue, or requirement, analyzes it against the codebase, then conducts a rigorous 1-on-1 interview using AskUserQuestion to produce a comprehensive, opinionated specification document. Acts as a collaborative architect with active pushback. Also runs --verify to detect…

Sorbh/interview-me · 79 tokens

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

sinhoneyy/master-skills · 47 tokens

shadcn-ui

Complete shadcn/ui component library guide including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind CSS, or implementing UI patterns like buttons…

chidekina/aria-superpowers · 73 tokens

nodejs-backend-patterns

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

chidekina/aria-superpowers · 58 tokens

turborepo

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines…

chidekina/aria-superpowers · 111 tokens

postgresql-table-design

Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

chidekina/aria-superpowers · 31 tokens