mstar-branch-worktree

mstar-branch-worktree is a skill for Claude Code from btspoony/mstar-harness. It costs 166 tokens per session (7,617 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 — 23 skills, 5 commands, 14 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 23 skills, 5 commands, 14 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 166 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,617 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.00166 $0.07617
Opus 5 $0.00083 $0.03809
Sonnet 5 $0.00033 $0.01523
Haiku 4.5 $0.00017 $0.00762

Measured 11d ago against content hash 3ab919864831, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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.

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

How it starts

The opening of the file, as written. The whole thing — 237 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 多 plan 命名iteration_base_branchspec_integration_branchtarget_branch PR 门禁)→ mstar-conventionsL1/L2 worktree 分层(迭代 control vs feature、plan 内并行轨)→ 下文 「Worktree isolation layers」L2 同仓并行可写派发前清单 → references/parallel-writable-pre-dispatch.md;迭代 lease claim/merge 细则 → mstar-iteration references/phase-2-worktree-lease.md(勿在本 skill 重复完整协议表)。下文为分支与 QC/QA 检出对齐主文。

Scope(摘要)

  • 仅 PM 决定分支;其他可写角色不得自行新开分支或切回 main
  • Assignment 须含其一Working branch: <existing> | create <new> from <base> | Branch policy: direct on <branch> — <reason>
  • L1(跨 plan / 迭代 Phase 2):control worktree(snapshot control_worktree_path,检出 spec_integration_branch)+ 每 plan 独立 feature worktree(execution_lease.worktree_path control 路径)+ lease;见 「Worktree isolation layers」
  • L2(同 plan 内 ≥2 可写并发):派发 完成 references/parallel-writable-pre-dispatch.md(含 git worktree、绝对 Worktree pathN 次并行 invoke ≠ 已隔离)。单 plan 多轨时 L1 不替代 L2
  • QC/QA 前:待审提交归并到 单一 Working branch HEAD;三审 + QA 共用一套 Review cwd + plan_id + Review range / Diff basis(逐字相同)。

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

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

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

默认规则

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

<base> 与叠分支(stacked branches)

  • 门禁的目标是不在未授权的默认分支上直接提交,不是「只能从 main 开新分支」。
  • 当需要从已有功能分支继续拆新分支时,Assignment 应写清祖先分支 <base>,例如:create feature/foo-part2 from feature/foo
  • <base> 可取main / master(或项目默认分支名)、任意已存在的 feature/* / fix/*、远程跟踪分支名、或 current(表示以执行者检出时的 HEAD 为祖先,用于「就在当前分支上再拉一枝」)。
  • 若只写 Working branch: feature/foo且无「create … from …」:表示沿用 / 切到该已存在分支上开发,不要求新建。
  • 若写新建但未写 <base>:实现侧应停下问 project-manager(或按项目 AGENTS.md 的默认 base);禁止擅自假设「一定是 main」。

Read the full file on GitHub · 237 lines

Files

What ships with it

1 file 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. 11d ago First seen · 237 lines · 166 tokens per session scan A 3ab919864831

Subscribe to this mod's changes

mstar-branch-worktree is a skill published in the GitHub repository btspoony/mstar-harness (58 stars, last pushed today), licensed MIT. It adds 166 tokens to every session and 7,617 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-30.

Related

Other skills, from other repositories