用途
Copilot 是一个模式切换技能,用于让 Claude Code 进入 copilot 模式——由人类主导、Claude 辅助。它通过共享模式控制器把模式设置为 copilot,并放宽部分默认约束。
主要能力
- 将工作模式设置为 copilot(人类驱动、Claude 辅助)。
- 放宽 worktree 强制要求。
- 允许在 main 分支上提交。
- 激活后输出确认信息,包括模式、放宽项、工作流与 TTL。
使用方式
该技能是共享模式控制器的一个别名,控制器当前由 /autonomous 拥有。激活命令为:
REPO_ROOT="$(git rev-parse --show-toplevel)"
"$REPO_ROOT/.agents/skills/autonomous/scripts/set-mode.sh" copilot
如果脚本不存在,应告知用户:"This project doesn't have mode switching scripts. Install the ai-env template or add set-mode.sh manually." 如果因其他原因失败,则向用户显示错误信息并停止。
激活后打印:
Mode: copilot
Relaxed: worktree requirement, main branch protection
Workflow: menu mode — tell me to follow it or just lead
TTL: 4h sliding (renews on each prompt) / 12h absolute ceiling
行为上遵循 .claude/rules/operating-mode.md 中的 copilot 模式规则。当前任务或计划完成后,用 /autonomous 恢复。
适用场景
适用于希望在 Claude Code 中由人类主导、Claude 辅助协作,并需要放宽 worktree 与 main 分支保护限制的开发工作流。
限制
- 仅适用于 Claude Code 的强制机制;Codex 和 Cursor 默认自主运行,除非未来有适配器使用此共享控制器。
- 模式是一个具有明确取值的设置:autonomous 和 copilot。
- 该技能是控制器上的别名,控制器当前由 /autonomous 拥有;除非本仓库日后新增中立的 /mode 技能,否则行为应保持在一处。
- 依赖 .agents/skills/autonomous/scripts/set-mode.sh 脚本,缺失时需安装 ai-env 模板或手动添加。
- TTL 为 4 小时滑动(每次提示续期)/ 12 小时绝对上限。