mstar-branch-worktree

mstar-branch-worktree is a skill for Claude Code from btspoony/mstar-harness. It costs 41 tokens per session (9,063 once invoked), scanned A, original, MIT.

A Morning Star guide for Git branches and worktrees. A worktree is a separate working directory connected to the same Git repository, allowing isolated changes.

In plain words
What is it for?
Use it when creating or assigning feature branches, setting up isolated worktrees, combining plan changes, or preparing code for quality review.
Why use it?
It keeps plans and parallel work separated and makes sure reviews examine the intended branch, directory, plan, and change range.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions AGENTS.md; mentions OpenCode.

Part of the morning-star-harness plugin — 27 skills, 9 commands, 13 agents, 2 hooks shipped together

Good fit Use it when creating or assigning feature branches, setting up isolated worktrees, combining plan changes, or preparing code for quality review.

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

Made for: Claude Code.

Or install morning-star-harness, the plugin that ships this one along with the rest of its 27 skills, 9 commands, 13 agents, 2 hooks.

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 mstar-branch-worktree

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/btspoony/mstar-harness/mstar-branch-worktree"><img src="https://agentmods.dev/badge/skills/btspoony/mstar-harness/mstar-branch-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,063 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00041 $0.09063
Opus 5.5 $0.00016 $0.03625
Sonnet 5.5 $0.00008 $0.01813
Haiku 4.5 $0.00004 $0.00906

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

Security

Grade A, and why

mstar-branch-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 yesterday.

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.

skills/mstar-branch-worktree/SKILL.md · 256 lines

How it starts

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

Load order(必读顺序)

首次 Read 本 skill 前:必须先 Read mstar-harness-core(SKILL.md)。 冲突时 以 mstar-harness-core 为准。

Spec branch naming → mstar-conventions. L1/L2 checkout isolation → Worktree isolation layers below; L2 pre-dispatch → references/parallel-writable-pre-dispatch.md. Ordinary source metadata, coordinator operations and actual serial integration → mstar-iteration/references/phase-2-worktree-lease.md. Cleanup ownership/merge/refusal rules remain solely in Worktree / branch cleanup below; no per-row claim protocol.

Scope(摘要)

  • 仅 PM 决定分支(唯一例外见 § 唯一分支决策者);其他可写角色不得自行新开分支或切回 main。
  • Assignment 须含其一(front matter 键):working_branch: <existing> | working_branch: create <new> from <base> | branch_policy: direct on <branch> — <reason>。
  • L1: Git-derived main/control root + separate recorded integration checkout + distinct row metadata.worktree_path/source branch. Atomic coordination and serial integration remain; no per-row execution lease.
  • L2(同 plan 内 ≥2 可写并发):派发 前 完成 references/parallel-writable-pre-dispatch.md(含 git worktree、绝对 worktree_path;N 次并行 invoke ≠ 已隔离)。单 plan 多轨时 L1 不替代 L2。
  • Before QC / PM Acceptance: integrate reviewed changes into one working_branch HEAD; QC and acceptance use text-identical review_cwd, plan_id, review_range / diff_basis and branch fields.

Git 功能分支、同仓并发与 Worktree 对齐

Git 功能分支门禁(业务仓库)

适用于 cwd 为 Git 托管的业务/应用仓库 且本轮会产生仓库内可合并 diff 的任务(代码、业务向测试与 fixture、影响构建或运行时的配置等)。不用于约束 ~/.config/opencode/ 全局配置目录(该目录对 agent 只读;落盘仅由用户执行)。

默认规则

  • 不得在默认保护分支(常见名:main、master;以项目约定为准)上直接实现功能改动,除非 Assignment 含显式例外。
  • 例外须在 Assignment front matter 中写明一行:branch_policy: direct on <branch> — <reason>(典型:团队约定的热修直接打默认分支)。

控制域写入(write_domain: control)

仅当 Assignment 只写控制根的 gitignored 过程目标(plans、assignments、sdd、iterations、workflows、projects、reviews、store.db)时声明 write_domain: control(取值 control | work;缺省 = work),并用 control_write_paths: [<path>, …] 列出实际要写的目标(绝对路径,或相对 worktree_path 解析;结尾的 / 显式声明目录,适用 Git 目录规则如 !.mstar/notes/;不带 / 的条目同时按文件与目录两条规则核验,两种形状都必须被忽略——任一形状会被提交即拒绝(dispatch.control-write.target-committable)。例:.mstar/** 下 .mstar/plans/run.md 两种形状都被忽略因而通过;.mstar/** + !.mstar/notes/ + !.mstar/notes/** 下 .mstar/notes 的文件路径被忽略、目录内容却仍会提交,因此被拒)。这类单子可写 worktree_path = 控制根、working_branch = 控制检出当前检出的分支(默认 main 的仓库即 main;main 只是示例,不是字面指令),豁免默认保护分支门禁;三种分支写法仍全部有效(working_branch: <existing> | create <new> from <base> | branch_policy: direct on <branch> — <reason>),声明值须与控制检出实际检出的分支一致。

Read the full file on GitHub · 256 lines

Files

What ships with it

3 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. yesterday Changed ea933fe79257
  2. 5d ago Changed be7e8812559a
  3. 10d ago Changed e92d867e7772
  4. 12d ago Changed b12a37c73a6e
  5. 16d ago Changed ef8925760d95
  6. 18d ago Changed · +2 lines 4fde7ef6f171
  7. 19d ago Changed · -34 lines 0dc0f2660536
  8. 20d ago Changed · +1 tokens per session 18391d84d866
  9. 21d ago Changed · +4 lines 719b5c0a1022
  10. 27d ago First seen · 284 lines · 40 tokens per session scan A 8c686fb47569

Subscribe to this mod's changes

mstar-branch-worktree is a skill published in the GitHub repository btspoony/mstar-harness (74 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 9,063 once invoked, about $0.0002 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-08-30.

Related

mstar-branch-worktree compared with skills from other repositories

mstar-branch-worktree next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mstar-branch-worktreebtspoony/mstar-harnessSkill74todayMITA41Claude Code
finishing-a-development-branchrpamis/cometSkill3.3kyesterdayMITA44Claude Code, Codex
using-git-worktreesrpamis/cometSkill3.3kyesterdayMITA36Claude Code, Codex
comet-archiverpamis/cometSkill3.3kyesterdayMITA35Claude Code, Codex
comet-archiverpamis/cometSkill3.3kyesterdayMITA34Codex
comet-github-pr-reviewrpamis/cometSkill3.3kyesterdayMITA69Claude Code, Codex
comet-releaserpamis/cometSkill3.3kyesterdayMITA65Claude Code, Codex