mk:worktree

mk:worktree is a skill for Claude Code from ngocsangyem/MeowKit. It costs 19 tokens per session (1,672 once invoked), scanned A, original, MIT.

A Git worktree manager for giving parallel coding tasks separate working directories and branches. Git worktrees let multiple branches be checked out at once without sharing the same files.

In plain words
What is it for?
Use it to create isolated worktrees, merge their branches, and remove unused worktrees.
Why use it?
Separate worktrees reduce file conflicts between parallel agents and make it possible to merge completed work back with conflict detection.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to create isolated worktrees, merge their branches, and remove unused worktrees.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ngocsangyem/meowkit/worktree
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 ngocsangyem/MeowKit --skill worktree
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

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 mk:worktree

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/worktree"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,672 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.00019 $0.01672
Opus 5.5 $0.00008 $0.00669
Sonnet 5.5 $0.00004 $0.00334
Haiku 4.5 $0.00002 $0.00167

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

Security

Grade A, and why

mk:worktree 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 today.

The scan reads SKILL.md. This mod also ships 6 executable files (eval/fixtures/plain-repo/src/app.js, scripts/lib/worktree-git-helpers.cjs, scripts/lib/worktree-ownership.cjs, …), 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.

.claude/skills/worktree/SKILL.md · 128 lines

How it starts

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

Git Worktree Manager

Manages git worktrees for parallel agent isolation. Each parallel agent works in its own worktree to prevent file conflicts. Backed by scripts/worktree.cjs.

See references/commands.md for full option reference and JSON field docs.

Actions

create

Pre-flight: get repo info, then create a parallel worktree.

# Step 1: verify repo state
node ${CLAUDE_SKILL_DIR}/scripts/worktree.cjs info --json

# Step 2: create parallel agent worktree
node ${CLAUDE_SKILL_DIR}/scripts/worktree.cjs create "{agent-name}" --orchestrated --json

Every worktree lands under <main checkout>/.worktrees/, also when the script runs inside a linked worktree; --worktree-root or WORKTREE_ROOT overrides it, with a warning. The script writes .worktrees/.gitignore (*) itself, so the user's .gitignore is never edited.

The orchestrated worktree is .worktrees/{agent-name} on branch parallel/{agent-name}-{timestamp} per .claude/skills/cook/references/parallel-execution-rules.md Rule 3. It starts from the branch you are on, so the agent has that branch's commits; --base <branch> overrides it, and a detached HEAD stops with DETACHED_HEAD. Give the returned worktreePath to the agent as its working directory. Also give it its own TMPDIR: the returned tmpDir, <main checkout>/.worktrees/.tmp/{agent-name}, which create makes and remove deletes. It is outside the worktree, so temp files never show in its tree, and already ignored. Heavy commands follow .claude/skills/verify/references/heavy-commands.md (beta).

merge

Merge a completed parallel branch back to the feature branch using no-fast-forward:

git merge --no-ff {branch} -m "merge: parallel/{agent-name} into {feature-branch}"

On conflict: list the conflicting files, stop and report to the lead (see Gotchas).

On success: run the full test suite (.claude/skills/cook/references/parallel-execution-rules.md Rule 5). After integration test passes, delegate to project-manager (background):

Read the full file on GitHub · 128 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. today Changed · +2 lines eba36fd515a2
  2. yesterday Changed · +4 lines 49e8569e88d7
  3. 2d ago Changed · +2 lines a4ee3366e516
  4. 4d ago Changed · -46 lines 5a4ac8e0376a
  5. 7d ago Changed · -16 lines · -7 tokens per session 98dacdab2217
  6. 12d ago Changed · -4 tokens per session d98c39c87e4f
  7. 19d ago First seen · 182 lines · 30 tokens per session scan A db9e40630ad2

Subscribe to this mod's changes

mk:worktree is a skill published in the GitHub repository ngocsangyem/MeowKit (17 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 1,672 once invoked, about $0.0001 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-11.

Related

mk:worktree compared with skills from other repositories

mk:worktree next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mk:worktreengocsangyem/MeowKitSkill17todayMITA19Claude Code
check-a-stale-branch-is-not-undoing-newer-main-workwan-huiyan/agent-traffic-controlSkill34d agoMITA116Claude Code
control-towerwan-huiyan/agent-traffic-controlSkill34d agoMITA50Claude Code
docs-branch-off-feature-branch-smuggles-codewan-huiyan/agent-traffic-controlSkill34d agoMITA457Claude Code
pr-conflict-from-mid-flight-mergeswan-huiyan/agent-traffic-controlSkill34d agoMITA146Claude Code
prep-pr-close-keyword-auto-closes-issuewan-huiyan/agent-traffic-controlSkill34d agoMITA493Claude Code
session-handoff-number-collision-with-unmerged-siblingwan-huiyan/agent-traffic-controlSkill34d agoMITA475Claude Code