From bf40a6d738ca82883fe87a3b5224137b5d79e131 Mon Sep 17 00:00:00 2001 From: zyh Date: Mon, 30 Mar 2026 06:05:22 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=85=88=E5=86=B3?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=A3=80=E6=9F=A5=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B8=85=E7=90=86=E5=B7=B2=E5=AD=98=E5=9C=A8=E7=9A=84=20=5Fbma?= =?UTF-8?q?d=20=E7=9B=AE=E5=BD=95=E9=81=BF=E5=85=8D=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/install-bmad/SKILL.md | 54 ++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/.claude/skills/install-bmad/SKILL.md b/.claude/skills/install-bmad/SKILL.md index ab065b7..c0c8b7c 100644 --- a/.claude/skills/install-bmad/SKILL.md +++ b/.claude/skills/install-bmad/SKILL.md @@ -14,17 +14,43 @@ description: 在当前目录安装 BMAD 平台。简单直接:在容器工作 - 更新到最新 BMAD 版本 - 修复损坏的 BMAD 安装 +## 先决条件检查 + +在安装前,需要先检查并清理已存在的 BMAD 目录,避免进入交互模式: + +```bash +# 检查 _bmad 目录是否存在 +if [ -d "_bmad" ]; then + echo "检测到已存在的 _bmad 目录,正在清理..." + rm -rf _bmad/ + echo "清理完成" +fi +``` + ## 安装命令 ```bash npx bmad-method install \ + --directory "$(pwd)" \ --modules bmm \ --tools claude-code \ + --output-folder "_bmad-output" \ + --user-name "Root" \ --communication-language chinese \ --document-output-language chinese \ --yes ``` +**参数说明:** +- `--directory "$(pwd)"` - 明确指定安装到当前项目目录 +- `--modules bmm` - 安装 BMAD Methodology 模块 +- `--tools claude-code` - 集成 Claude Code 工具 +- `--output-folder "_bmad-output"` - 输出文件夹路径(默认值:_bmad-output) +- `--user-name "Root"` - 设置用户名(BMAD Agents 会使用此名称称呼你,建议使用真实姓名或团队名称) +- `--communication-language chinese` - 中文交互语言 +- `--document-output-language chinese` - 中文文档输出 +- `--yes` - 自动确认,跳过交互式提示 + ## 验证安装 安装完成后检查: @@ -53,18 +79,40 @@ bmad-help ```bash # 清理后重试 rm -rf _bmad/ .claude/skills/ -npx bmad-method install --modules bmm --tools claude-code --communication-language chinese --yes +npx bmad-method install \ + --directory "$(pwd)" \ + --modules bmm \ + --tools claude-code \ + --output-folder "_bmad-output" \ + --user-name "Root" \ + --communication-language chinese \ + --yes ``` ### 需要其他模块? ```bash # 安装完整版本(包含业务分析模块) -npx bmad-method install --modules bmm,bmb --tools claude-code --communication-language chinese --yes +npx bmad-method install \ + --directory "$(pwd)" \ + --modules bmm,bmb \ + --tools claude-code \ + --output-folder "_bmad-output" \ + --user-name "Root" \ + --communication-language chinese \ + --yes ``` ### 英文环境? ```bash -npx bmad-method install --modules bmm --tools claude-code --communication-language english --document-output-language english --yes +npx bmad-method install \ + --directory "$(pwd)" \ + --modules bmm \ + --tools claude-code \ + --output-folder "_bmad-output" \ + --user-name "Root" \ + --communication-language english \ + --document-output-language english \ + --yes ```