Loading...
Loading...
Compare original and translation side by side
git-worktreeusing-git-worktreesgit-worktreeusing-git-worktrees| Component | What's Verified |
|---|---|
| compound-engineering SKILL.md | "Claude Code + Worktree Working Directory" section |
| compound-engineering worktree-manager.sh | "Open a NEW Claude Code instance" banner after create |
| superpowers SKILL.md | "Launch Claude Code" in step 5 report |
| PreCompact hook | |
| 组件 | 验证内容 |
|---|---|
| compound-engineering SKILL.md | "Claude Code + Worktree工作目录"章节 |
| compound-engineering worktree-manager.sh | 创建后显示“打开新的Claude Code实例”提示 |
| superpowers SKILL.md | 第5步报告中的“启动Claude Code”部分 |
| PreCompact钩子 | 确保 |
bash ~/.claude/scripts/verify-worktree-plugins.shbash ~/.claude/scripts/verify-worktree-plugins.shbash ~/.claude/scripts/verify-worktree-plugins.sh --patchbash ~/.claude/scripts/verify-worktree-plugins.sh --patch--patch~/.claude/hooks/context-compression-hook.tsgetWorktreeContext()git rev-parse --git-dir/worktrees/<system-reminder>import { execSync } from "node:child_process";
function getWorktreeContext(): string | null {
// Check git-dir for "/worktrees/" to detect worktree
// Return formatted context string with branch, path, main repo
// Return null if not in a worktree
}
// In main(): call getWorktreeContext() and console.log if non-null--patch~/.claude/hooks/context-compression-hook.tsgetWorktreeContext()git rev-parse --git-dir/worktrees/<system-reminder>import { execSync } from "node:child_process";
function getWorktreeContext(): string | null {
// 检查git-dir是否包含"/worktrees/"以检测worktree
// 返回包含分支、路径和主仓库的格式化上下文字符串
// 若不在worktree中则返回null
}
// 在main()中:调用getWorktreeContext(),若结果非空则console.logcdcd /path && claudecdcd /path && claudecompound-engineeringsuperpowerscompound-engineeringsuperpowers