一键导入
branch-init
Initialize a new branch with worktree, BRANCH.md from template, and environment setup
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initialize a new branch with worktree, BRANCH.md from template, and environment setup
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Close a branch — final validation, PR creation, merge, archive plan file
Run a source adapter against fixture data and verify the extracted output
Run lot gate checks — typecheck, lint, and scoped tests for the current lot
Update rules and skills after a branch merges — absorb learnings, refine patterns
Verify modified files against branch allowed/forbidden/conditional paths
Bootstrap a new source-feasibility spike in packages/radar-sources/src/sources/_spikes/
| name | branch-init |
| description | Initialize a new branch with worktree, BRANCH.md from template, and environment setup |
| allowed-tools | Read Write Bash Glob |
Workflow skill to initialize a new branch with a clean worktree, a plan/NN-BRANCH_<slug>.md from the template, and a unique port mapping.
Pick the next branch number from PLAN.md and the type (feat / fix / chore / refacto / docs).
Create the worktree
git worktree add tmp/<slug> -b <type>/<slug> main
Verify the branch
git -C tmp/<slug> branch --show-current
Must output <type>/<slug>. Abort if mismatch.
Read the template
Read plan/BRANCH_TEMPLATE.md in full. This is the formatting contract.
Create the branch plan file
Write plan/NN-BRANCH_<type>-<slug>.md from the template with:
Makefile, docker-compose*.yml, rules/**, CLAUDE.md, AGENTS.md, GEMINI.md, plan/NN-BRANCH_*.md (other branches).BRxx-EXn.Allocate ports based on branch index
API_PORT=88<nn> (e.g., 8801, 8802, …).UI_PORT=53<nn> (e.g., 5301, 5302, …).MAILDEV_UI_PORT=11<nn> (e.g., 1101, 1102, …).
Record the allocation in the branch plan file (Lot 0). Check PLAN.md to avoid collisions with active branches.Commit
cd tmp/<slug>
git add plan/NN-BRANCH_<type>-<slug>.md
make commit MSG="chore: init branch plan for <type>/<slug>"
git add . or git add -A.ENV must be last argument in all make commands.plan/BRANCH_TEMPLATE.md structure exactly — no ### headers, no prose dumps, checkbox-only tasks.