worktree-handoff

worktree-handoff is a skill for Claude Code from hanamizuki/solopreneur. It costs 112 tokens per session (3,345 once invoked), scanned A, original, MIT.

A Git workflow that creates an isolated worktree, records task context in a plan file, and commits that handoff for a later session.

In plain words
What is it for?
Use it when starting or handing off a task that needs its own branch, worktree, plan, and committed pickup notes.
Why use it?
It lets work continue in a separate directory and gives the next session the background needed to resume without repeating the discussion.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: mentions Claude Code; mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # Three candidates, one contract. Inside the plugin the helpers sit at ../../shared/;.

Part of the solopreneur plugin — 17 skills shipped together

Good fit Use it when starting or handing off a task that needs its own branch, worktree, plan, and committed pickup notes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hanamizuki/solopreneur
agentmods
npx agentmods add skills/hanamizuki/solopreneur/worktree-handoff

Made for: Claude Code.

Or install solopreneur, the plugin that ships this one along with the rest of its 17 skills.

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-handoff

README.md
[![agentmods](https://agentmods.dev/badge/skills/hanamizuki/solopreneur/worktree-handoff/github.svg)](https://agentmods.dev/skills/hanamizuki/solopreneur/worktree-handoff)
Your own site
<a href="https://agentmods.dev/skills/hanamizuki/solopreneur/worktree-handoff"><img src="https://agentmods.dev/badge/skills/hanamizuki/solopreneur/worktree-handoff/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-handoff

Your own site · 80×15
<a href="https://agentmods.dev/skills/hanamizuki/solopreneur/worktree-handoff"><img src="https://agentmods.dev/badge/skills/hanamizuki/solopreneur/worktree-handoff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,345 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.
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.00112 $0.03345
Opus 5.5 $0.00045 $0.01338
Sonnet 5.5 $0.00022 $0.00669
Haiku 4.5 $0.00011 $0.00334

Measured 20d ago against content hash f21495e9754d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

worktree-handoff 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 20d ago.

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.

plugins/claude/solopreneur/skills/worktree-handoff/SKILL.md · 327 lines

How it starts

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

Worktree Handoff

Codex host guard

Before any other action, check whether CODEX_THREAD_ID is set. If it is, stop before creating a worktree or branch, copying configuration, changing a plan, or committing. This release supports Worktree Handoff only on Claude Code; tell the user the Codex worktree seam is not shipped yet and to run the workflow there instead.

Create an isolated workspace for a new or in-progress task, and record the complete task context into a plan file that gets committed to the branch. The next session reads the plan file to pick up without re-explanation.

Flow

Step 1: Resolve Mode and Paths

Source the cascade config helpers, then determine the operating mode:

# --- solopreneur config helpers (sourced from shared/config.sh) ---
# One real shell file, so no harness rewrites the helpers on the way to the
# shell. Claude Code replaces the ${CLAUDE_SKILL_DIR} token below when it loads
# this body; Codex does not. It is SINGLE-quoted on purpose — it is a load-time
# token, not an environment variable, and letting the shell expand the name
# would source whatever an inherited value happened to point at. Unreplaced, it
# is not a directory, so substitute the absolute path of the directory holding
# THIS SKILL.md — every harness states that path to the model.
SOLO_SKILL_DIR='${CLAUDE_SKILL_DIR}'
[ -d "$SOLO_SKILL_DIR" ] || SOLO_SKILL_DIR="<absolute path of the directory holding this SKILL.md>"
SOLO_CONFIG_SH="$SOLO_SKILL_DIR/../../shared/config.sh"
# Three candidates, one contract. Inside the plugin the helpers sit at ../../shared/;
# authoring against this repo reaches them under src/solopreneur/shared/; and a
# skill republished on its own — any flattened skills directory — carries them
# at scripts/config.sh instead, because shared/ is a sibling of skills/ and does
# not travel with a per-skill copy. Try each in order, then STOP. Sourcing a
# file that is not there does not halt the shell: every helper stays undefined,
# every config read returns empty, and the 2026-08-11 A2 run showed where that
# leads — the model "rescued" it with a repo-relative path, which resolves only
# when the repo under review happens to be this plugin's own source repo.
# Canonical authoring keeps non-skill source under src/.
[ -f "$SOLO_CONFIG_SH" ] || SOLO_CONFIG_SH="$SOLO_SKILL_DIR/../../../src/solopreneur/shared/config.sh"
[ -f "$SOLO_CONFIG_SH" ] || SOLO_CONFIG_SH="$SOLO_SKILL_DIR/scripts/config.sh"
[ -f "$SOLO_CONFIG_SH" ] || { echo "HALT: solopreneur config helpers not found under $SOLO_SKILL_DIR — stop here, do not improvise a path"; exit 1; }
source "$SOLO_CONFIG_SH"
# --- end solopreneur config helpers ---

TODOS_CONFIG=$(read_solopreneur_config todos)
PLANS_CONFIG=$(read_solopreneur_config plans)

BACKLOG=$(echo "${TODOS_CONFIG:-{}}" | jq -r '.backlog // empty')
DOING=$(echo "${TODOS_CONFIG:-{}}" | jq -r '.doing  // empty')
PLANS_DIR=$(echo "${PLANS_CONFIG:-{}}" | jq -r '.dir // empty')
PLANS_DIR="${PLANS_DIR:-docs/solopreneur/plans}"  # default
MODE=$([ -n "$BACKLOG" ] && [ -n "$DOING" ] && echo "state-machine" || echo "flat")

Read the full file on GitHub · 327 lines

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. 20d ago First seen · 327 lines · 112 tokens per session scan A f21495e9754d

Subscribe to this mod's changes

worktree-handoff is a skill published in the GitHub repository hanamizuki/solopreneur (154 stars, last pushed 3d ago), licensed MIT. It adds 112 tokens to every session and 3,345 once invoked, about $0.0004 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-09-27.