flow-next-worktree-kit

flow-next-worktree-kit is a skill for Claude Code, Codex from gmickel/flow-next. It costs 43 tokens per session (520 once invoked), scanned A, original, MIT.

A toolkit for managing Git worktrees, which are separate working folders connected to one repository. It also copies environment files such as .env files into a worktree.

In plain words
What is it for?
Use it to create, list, switch between, and clean up worktrees, or copy environment files into one.
Why use it?
It keeps parallel feature work and reviews separated, reducing branch and workspace mix-ups.

Skill for Claude CodeCodex

Part of the flow-next plugin — 32 skills, 29 commands, 25 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/gmickel/flow-next/flow-next-worktree-kit
Any agent
npx skills add gmickel/flow-next --skill flow-next-worktree-kit
Clone the repo
git clone --depth 1 https://github.com/gmickel/flow-next

Made for: Claude Code, Codex.

Or install flow-next, the plugin that ships this one along with the rest of its 32 skills, 29 commands, 25 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 flow-next-worktree-kit

README.md
[![agentmods](https://agentmods.dev/badge/skills/gmickel/flow-next/flow-next-worktree-kit.svg)](https://agentmods.dev/skills/gmickel/flow-next/flow-next-worktree-kit)
Your own site
<a href="https://agentmods.dev/skills/gmickel/flow-next/flow-next-worktree-kit"><img src="https://agentmods.dev/badge/skills/gmickel/flow-next/flow-next-worktree-kit.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 520 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.1 $0.00043 $0.00520
Opus 5 $0.00022 $0.00260
Sonnet 5 $0.00009 $0.00104
Haiku 4.5 $0.00004 $0.00052

Measured 6d ago against content hash 683827af1f9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

flow-next-worktree-kit 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/worktree.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.

plugins/flow-next/codex/skills/flow-next-worktree-kit/SKILL.md · 37 lines

What it actually says

Worktree kit

Use the manager script for all worktree actions.

bash "${CODEX_HOME:-$HOME/.codex}/scripts/worktree.sh" <command> [args]

Commands:

  • create <name> [base]
  • list
  • switch <name> (prints the worktree path; it cannot change your shell's directory - use cd "$(... switch <name>)")
  • cleanup [<name>...] [--yes] (no args = interactive; names skip the prompt; --yes skips the confirmation, required off a terminal)
  • copy-env <name>

Safety notes:

  • create does not change the current branch
  • create sets no upstream on the new branch (--no-track) - under the upstream-based push modes (simple, upstream, current) a bare git push cannot aim at the base branch; under the default push.default=simple (without push.autoSetupRemote) the first push needs git push -u origin <name> (legacy push.default=matching pushes all name-matched branches regardless of upstream)
  • cleanup does not force-remove worktrees and does not delete branches
  • cleanup deletes the worktree directory (including ignored files); removal fails if the worktree is not clean
  • .env* is copied with no overwrite (symlinks skipped)
  • refuses to operate if .worktrees/ or any worktree path component is a symlink
  • copy-env only targets registered worktrees
  • origin fetch is optional; local base refs are allowed
  • fetch from origin only when base looks like a branch
  • Worktrees live under .worktrees/
  • create initializes .worktrees/.gitignore (* plus !.gitignore) when absent, so git add -A cannot stage nested worktrees as gitlinks; existing custom ignore files are preserved

Shared claim state. Parallel agents in sibling worktrees driving flowctl on the same repo share claim state via .git/flow-state. Set FLOW_STATE_DIR per agent (outside the tree) when running flow pipelines concurrently.

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. 6d ago First seen · 37 lines · 43 tokens per session scan A 683827af1f9e

Subscribe to this mod's changes

flow-next-worktree-kit is a skill published in the GitHub repository gmickel/flow-next (691 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 520 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

exec

Execute plan tasks sequentially using subagents. Use when user says 'exec', 'execute plan', 'run plan', or wants to implement a plan file task by task with isolated subagents.

umputun/cc-thingz · 41 tokens

pr

Comprehensive PR/issue review - analyzes architecture, tests, identifies unrelated changes mixed in, drafts review comment or issue comment. Use when user asks to review a PR, check a PR, look at PR changes, or comment on an issue.

umputun/cc-thingz · 51 tokens

project-execution

Executes implementation plans with progress tracking, checkpoint validation, and quality gates. Use after planning is complete and tasks are ready to implement.

athola/claude-night-market · 31 tokens

backlog

Read, work, and maintain a Git repo's deferred-work items in docs/backlog/, one file per item. Use when the user says "backlog", "check backlog", "what's on my backlog", "work the backlog", "address the backlog", "add to backlog", "clean up backlog", or when a review or task produced items that are real but not being…

umputun/cc-thingz · 96 tokens

ask-codex

Consult OpenAI Codex for investigation, debugging, or code review. Use when user explicitly asks to "ask codex", "check with codex", "codex review", or as a last resort when stuck after 4+ failed attempts at debugging, investigation, or bug fix and completely out of ideas. Codex is slow (2-5 min), so only escalate…

umputun/cc-thingz · 103 tokens

clarify

This skill should be used when user appears confused, frustrated, or shows misalignment between expectations and reality. Triggers on phrases like "I don't understand", "this doesn't make sense", "confused", "wait, shouldn't it...", "why is this happening", "I thought X did Y", contradictory statements, or frustration…

umputun/cc-thingz · 91 tokens