fleur-worktree

fleur-worktree is a skill for Claude Code, Codex from WackyGem/Fleur. It costs 74 tokens per session (2,507 once invoked), scanned C, original, MIT.

A workflow guide for using separate Git worktrees, which are extra checkouts of one repository, when several coding tasks run at the same time.

In plain words
What is it for?
It is for creating task-specific branches and directories, coordinating parallel work, validating merges, and cleaning up completed worktrees.
Why use it?
It reduces the chance that parallel agents overwrite each other’s files, branches, or unfinished changes, while documenting what worktrees do not isolate.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md; mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is mkdir -p ../fleur-worktrees.

Good fit It is for creating task-specific branches and directories, coordinating parallel work, validating merges, and cleaning up completed worktrees.

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/WackyGem/Fleur
agentmods
npx agentmods add skills/wackygem/fleur/fleur-worktree

Made for: Claude Code, Codex.

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 fleur-worktree

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/wackygem/fleur/fleur-worktree"><img src="https://agentmods.dev/badge/skills/wackygem/fleur/fleur-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00074 $0.02507
Opus 5.5 $0.00030 $0.01003
Sonnet 5.5 $0.00015 $0.00501
Haiku 4.5 $0.00007 $0.00251

Measured 1mo ago against content hash 98225776a764, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

fleur-worktree scanned grade C with 1 finding 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.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **直接 `rm -rf` 会留下 stale metadata**:优先 `git worktree remove`,必要时再 `git worktree prune`。
docs/skills/fleur-worktree/SKILL.md · 255 lines

How it starts

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

Fleur Worktree

当同一个 fleur 仓库需要同时推进多个 Codex/agent 任务时,使用这个 skill。目标是一任务一 worktree、一任务一分支、一套明确验证和清理规则,避免 agent 互相踩文件、共享运行时状态或把未完成分支混入主工作区。

依据

  • OpenAI Codex app 公开材料强调并行 agent、内置 worktrees、隔离环境和可审阅 diff。
  • OpenAI harness engineering 文章提到让应用可按每个 Git worktree 启动,使 Codex 能为每个变更管理独立实例。
  • Git 官方 git-worktree 文档定义了 add、list、remove、prune 等生命周期命令;清理 worktree 时优先用 Git 命令而不是直接删除目录。

原则

  • 每个并行任务使用独立 worktree 和独立 branch。
  • worktree 放在仓库外部的兄弟目录,不放进 fleur/ 内部。
  • 不从脏工作区创建新任务,除非用户明确要求把当前未提交改动带过去。
  • worktree 只隔离文件系统和 Git checkout,不隔离 S3、PostgreSQL、Dagster run storage、端口、后台进程或外部 API。
  • 能串行就不伪装并行:两个任务会改同一模块、同一迁移、同一资产契约或同一运行状态时,指定 integrator 分支串行合并。
  • 合并前必须在目标分支上重新验证;合并后必须清理 worktree 和 stale metadata。

布局

主仓库:

/storage/program/fleur

推荐 worktree 根目录:

/storage/program/fleur-worktrees/

命名规则:

  • worktree 目录:<yyyymmdd>-<short-task>
  • branch:codex/<yyyymmdd>-<short-task>
  • slug 只用小写字母、数字和 -。

示例:

/storage/program/fleur-worktrees/20260531-scheduler-runner
branch: codex/20260531-scheduler-runner

创建流程

在主仓库或任意干净 worktree 中执行:

git status --short
git worktree list
git fetch --all --prune

mkdir -p ../fleur-worktrees
git worktree add -b codex/20260531-topic ../fleur-worktrees/20260531-topic HEAD

如果要基于远端主线创建,先确认默认分支名,再显式指定:

git branch --show-current
git worktree add -b codex/20260531-topic ../fleur-worktrees/20260531-topic origin/main

进入新 worktree 后先同步依赖:

cd ../fleur-worktrees/20260531-topic/pipeline
uv sync --all-packages --all-groups

环境隔离

.env 不提交。需要运行本地命令时,按任务选择:

  • 只做文档、静态代码、单测:通常不需要复制 .env。
  • 需要访问同一套外部 S3/PostgreSQL/API:可以复制或软链接 .env,但必须确认任务不会写入生产或共享状态。
  • 需要并行运行 Dagster、服务或数据库相关任务:不要共享 DAGSTER_HOME、端口、临时目录或本地数据库 schema。

Dagster 运行建议:

  • dg check defs、ruff、pyright、pytest 可在 feature worktree 内运行。
  • 物化、回填、OCR、外部 API 写入类任务默认不要从普通 feature worktree 执行。
  • 如果确实要在 worktree 中运行 Dagster,使用该 worktree 自己的 .dagster,并在命令前显式设置 DAGSTER_HOME="$PWD/.dagster"。
  • 任何涉及真实 S3/PostgreSQL 写入的操作,先使用 docs/skills/fleur-dagster-backfill-runbook/SKILL.md 判断是否应该切回主工作区或专用 ops worktree。

Read the full file on GitHub · 255 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. 1mo ago First seen · 255 lines · 74 tokens per session scan C 98225776a764

Subscribe to this mod's changes

fleur-worktree is a skill published in the GitHub repository WackyGem/Fleur (138 stars, last pushed 15d ago), licensed MIT. It adds 74 tokens to every session and 2,507 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.