refactor: 简化 BMAD 安装技能

改进:
- 重命名:mcp-container-install-bmad → install-bmad
- 简化内容:移除复杂的参数说明
- 专注容器内使用:直接在当前目录安装
- 更清晰的使用说明

容器内使用更简单直接,无需参数配置。]
This commit is contained in:
Claude Code
2026-03-29 06:17:01 +00:00
parent 0bd883f44e
commit b444fb6ec8
2 changed files with 70 additions and 103 deletions

View File

@@ -0,0 +1,70 @@
---
name: install-bmad
description: 在当前目录安装 BMAD 平台。简单直接:在容器工作目录运行此技能即可自动安装最新版 BMAD无需参数。
---
# BMAD 安装技能
## 概述
在当前工作目录自动安装 BMAD (Build More, Architect Dreams) 平台。
**用途:**
- 新项目初始化 BMAD 环境
- 更新到最新 BMAD 版本
- 修复损坏的 BMAD 安装
## 安装命令
```bash
npx bmad-method install \
--modules bmm \
--tools claude-code \
--communication-language chinese \
--document-output-language chinese \
--yes
```
## 验证安装
安装完成后检查:
```bash
# 检查目录
ls -la _bmad/
# 检查配置
cat _bmad/core/config.yaml
# 查看帮助
bmad-help
```
## 安装位置
- **工作目录**:当前目录 (\`pwd\`)
- **BMAD 目录**\`./_bmad/\`
- **技能目录**\`./.claude/skills/\`
## 常见问题
### 安装失败?
```bash
# 清理后重试
rm -rf _bmad/ .claude/skills/
npx bmad-method install --modules bmm --tools claude-code --communication-language chinese --yes
```
### 需要其他模块?
```bash
# 安装完整版本(包含业务分析模块)
npx bmad-method install --modules bmm,bmb --tools claude-code --communication-language chinese --yes
```
### 英文环境?
```bash
npx bmad-method install --modules bmm --tools claude-code --communication-language english --document-output-language english --yes
```

View File

@@ -1,103 +0,0 @@
---
name: mcp-container-install-bmad
description: 在 D8D 开发容器中安装 BMAD (Build More, Architect Dreams)。使用此技能当用户需要在容器中安装 BMAD 时,例如:新创建的模板/项目、需要配置 BMAD 环境的容器、或明确提到"安装 BMAD"、"安装 bmad-method"等关键词时触发。
---
# MCP 容器 BMAD 安装
## 概述
在 D8D 开发容器中使用 `npx bmad-method install` 安装 BMAD 平台,支持自定义安装参数。
---
## 安装命令
### 默认安装(推荐)
```bash
npx bmad-method install \
--directory /mnt/code/{workspace_id}-{item_id}-{item_type}-{group}/ \
--modules bmm \
--tools claude-code \
--communication-language chinese \
--document-output-language chinese \
--yes
```
**默认参数说明:**
| 参数 | 值 | 说明 |
|------|------|------|
| `--modules` | `bmm` | 安装 BMAD Method 模块(敏捷 AI 驱动开发) |
| `--tools` | `claude-code` | 配置 Claude Code 工具 |
| `--communication-language` | `chinese` | 代理沟通语言为中文 |
| `--document-output-language` | `chinese` | 文档输出语言为中文 |
| `--yes` | - | 跳过确认提示 |
---
## 使用 MCP 工具执行
通过 D8D MCP 工具 `mcp__d8d__d8d_exec_dev_container_command` 执行安装:
```typescript
{
"workspace_id": <工作空间 ID>,
"item_id": <模板/项目 ID>,
"item_type": "template" "project",
"command": ["/bin/sh", "-c", "cd /mnt/code/{workspace_id}-{item_id}-{item_type}-{group}/ && npx bmad-method install --modules bmm --tools claude-code --communication-language chinese --document-output-language chinese --yes"],
"timeout": 120000
}
```
---
## 自定义参数
### 模块选项
| 模块 | 说明 |
|------|------|
| `bmm` | BMAD Method - 敏捷 AI 驱动开发工作流 |
| `bmb` | BMAD Business - 业务分析和产品规划 |
多模块使用逗号分隔:`--modules bmm,bmb`
### 工具选项
| 工具 | 说明 |
|------|------|
| `claude-code` | Claude Code 配置 |
| `cursor` | Cursor IDE 配置 |
| `none` | 跳过工具配置 |
### 语言选项
支持的语言:`chinese`, `english`, `spanish`
---
## 验证安装
安装完成后验证:
```bash
ls -la _bmad/
cat _bmad/core/config.yaml
```
期望输出:
- `_bmad/` 目录存在
- `config.yaml` 包含正确的语言配置
---
## 常见问题
### 容器工作目录格式
工作目录命名规则:`{workspace_id}-{item_id}-{item_type}-{group}`
示例:
- 模板 ID 233`223-233-template-6`
- 项目 ID 456`123-456-project-7`