with one click
ce-setup
诊断并配置 compound-engineering 环境:检查 CLI 依赖、插件版本和仓库本地配置
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
诊断并配置 compound-engineering 环境:检查 CLI 依赖、插件版本和仓库本地配置
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Fork Overlay:Task Bundle 持久化 + Failure FSM 集成。在 ce:work 基础上增加 state.md 读写和状态机转换。使用时机:执行 ce:work 时,如果任务有对应的 Task Bundle(docs/tasks/<id>/),加载此 skill 以启用持久化和状态追踪。
Fork Overlay:Codex-first 外部执行器策略。按任务特征路由到 Claude 或 Codex,Codex-first(非品牌路由)。使用时机:需要决定是否将当前任务派发给 Codex 时加载此 skill。
Fork Overlay:经验分层沉淀升级阶梯。检测是否值得将 solution 升级为 pattern 或 skill。使用时机:ce:compound 完成后手动调用,分析 docs/solutions/ 中的重复模式。(不会自动触发,需主动加载此 skill)
Fork Overlay:外部模型调用前置检查门控。调用 Codex/Gemini 之前运行五项检查,防止调用失败浪费时间。使用时机:任何调用外部模型(Codex [C]、Gemini [G])之前自动运行。
Fork Overlay:ce:work 意图分类门控。在执行前识别任务意图(实现/修复/重构/探索),设定对应的执行策略。使用时机:ce:work Phase 0(环境扫描)之后、Phase 1(Quick Start)之前。
Fork Overlay:Codex Patch Approval 咨询版。当 Codex 返回 patch 时,Claude 审批后才写入文件。使用时机:Codex 以 patch/diff 格式返回代码变更时,由 Claude 作为审批层。
| name | ce:setup |
| description | 诊断并配置 compound-engineering 环境:检查 CLI 依赖、插件版本和仓库本地配置 |
| argument-hint | [可选:doctor、config、install] |
| disable-model-invocation | true |
Ask the user each question below using the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_user in Gemini, ask_user in Pi (requires the pi-ask-user extension). Fall back to presenting each question as a numbered list in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip or auto-configure. For multiSelect questions, accept comma-separated numbers (e.g. 1, 3).
Interactive setup for compound-engineering — diagnoses environment health, cleans obsolete repo-local CE config, and helps configure required tools. Review agent selection is handled automatically by ce-code-review; project-specific review guidance belongs in CLAUDE.md or AGENTS.md.
Detect the installed compound-engineering plugin version by reading the plugin metadata or manifest. This is platform-specific -- use whatever mechanism is available (e.g., reading plugin.json from the plugin root or cache directory). If the version cannot be determined, skip this step.
If a version is found, pass it to the check script via --version. Otherwise omit the flag.
Before running the script, display: "Compound Engineering -- checking your environment..."
Run the bundled check script from the installed skill directory, not from the user's current project. Resolve the skill directory first from the harness-provided skill path/root when available; in Claude Code, use the loaded skill base directory. If the harness cannot expose a skill directory, locate the installed ce-setup skill directory before running the script.
bash "$CE_SETUP_SKILL_DIR/scripts/check-health" --version VERSION
Or without version if Step 1 could not determine it:
bash "$CE_SETUP_SKILL_DIR/scripts/check-health"
Script reference: scripts/check-health under the ce-setup skill directory.
Display the script's output to the user.
Plugin root (pre-resolved): !echo "${CLAUDE_PLUGIN_ROOT}"
If the line above resolved to an absolute path (starts with / and contains no ${), this is a Claude Code session and /ce:update is available. Anything else — empty, the literal ${CLAUDE_PLUGIN_ROOT} token, or an unresolved command string like echo "${CLAUDE_PLUGIN_ROOT}" left in place by a non-Claude harness that doesn't process ! pre-resolution — means this is not Claude Code; omit any /ce:update references from output.
After the diagnostic report, check whether:
compound-engineering.local.md is present and needs cleanup.compound-engineering/config.local.yaml does not exist or is not safely gitignored.compound-engineering/config.local.example.yaml is missing or outdatedIf everything is installed, no repo-local cleanup is needed, and .compound-engineering/config.local.yaml already exists and is gitignored, display the tool and skill list and completion message. Parse the tool and skill names from the script output and list each with a green circle. Omit the Skills line if the Skills section is absent from the script output:
✅ Compound Engineering setup complete
Tools: 🟢 agent-browser 🟢 gh 🟢 jq 🟢 vhs 🟢 silicon 🟢 ffmpeg 🟢 ast-grep
Skills: 🟢 ast-grep
Config: ✅
Run /ce:setup anytime to re-check.
If this is a Claude Code session (the Plugin root above resolved to a non-empty path), append to the message: "Run /ce:update to grab the latest plugin version."
Stop here.
Otherwise proceed to Phase 2 to resolve any issues. Handle repo-local cleanup (Step 4) first, then config bootstrapping (Step 5), then missing dependencies (Step 6).
Resolve the repository root (git rev-parse --show-toplevel). If compound-engineering.local.md exists at the repo root, explain that it is obsolete because review-agent selection is automatic and CE now uses .compound-engineering/config.local.yaml for any surviving machine-local state. Ask whether to delete it now. Use the repo-root path when deleting.
Resolve the repository root (git rev-parse --show-toplevel). All paths below are relative to the repo root, not the current working directory.
Example file (always refresh): Copy references/config-template.yaml to <repo-root>/.compound-engineering/config.local.example.yaml, creating the directory if needed. This file is committed to the repo and always overwritten with the latest template so teammates can see available settings.
Local config (create once): If .compound-engineering/config.local.yaml does not exist, ask whether to create it:
Set up a local config file for this project?
This saves your Compound Engineering preferences (like which tools to use and how workflows behave).
Everything starts commented out -- you only enable what you need.
1. Yes, create it (Recommended)
2. No thanks
If the user approves, copy references/config-template.yaml to <repo-root>/.compound-engineering/config.local.yaml. If .compound-engineering/config.local.yaml is not already covered by .gitignore, offer to add the entry:
.compound-engineering/*.local.yaml
If the local config already exists, check whether it is safely gitignored. If not, offer to add the .gitignore entry as above.
Present the missing tools and skills using a multiSelect question with all items pre-selected. Use the install commands and URLs from the script's diagnostic output. Group items under Tools: and Skills: so the user can see which runtime each item targets; omit a group whose items are all installed.
The following items are missing. Select which to install:
(All items are pre-selected)
Tools:
[x] agent-browser - Browser automation for testing and screenshots
[x] gh - GitHub CLI for issues and PRs
[x] jq - JSON processor
[x] vhs (charmbracelet/vhs) - Create GIFs from CLI output
[x] silicon (Aloxaf/silicon) - Generate code screenshots
[x] ffmpeg - Video processing for feature demos
[x] ast-grep - Structural code search using AST patterns
Skills:
[x] ast-grep - Agent skill for structural code search with ast-grep
Only show items that are actually missing. Omit installed ones.
For each selected dependency, in order:
Show the install command (from the diagnostic output) and ask for approval:
Install agent-browser?
Commands:
1. CI=true npm install -g agent-browser --no-audit --no-fund --loglevel=error
2. agent-browser install
3. npx skills add https://github.com/vercel-labs/agent-browser --skill agent-browser -g -y
Options:
1. Run these commands in order
2. Skip - I'll install it manually
If approved: Run each install command using a shell execution tool, one command at a time, stopping if a command fails. After the commands complete, verify installation:
command -v agent-browser).npx --yes skills list --global --json | jq -r '.[].name' | grep -qx <skill-name> when npx is available; otherwise fall back to checking that ~/.claude/skills/<skill-name>, ~/.agents/skills/<skill-name>, or ~/.codex/skills/<skill-name> exists (file, directory, or symlink).If verification succeeds: Report success.
If verification fails or install errors: Display the project URL as fallback and continue to the next dependency.
Display a brief summary:
✅ Compound Engineering setup complete
Installed: agent-browser, gh, jq
Skipped: rtk
Run /ce:setup anytime to re-check.
If this is a Claude Code session (per platform detection in Step 3), append: "Run /ce:update to grab the latest plugin version."