worktree-execution

worktree-execution is a skill for Claude Code from shinpr/rashomon. It costs 38 tokens per session (865 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 Code

Written for Claude Code: user-invocable in frontmatter.

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

Good fit Use it to create paired worktrees for prompt comparisons, run tasks against a fixed commit, detect abandoned worktrees, and clean them up.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shinpr/rashomon/worktree-execution
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.

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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for worktree-execution

Your own site · 80×15
<a href="https://agentmods.dev/skills/shinpr/rashomon/worktree-execution"><img src="https://agentmods.dev/badge/skills/shinpr/rashomon/worktree-execution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00038 $0.00865
Opus 5.5 $0.00015 $0.00346
Sonnet 5.5 $0.00008 $0.00173
Haiku 4.5 $0.00004 $0.00086

Measured 1mo ago against content hash 5e0293fc330a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 (Agent 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. 1mo ago Changed · -1 tokens per session 5e0293fc330a
  2. 1mo 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 (19 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 865 once invoked, about $0.0002 per session on Opus 5.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

commit

Smart commit with Ollama-generated messages. Conventional commits, auto-push option. Triggers on: commit this, commit changes, smart commit, /commit.

chidekina/aria-superpowers · 34 tokens

github-actions-expert

Expert guide for GitHub Actions CI/CD workflows, reusable workflows, composite actions, matrix builds, OIDC cloud auth, security hardening, and artifact automation / Panduan ahli GitHub Actions CI/CD workflows, reusable workflows, aksi komposit, autentikasi cloud OIDC, pengerasan keamanan, dan otomasi rilis.

roedyrustam/vibes-plug · 71 tokens

gear

Managing dependencies, CI/CD, advanced GitHub Actions workflows, containers, secrets, and operational config. Use for build, workflow, or environment work.

simota/agent-skills · 32 tokens

launch

Planning releases and reporting delivery work from GitHub PR history. Use when versioning, CHANGELOGs, rollout or rollback plans, engineering metrics, retrospectives, or stakeholder reports are needed.

simota/agent-skills · 40 tokens

monorepo-architect

Expert guide for designing and managing scalable monorepos using Turborepo, pnpm workspaces, and shared packages / Panduan ahli untuk merancang dan mengelola monorepo skalabel menggunakan Turborepo dan pnpm workspaces.

roedyrustam/vibes-plug · 57 tokens

guardian

Gatekeeping Git/PR by classifying change essence and recommending granularity, naming, and strategy; the ship recipe also executes PR delivery (create, CI watch, merge, cleanup) with Ask First on merge. Use when PR preparation, commit strategy, or gated PR delivery is needed.

simota/agent-skills · 62 tokens