用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/bryancostanich/Cercano --skill worktree-first命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Compute the expected result before running any simulation or sweep.
基于 SOC 职业分类
正在显示 SKILL.md
| name | worktree-first |
| description | Isolate every feature branch in its own worktree; never share the root workspace. |
Any time you're about to start a new feature or fix that needs its own
branch. If your next step is git checkout -b <newbranch> in a shared
workspace, this protocol is mandatory.
Create a worktree; never share the root workspace. The root worktree (the top-level repository directory) is a shared physical checkout — multiple concurrent sessions read from it and write to it. If you check out a feature branch in the root, every commit any other session makes in the root goes onto your branch, not the trunk.
Use the git_worktree tool. Not raw git checkout -b, not
git worktree add from the shell — the tool wraps both and adds the
safety checks (clean baseline, target dir git-ignored, trunk
resolution). Pass:
path: ../<repo-name>-<feature-slug> — a sibling
directory to the repo root, not a subdirectory of it. Sibling paths
avoid gitlink-submodule confusion (git treats a linked-worktree
directory inside the tracked tree as a submodule pointer, which
creates persistent M entries in git status on
the root as the worktree's HEAD advances). Example: for a repo at
/git_repos/foo/Cercano, a good worktree path is
/git_repos/foo/Cercano-runtime-dashboard.branch: feat/<feature-slug> or fix/<feature-slug>.trunk: the target trunk (usually main).Do all work inside the worktree. Every cd, test run, edit, and
commit lives in the isolated directory. The root stays on trunk,
untouched.
Do not git checkout <branch> in the root worktree while your
feature is active. If you need to look at trunk state, do it in the
root (which is already on trunk). If you need to look at your branch,
do it in the worktree.
The root worktree is the default directory other sessions operate in when they touch the repo. If your feature branch is checked out there:
A worktree is one tool call to create with git_worktree. It isolates
all of this at zero ongoing cost. Skipping the worktree to save one step
now trades minutes for hours of rebase conflict resolution later.
For genuinely trivial changes — a typo, a label rename, a comment fix, a one-line copy tweak — the worktree ceremony is disproportionate. The fast path is:
git checkout -b fix/<slug>.
The worktree-first watchdog check is expected to fire here; overriding
it is the fast-path escape valve, and the user is asked to authorize.git add -A.git_land. The test gate and safety refs still run —
the fast path saves worktree ceremony, not the safety guarantees.The fast path is deliberately narrow. Anything with a logic change, a new file, or touching more than a couple of files goes through the full worktree flow. When in doubt: use the worktree.