Skip to main content
在 Manus 中运行任何 Skill
一键导入

worktree-write-abs-path-lands-in-parent-checkout

星标2
分支0
更新时间2026年7月8日 11:09

In a git worktree session, a Write/Edit whose absolute path points at the MAIN-REPO ROOT (the parent checkout) silently creates the file in that parent checkout's working tree — on whatever branch it has checked out — NOT in your worktree on your feature branch. The file then doesn't appear in `git status` on your branch and `ls`/Read inside the worktree can't find it. Use when: (1) the environment's "Primary working directory" is a worktree at `<repo>/.claude/worktrees/<name>/`, (2) you're about to Write or Edit a file by ABSOLUTE path (handoff doc, generated artifact, new source file), (3) you habitually type the repo's canonical root path (`/.../<repo>/docs/...`) instead of the worktree path (`/.../<repo>/.claude/worktrees/<name>/docs/...`), (4) a later step reports "file does not exist" / a commit is missing files you "just wrote" / `git status` is unexpectedly clean. Trap: the main repo root is a real, writable checkout; writing there succeeds silently and pollutes the parent's working tree (often on a s

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly