reconcile-worktrees

reconcile-worktrees is a skill for Claude Code, Codex from hams-ollo/zen-agent-skills. It costs 161 tokens per session (3,766 once invoked), scanned A, original, MIT.

A procedure for bringing changes from isolated Git worktrees back into the main working directory. A worktree is a separate checkout of the same repository, often used to let parallel tasks work independently.

In plain words
What is it for?
It helps review and land verified changes from one or more worktrees as a clean diff, without committing or merging on the user's behalf.
Why use it?
It reduces the risk of overwriting changes or combining unverified work when several worktrees need to be consolidated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit It helps review and land verified changes from one or more worktrees as a clean diff, without committing or merging on the user's behalf.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hams-ollo/zen-agent-skills/reconcile-worktrees
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 hams-ollo/zen-agent-skills --skill reconcile-worktrees
Clone the repo
git clone --depth 1 https://github.com/hams-ollo/zen-agent-skills

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 reconcile-worktrees

README.md
[![agentmods](https://agentmods.dev/badge/skills/hams-ollo/zen-agent-skills/reconcile-worktrees/github.svg)](https://agentmods.dev/skills/hams-ollo/zen-agent-skills/reconcile-worktrees)
Your own site
<a href="https://agentmods.dev/skills/hams-ollo/zen-agent-skills/reconcile-worktrees"><img src="https://agentmods.dev/badge/skills/hams-ollo/zen-agent-skills/reconcile-worktrees/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 reconcile-worktrees

Your own site · 80×15
<a href="https://agentmods.dev/skills/hams-ollo/zen-agent-skills/reconcile-worktrees"><img src="https://agentmods.dev/badge/skills/hams-ollo/zen-agent-skills/reconcile-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,766 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.00161 $0.03766
Opus 5 $0.00081 $0.01883
Sonnet 5 $0.00032 $0.00753
Haiku 4.5 $0.00016 $0.00377

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

Security

Grade A, and why

reconcile-worktrees 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.

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.

.agents/skills/reconcile-worktrees/SKILL.md · 263 lines

How it starts

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

reconcile-worktrees

Bring the verified contents of one or more isolated git worktrees into the main working tree as a clean, reviewable diff, without silently overwriting anything, without committing on the user's behalf, and without trusting that "no conflicts reported" means "safe".

This is the landing step of the kit spine: new-task authors the task files, fix-batch dispatches them to isolated worktree agents, and this skill consolidates the results. It assumes each worktree has already been through its own verification pass via verifier-agent (fix-batch's Step 6 is what runs it against every worktree in a batch). This skill is about combining already-trusted changes, not about trusting them in the first place. If a worktree has not been independently verified yet, run verifier-agent against it first. The same holds for the report the worktree arrived with: it meets fix-batch's delegate report contract, or the worktree does not land. Step 1 is where that is checked.

Landing the diff is where this skill stops, and it is not where the spine stops. A batch that has just been consolidated is the single change most likely to have invalidated the reader-facing documents, and nothing above notices, so doc-sync runs next, over the combined result rather than over any one worktree. Offer it as the natural next step when you report in Step 7, and say so even when the diff looks purely internal, since that judgment is what doc-sync exists to make.

Why this exists

Reconciling several worktrees by hand after a batch of parallel agent fixes turned out to be its own source of risk, separate from whatever the agents themselves did wrong. In the 2026-07-07 incident that motivated the fix-batch skill: task-file bookkeeping split three incompatible ways across worktrees because some agents wrote directly to the main checkout and others did not; a binary asset showed an identical phantom diff in every worktree due to an unmigrated git-lfs rule, which would have silently corrupted the file if any worktree's changes were committed with a blanket git add -A; and two worktrees both touched the same file in different, non-overlapping regions, which is safe to combine but only if you actually check that before assuming it.

Read the full file on GitHub · 263 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. 6d ago Changed · +7 lines bbd26aa19de8
  2. 10d ago First seen · 256 lines · 161 tokens per session scan A 12c5a6bfc7d4

Subscribe to this mod's changes

reconcile-worktrees is a skill published in the GitHub repository hams-ollo/zen-agent-skills (2 stars, last pushed 8d ago), licensed MIT. It adds 161 tokens to every session and 3,766 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

rig-epic

Plan and run a multi-ticket epic: decompose a feature into parent + child items and stack PRs on a shared integration branch instead of landing each on main. Use when children interleave (one item's runtime contract depends on another's incomplete state) — stacking keeps each child PR reviewable without temporarily…

agent-rig/rig · 118 tokens

approve-proposed

Atomically persist every file marked PROPOSED in the most recent prior assistant turn's ### Artifact changes block. Single-command idiom that closes the two-step latency in ADR-0001's PROPOSED-by-default contract; the user reviews proposals in Ask/Plan mode, then runs this once to write all of them. Use when the prior…

Mozurok/fhorja.dev · 161 tokens

rig-worktree

Manage isolated git worktrees: create one wired up for dev (fetch, branch from base, symlink env, install deps), list them with PR state, or safely remove merged ones. A shared bootstrap that implement-style flows can call, also usable directly. Triggers on: 'worktree', 'set up a worktree', 'new worktree', 'list…

agent-rig/rig · 103 tokens

rig-task

Implement one unit of work end-to-end — from a tracker issue OR an ad-hoc description: spec review, TDD (RED→GREEN→REFACTOR), pre-PR self-review, open a PR, then drive the review-bot loop to clean. Runs start→finish in one shot by default; start/finish are optional phases for pause/resume. Sibling to /rig-epic (one…

agent-rig/rig · 150 tokens

pr-package

Prepare a clean delivery package for GitHub from the real git diff vs an explicit base branch, persisted as PRPACKAGE.md (or PRPACKAGE. .md for multi-repo tasks). Produces branch name, commit messages, fetch, checkout, add, commit, and push commands, PR title and body, and reviewer attention points; never invents work…

Mozurok/fhorja.dev · 216 tokens

branch-commit

Return a branch name and a concise commit message (at most 2 lines) for the current task, grounded in the real git diff rather than a paraphrase of the task summary, and with --apply optionally create that commit after showing it and getting the user's confirmation in the same turn. Use when the user only needs quick…

Mozurok/fhorja.dev · 193 tokens