fork

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Fork Conversation

会话分支

Generate a context handoff for a new Claude session. No tool calls needed - synthesize from memory and output immediately.
为新的Claude会话生成上下文交接内容。无需调用工具——直接从记忆中合成并立即输出。

Output Format

输出格式

undefined
undefined

Fork Ready

分支就绪

Context Summary:
  • Working on: [one sentence - current task]
  • Files: [comma-separated paths, max 5-7, mention "+ N others" if more]
  • State: [key decisions, branch, blockers, test status - bullets if multiple]
Paste in new terminal:
bash
cd [target directory] && \
claude "/mission-control [escaped prompt here]"
This conversation continues here. The fork runs independently.
undefined
上下文摘要:
  • 当前任务:[一句话描述当前任务]
  • 文件:[逗号分隔的路径,最多5-7个,若更多则标注“+ N个其他文件”]
  • 状态:[关键决策、分支、阻塞点、测试状态——多个则用项目符号]
粘贴到新终端:
bash
cd [目标目录] && \
claude "/mission-control [转义后的提示词]"
本对话在此继续。分支会话独立运行。
undefined

Building the Command

构建命令

Always invoke
/mission-control
so the forked session starts in coordination mode:
/mission-control Context from forked conversation:
- Working on: [description]
- Files: [list]
- Key context: [important decisions, findings, state]

Continue with: [focus hint from args, or "Pick up where we left off"]
始终调用
/mission-control
,使分支会话以协调模式启动:
/mission-control 分支对话的上下文:
- 当前任务:[描述]
- 文件:[列表]
- 关键上下文:[重要决策、发现、状态]

继续执行:[参数中的重点提示,或“从上次中断处继续”]

Args Handling

参数处理

  • /fork
    - generic continuation, opens in mission-control
  • /fork debug the auth issue
    - args become the "Continue with:" line
  • /fork
    - 通用续接,以mission-control模式打开
  • /fork debug the auth issue
    - 参数将成为“继续执行:”行的内容

Permission Mode Propagation

权限模式传递

If the current session has bypass permissions enabled, propagate it to the fork:
bash
cd [dir] && \
claude --dangerously-skip-permissions "/mission-control ..."
Check your current permission context. If you're running with elevated permissions (no confirmation prompts for file edits, bash commands, etc.), include the flag so the forked session has the same capabilities.
如果当前会话启用了权限绕过功能,请将其传递到分支会话:
bash
cd [dir] && \
claude --dangerously-skip-permissions "/mission-control ..."
检查当前权限上下文。如果您正以高权限运行(文件编辑、bash命令等无需确认提示),请包含该标志,使分支会话具备相同权限。

Shell Escaping

Shell转义

  • Wrap entire prompt in double quotes
  • Escape internal double quotes as
    \"
  • Escape dollar signs as
    \$
  • Escape backticks as
    \`
  • 用双引号包裹整个提示词
  • 内部双引号转义为
    \"
  • 美元符号转义为
    \$
  • 反引号转义为
    \`

What to Include

需包含内容

  • Target directory for the forked task (may be current cwd, or different if the tangent involves another repo/location)
  • Current task (one sentence)
  • Key decisions/findings (not speculation)
  • Relevant file paths
  • Important state (branch, test status, blockers)
  • 分支任务的目标目录(可能是当前工作目录,若偏离主题的内容涉及另一个仓库/位置则为不同目录)
  • 当前任务(一句话)
  • 关键决策/发现(非推测内容)
  • 相关文件路径
  • 重要状态(分支、测试状态、阻塞点)

What NOT to Include

请勿包含内容

  • Full conversation history
  • Implementation details already in files
  • Secrets or credentials
  • Plans not yet acted on
  • Tool call history
  • 完整对话历史
  • 已在文件中的实现细节
  • 机密信息或凭据
  • 尚未执行的计划
  • 工具调用历史

Edge Cases

边缘情况

  • Conversation just started: Minimal fork, note limited context
  • Many files: Top 5-7 most relevant, note "and N others"
  • Sensitive content: Omit credentials, note they exist separately
  • 对话刚启动:极简分支,标注上下文有限
  • 文件数量多:选取最相关的5-7个,标注“和N个其他文件”
  • 敏感内容:省略凭据,标注其单独存在

Anti-patterns

反模式

  • Multi-paragraph summaries
  • Waiting for confirmation
  • Suggesting alternatives
  • Including noise from tool outputs
  • 多段落摘要
  • 等待确认
  • 建议替代方案
  • 包含工具输出中的冗余信息