chief-install
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInstall the Chief into the current project.
将Chief安装到当前项目中。
Arguments
参数
The first argument is the target version (branch or tag). Optional.
- No argument → install the latest stable release (highest semver tag). Find it by running , strip
git ls-remote --tags https://github.com/thaitype/chief.git, ignorerefs/tags/entries, and pick the highest semver version.^{} - → latest canary branch (active development, unreleased)
canary - ,
v1.0.0, etc. → specific tagged versionv2.0.0
第一个参数是目标版本(分支或标签),为可选参数。
- 无参数 → 安装最新稳定版本(最高语义化版本标签)。可通过运行查找,去除
git ls-remote --tags https://github.com/thaitype/chief.git前缀,忽略refs/tags/条目,选择最高的语义化版本。^{} - → 最新的canary分支(活跃开发中,未发布)
canary - 、
v1.0.0等 → 指定的标签版本v2.0.0
Steps
步骤
1. Check for existing installation
1. 检查现有安装情况
Check if the Chief is already installed by looking for these signals:
- exists
.agents/agents/chief-agent.md - directory exists
.chief/ - or
AGENTS.mdat root contains the keyword "Chief" (check file content, not just existence — these files may exist from other setups)CLAUDE.md
If any of these match → the framework is likely already installed. Warn the user and suggest upgrading instead. Show them:
npx skills@latest add thaitype/chief --skill chief-upgrade
/chief-upgradeDo NOT proceed unless the user explicitly confirms they want a fresh install.
If none match → proceed.
通过以下信号检查Chief是否已安装:
- 文件存在
.agents/agents/chief-agent.md - 目录存在
.chief/ - 根目录下的 或
AGENTS.md文件内容中包含关键词 "Chief"(需检查文件内容,而非仅判断文件是否存在——这些文件可能来自其他配置)CLAUDE.md
如果任意一项匹配 → 该框架很可能已安装。向用户发出警告,并建议升级。展示以下内容:
npx skills@latest add thaitype/chief --skill chief-upgrade
/chief-upgrade除非用户明确确认需要全新安装,否则请勿继续。
如果无一匹配 → 继续执行。
2. Ask coding agent and install mode
2. 询问编码Agent和安装模式
Ask the user:
- Which coding agent? — Supported agents: ,
claude-code,opencode,codex,cursor,copilot,gemini-cli,amp,windsurf,kiroaider - Install mode? (relevant for and
claude-code)copilot- link (recommended) — symlinks from agent-specific directory to
.agents/ - copy — copies files instead of symlinking
- On Windows, link mode requires Developer Mode enabled and . If unavailable, suggest copy mode.
git config --global core.symlinks true - For all other agents, mode does not affect behavior since they read and
AGENTS.mddirectly.agents/
- link (recommended) — symlinks from agent-specific directory to
向用户询问:
- 使用哪种编码Agent? —— 支持的Agent:、
claude-code、opencode、codex、cursor、copilot、gemini-cli、amp、windsurf、kiroaider - 安装模式?(与和
claude-code相关)copilot- link(推荐)—— 从Agent特定目录创建符号链接到
.agents/ - copy —— 复制文件而非创建符号链接
- 在Windows系统中,link模式需要启用开发者模式并设置。若无法启用,建议使用copy模式。
git config --global core.symlinks true - 对于所有其他Agent,模式不影响行为,因为它们直接读取和
AGENTS.md.agents/
- link(推荐)—— 从Agent特定目录创建符号链接到
3. Clone and run setup script
3. 克隆并运行安装脚本
bash
git clone --depth 1 --branch <version> https://github.com/thaitype/chief.git .chief-agent-tmp
bash .chief-agent-tmp/scripts/setup.sh --agent <agent> --mode <mode>If the setup script fails completely (non-zero exit code or crashes), skip to step 3b for full manual install. Do NOT run yet — it's needed for manual steps.
rm -rf .chief-agent-tmpIf the setup script succeeds, proceed to step 4.
bash
git clone --depth 1 --branch <version> https://github.com/thaitype/chief.git .chief-agent-tmp
bash .chief-agent-tmp/scripts/setup.sh --agent <agent> --mode <mode>如果安装脚本完全失败(非零退出码或崩溃),跳至步骤3b进行完整手动安装。请勿立即运行——手动步骤需要用到该目录。
rm -rf .chief-agent-tmp如果安装脚本成功,继续执行步骤4。
3b. Full manual install (fallback if setup script fails)
3b. 完整手动安装(安装脚本失败时的备选方案)
If the setup script failed, perform the entire install manually:
bash
undefined如果安装脚本失败,手动执行全部安装步骤:
bash
undefinedCore files (source is under template/)
核心文件(源文件位于template/下)
cp -r .chief-agent-tmp/template/.agents .agents
cp -r .chief-agent-tmp/template/.chief .chief
cp .chief-agent-tmp/template/AGENTS.md AGENTS.md
For `claude-code` only, set up Claude Code integration:
Link mode:
```bash
ln -s AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
for f in .agents/agents/*.md; do ln -s "../../$f" ".claude/agents/$(basename "$f")"; done
for d in .agents/skills/*/; do ln -s "../../$d" ".claude/skills/$(basename "$d")"; doneCopy mode:
bash
cp AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
cp .agents/agents/*.md .claude/agents/
cp -r .agents/skills/* .claude/skills/For only, set up GitHub Copilot integration:
copilotLink mode:
bash
mkdir -p .github/agents
for f in .agents/agents/*.md; do ln -s "../../$f" ".github/agents/$(basename "$f")"; doneCopy mode:
bash
mkdir -p .github/agents
cp .agents/agents/*.md .github/agents/For all other agents — no extra steps needed.
For non- agents, ask the user for model names:
claude-code- Thinking Model (for chief-agent, e.g. ,
o3)gemini-2.5-pro - Coding Model (for builder/tester/review-plan, e.g. ,
gpt-4.1)gemini-2.5-flash
Replace with the Thinking Model in chief-agent, and with the Coding Model in all other agent files. For , auto-replace with and (no prompt needed). For , update files in . For other agents, update files in .
${thinking_model}${coding_model}claude-codeopussonnetcopilot.github/agents/.agents/agents/Skip any file or directory that already exists (warn the user).
cp -r .chief-agent-tmp/template/.agents .agents
cp -r .chief-agent-tmp/template/.chief .chief
cp .chief-agent-tmp/template/AGENTS.md AGENTS.md
仅针对`claude-code`,设置Claude Code集成:
Link模式:
```bash
ln -s AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
for f in .agents/agents/*.md; do ln -s "../../$f" ".claude/agents/$(basename "$f")"; done
for d in .agents/skills/*/; do ln -s "../../$d" ".claude/skills/$(basename "$d")"; doneCopy模式:
bash
cp AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
cp .agents/agents/*.md .claude/agents/
cp -r .agents/skills/* .claude/skills/仅针对,设置GitHub Copilot集成:
copilotLink模式:
bash
mkdir -p .github/agents
for f in .agents/agents/*.md; do ln -s "../../$f" ".github/agents/$(basename "$f")"; doneCopy模式:
bash
mkdir -p .github/agents
cp .agents/agents/*.md .github/agents/对于所有其他Agent —— 无需额外步骤。
对于非的Agent,向用户询问模型名称:
claude-code- 思考模型(用于chief-agent,例如、
o3)gemini-2.5-pro - 编码模型(用于builder/tester/review-plan,例如、
gpt-4.1)gemini-2.5-flash
将chief-agent中的替换为思考模型,将所有其他Agent文件中的替换为编码模型。对于,自动替换为和(无需提示用户)。对于,更新中的文件。对于其他Agent,更新中的文件。
${thinking_model}${coding_model}claude-codeopussonnetcopilot.github/agents/.agents/agents/跳过任何已存在的文件或目录(向用户发出警告)。
4. Verify installation
4. 验证安装
After the setup script or manual install completes, verify that the installation is correct:
-
Core files exist:
.agents/agents/chief-agent.md.agents/agents/builder-agent.md.agents/agents/tester-agent.md.agents/agents/review-plan-agent.md.agents/skills/grill-me/SKILL.md.chief/project.md.chief/_rules/AGENTS.md
-
Claude Code only (if agent is):
claude-code- exists (symlink or copy depending on mode)
CLAUDE.md - contains entries for all 4 agents
.claude/agents/ - contains entry for grill-me
.claude/skills/ - If link mode: verify symlinks resolve correctly
-
Copilot only (if agent is):
copilot- contains entries for all 4 agents (symlinks or copies depending on mode)
.github/agents/ - If link mode: verify symlinks resolve correctly
- Model values have been replaced if the user provided model names
安装脚本或手动安装完成后,验证安装是否正确:
-
核心文件存在:
.agents/agents/chief-agent.md.agents/agents/builder-agent.md.agents/agents/tester-agent.md.agents/agents/review-plan-agent.md.agents/skills/grill-me/SKILL.md.chief/project.md.chief/_rules/AGENTS.md
-
仅针对Claude Code(若Agent为):
claude-code- 存在(根据模式为符号链接或复制文件)
CLAUDE.md - 包含所有4个Agent的条目
.claude/agents/ - 包含grill-me的条目
.claude/skills/ - 若为link模式:验证符号链接解析正确
-
仅针对Copilot(若Agent为):
copilot- 包含所有4个Agent的条目(根据模式为符号链接或复制文件)
.github/agents/ - 若为link模式:验证符号链接解析正确
- 若用户提供了模型名称,已替换模型值
5. Fix issues (fallback)
5. 修复问题(备选方案)
If any verification check fails, fix it manually:
- Missing core file → copy from if it still exists, otherwise clone again and copy the specific file
.chief-agent-tmp/template/ - Missing CLAUDE.md → create symlink () or copy depending on mode
ln -s AGENTS.md CLAUDE.md - Missing .claude/ symlinks → create them individually:
bash
mkdir -p .claude/agents .claude/skills ln -s ../../.agents/agents/<file>.md .claude/agents/<file>.md ln -s ../../.agents/skills/<skill> .claude/skills/<skill> - Broken symlink → remove and recreate
- Wrong mode (e.g. user wanted link but got copy) → remove and recreate with correct mode
如果任何验证检查失败,手动修复:
- 核心文件缺失 → 若仍存在,从
.chief-agent-tmp复制;否则重新克隆并复制特定文件.chief-agent-tmp/template/ - CLAUDE.md缺失 → 根据模式创建符号链接()或复制文件
ln -s AGENTS.md CLAUDE.md - .claude/符号链接缺失 → 逐个创建:
bash
mkdir -p .claude/agents .claude/skills ln -s ../../.agents/agents/<file>.md .claude/agents/<file>.md ln -s ../../.agents/skills/<skill> .claude/skills/<skill> - 符号链接损坏 → 删除并重新创建
- 模式错误(例如用户想要link模式但实际为copy模式)→ 删除并以正确模式重新创建
6. Clean up
6. 清理
Ensure is removed:
.chief-agent-tmpbash
rm -rf .chief-agent-tmp确保删除:
.chief-agent-tmpbash
rm -rf .chief-agent-tmp7. Next steps
7. 后续步骤
Tell the user:
- Edit with your project details (or run
.chief/project.md)chief-agent: use grill-me to help me fill in project.md - Review and customize if needed
AGENTS.md - Start using: ask chief-agent to plan your first milestone
告知用户:
- 编辑填写项目详情(或运行
.chief/project.md)chief-agent: use grill-me to help me fill in project.md - 查看并根据需要自定义
AGENTS.md - 开始使用:请求chief-agent规划第一个里程碑
Important rules
重要规则
- NEVER overwrite existing files without explicit user approval
- If the framework is already installed, suggest instead
/chief-upgrade - Always clean up even if the install is cancelled or fails
.chief-agent-tmp - If the setup script fails, attempt manual fixes before giving up
- Report all verification results to the user — even successful ones
- 未经用户明确批准,绝不要覆盖现有文件
- 如果框架已安装,建议使用进行升级
/chief-upgrade - 即使安装被取消或失败,也要始终清理
.chief-agent-tmp - 如果安装脚本失败,在放弃前尝试手动修复
- 向用户报告所有验证结果——即使是成功的结果