bmad-init
Featured在项目中初始化或更新 BMad-Method (V6)
AI & Automation 6,083 stars
421 forks Updated 1 weeks ago MIT
Install
Quality Score: 91/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# /bmad-init 命令
此命令在您的项目中初始化或更新 BMad-Method (V6)。
## 当调用此命令时:
1. 检查 `_bmad/` 目录是否存在,判断 BMad V6 是否已安装
2. 检查是否存在旧版 V4 安装(`.bmad-core` 或 `.bmad-method` 目录)
3. 新安装执行:`npx bmad-method install --directory . --modules bmm --tools claude-code --communication-language Chinese --document-output-language Chinese --yes`
4. 已安装则执行:`npx bmad-method install --directory . --action quick-update --yes`
5. 修复安装器 bug:将 `{output_folder}` 重命名为 `_bmad-output`(Beta 已知问题)
6. 自动更新 `.gitignore`(移除 V4 条目,添加 V6 条目)
7. 显示安装结果并提示用户后续操作
## 实现
```javascript
const { execSync } = require('node:child_process')
const fs = require('node:fs')
const path = require('node:path')
// 需要从 .gitignore 清理的旧条目
const LEGACY_GITIGNORE_ENTRIES = [
'.bmad-core',
'.bmad-method',
'.claude/commands/BMad',
'{output_folder}', // v6.0.0-Beta.8 bug 产物
]
// V6 新版 .gitignore 条目
const V6_GITIGNORE_ENTRIES = [
'_bmad/',
'_bmad-output/',
]
// 修复安装器 bug: {output_folder} 未解析为 _bmad-output (v6.0.0-Beta.8)
function fixOutputFolderBug(cwd) {
const buggyPath = path.join(cwd, '{output_folder}')
const correctPath = path.join(cwd, '_bmad-output')
if (!fs.existsSync(buggyPath)) return false
if (!fs.existsSync(correctPath)) {
// _bmad-output 不存在,直接重命名
fs.renameSync(buggyPath, correctPath)
console.log(' ✅ {output_folder} → _bmad-output/ (重命名)')
} else {
// _bmad-output 已存在,合并子目录后删除
const entries = fs.readdirSync(buggyPath, { withFileTypes: true })
for (const entry of entries) {
const src...
Details
- Author
- UfoMiao
- Repository
- UfoMiao/zcf
- Created
- 1 years ago
- Last Updated
- 1 weeks ago
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
init
初始化 cc-code 极简开发工作流场域。三轨判定(新建/已最新/升级迁移) → 生成 .cc_code/ 黑匣子目录树与模板骨架 → 旧版场域按「归档→清点→迁移→校验→归���」升级到当前插件规范(全程零删除) → 进入角色串行状态机循环。
5 Updated 6 days ago
weiyi88 AI & Automation Listed
cadence-init
初始化 cadence 工作流目录结构。支持两种模式:新项目(极简模板 + TBD 占位) 和已有项目(通用发现 + 领域适配扫描 + 来源不一致清单)。适用于软件、研究、 写作、学习、运营及其他项目。当用户说"初始化 cadence"、 "开始用 cadence"、或跑 /cadence-init slash command 时触发。
5 Updated 1 months ago
hxt9805 AI & Automation Listed
cm-doc-syncer
文档同步 Skill,开发完成后自动更新 README、.claude/ 配置、specs CHANGELOG,保持文档与代码一致
2 Updated yesterday
kingxiaozhe