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.
npx skills add wsauret/flywheel --skill worktree-lifecyclegit clone --depth 1 https://github.com/wsauret/flywheelWrote 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.
[](https://agentmods.dev/skills/wsauret/flywheel/worktree-lifecycle)<a href="https://agentmods.dev/skills/wsauret/flywheel/worktree-lifecycle"><img src="https://agentmods.dev/badge/skills/wsauret/flywheel/worktree-lifecycle/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.
<a href="https://agentmods.dev/skills/wsauret/flywheel/worktree-lifecycle"><img src="https://agentmods.dev/badge/skills/wsauret/flywheel/worktree-lifecycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.00976 |
| Opus 5.5 | $0.00004 | $0.00390 |
| Sonnet 5.5 | $0.00002 | $0.00195 |
| Haiku 4.5 | $0.00001 | $0.00098 |
Grade A, and why
worktree-lifecycle 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Lifecycle
A worktree is temporary isolation, not disposable work. Preserve ownership, destination, and every diff until integration is proved.
Input and ownership
Start with create or adopt action, canonical path, branch or base, intended destination, integration method, and owner. Record these before mutation. Require Bash and Git before mutation, use a stable sibling path, and never overwrite existing work or place a worktree in disposable session storage.
A check-only worktree is detached at one commit and exists only to run gates, for example when the shared checkout cannot build. You may copy uncommitted files into it. It holds no work of its own, so its creator removes it before handoff.
Method
- Create or adopt the worktree and keep its ownership record current. Create a new worktree from a freshly fetched destination tip. In a new worktree, install dependencies from the lockfile before the first gate. Post the full absolute path of the worktree to the user as soon as it exists, so that they can open it in a file manager and inspect its files and diffs.
- Keep work durable through commits or an explicit handoff before the owner exits.
- After a rebase with conflicts, compare the old and new commits with
git range-diffand confirm that each change from the destination side in the conflicted files survives. - Before final verification, fetch the destination and rebase onto its tip. When the base changed, run the gates again, because verification on the old base does not cover the rebased tree. {{if:persona:ship&type:general}}
- When publication is required, dispatch
shiponce without forked history in the existing worktree. Send the files to publish and a short summary of user intent and implemented design. Add a destination only when it differs from the normal push target. Keep integration and cleanup ownership in the parent, consume Ship's publication evidence, then resume destination integration and cleanup. When the parent's integration advances the remote destination, bring that branch's local checkout to the new tip withgit merge --ff-only; when Git refuses, leave that checkout untouched. {{end}} {{if:persona:ship&!type:general}} - When publication is required, dispatch
shiponce in the existing worktree. Send the files to publish and a short summary of user intent and implemented design. Add a destination only when it differs from the normal push target. Keep integration and cleanup ownership in the parent, consume Ship's publication evidence, then resume destination integration and cleanup. When the parent's integration advances the remote destination, bring that branch's local checkout to the new tip withgit merge --ff-only; when Git refuses, leave that checkout untouched. {{end}} {{if:!persona:ship}} - When publication is required, publish the selected files yourself from the existing worktree: commit them whole and push the branch to the destination, adding a destination only when it differs from the normal push target. Keep the commit and the pushed remote ref as publication evidence, then resume destination integration and cleanup. When the parent's integration advances the remote destination, bring that branch's local checkout to the new tip with
git merge --ff-only; when Git refuses, leave that checkout untouched. {{end}} - Consume fresh verification evidence. Run only lifecycle-specific clean-state and destination-containment proofs here.
- Prove ancestry where applicable with
git merge-base --is-ancestor <commit> <destination>. - Remove only the owned worktree after integration proof and a clean safety check, using
git worktree remove <path>without force. A check-only worktree is integrated when every path thatgit status --porcelainlists in it is byte-identical to the published commit or to the shared checkout; remove that worktree only withgit worktree remove --force <path>.
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.
- 2d ago Changed · +2 lines 5dbfe3ec7a7a
- 20d ago Changed · +4 lines e697fcc8fafc
- 22d ago Changed · +4 lines 6a2277173eb7
- 28d ago First seen · 31 lines · 10 tokens per session scan A adb5a571bdf7
worktree-lifecycle is a skill published in the GitHub repository wsauret/flywheel (19 stars, last pushed today), licensed Apache-2.0. It adds 10 tokens to every session and 976 once invoked, about $0.0000 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-11-03.
worktree-lifecycle compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| worktree-lifecyclewsauret/flywheel | Skill | 19 | today | Apache-2.0 | A | 10 | Claude Code, Codex |
| codew-release-qa-sweepHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 31 | Claude Code, Codex |
| gh-find-prsHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 27 | Claude Code, Codex |
| contributor-onboardingHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 57 | Claude Code, Codex |
| gh-close-issuesHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 32 | Claude Code, Codex |
| gh-credit-harvestHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 30 | Claude Code, Codex |
| gh-assign-issuesHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 24 | Claude Code, Codex |