Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By ChamHerryv1.1.0MITIn 1 marketplace
Generates a CLAUDE.md conventions file by detecting your project's stack and asking only what it cannot infer, including Monorepo layouts. Backs up an existing CLAUDE.md before overwriting it.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Of the plugin's README
Chinese
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
快速初始化项目 CLAUDE.md 规范文件的 Claude Code 插件。
基于内置模板,通过交互式问答自动生成定制化的项目开发规范文件。
将此 plugin 目录放置在您的项目中或 Claude Code 的 plugins 目录下。
# 复制到项目目录
cp -r project-init /path/to/your/project/
# 或者复制到全局 plugins 目录
cp -r project-init ~/.claude/plugins/
cd ~/.claude/plugins/
git clone <plugin-repository-url> project-init
/project-init
CLAUDE.md 文件启动命令
↓
检查现有 CLAUDE.md(如有则询问是否覆盖)
↓
检测 Monorepo 结构
├─ 检测显式配置(workspaces, lerna.json 等)
├─ 检测典型目录结构(frontend/, backend/ 等)
└─ 检测多配置文件
↓
┌─────────────┴─────────────┐
│ │
单项目 Monorepo
│ │
分析项目 分析所有子项目
│ ├─ 分析每个子项目技术栈
│ ├─ 推断项目间关系
│ └─ 询问生成策略
│ │
收集补充信息 收集补充信息
├─ 只询问无法推断的 ├─ 只询问无法推断的
└─ 使用检测结果 └─ 使用检测结果
│ │
└────────────┬──────────────┘
│
生成 CLAUDE.md
├─ 单项目:生成单个文件
└─ Monorepo:
├─ unified: 生成统一文件
└─ separate: 生成多个文件
│
显示成功信息
# 在新项目目录下
cd /path/to/new-project
# 执行初始化
/project-init
交互示例:
Q: 请输入项目名称
A: MyAwesomeProject
Q: 请用一句话描述项目
A: 高性能 Web API 服务
Q: 项目主要使用什么开发语言?
A: Go 1.21+
Q: 项目使用什么主要框架?
A: Gin
Q: 项目使用什么数据存储技术?
A: MySQL, Redis
Q: 项目采用什么架构模式?
A: 分层架构(MVC/三层架构)
Q: 项目采用什么命名和代码风格规范?
A: 遵循语言官方规范
Q: 是否启用测试覆盖率要求?
A: 启用(要求 >80%)
Q: Git 提交是否需要审批确认?
A: 需要(使用 AskUserQuestion)
生成结果:
✅ 项目规范文件生成成功!
📄 文件位置: ./CLAUDE.md
📅 生成时间: 2025-11-03 14:30:00
📋 配置摘要:
- 项目名称: MyAwesomeProject
- 开发语言: Go 1.21+
- 主要框架: Gin
- 架构模式: 分层架构(MVC/三层架构)
如果项目中已存在 CLAUDE.md,插件会询问:
⚠️ 检测到已存在 CLAUDE.md 文件
请选择操作:
1. 备份后覆盖(推荐) - 保存为 CLAUDE.md.backup.20251103143000
2. 直接覆盖 - 原文件将被替换
3. 取消操作 - 退出命令
项目结构:
my-fullstack-app/
├── frontend/ # Next.js 前端
│ └── package.json
├── backend/ # Go API 服务
│ └── go.mod
└── README.md
执行命令:
cd /path/to/my-fullstack-app
/project-init
自动检测结果:
🔍 项目结构检测完成!
📦 项目类型: Monorepo
🔧 检测方式: 前后端分离结构
📂 子项目: 2 个
- frontend/
- backend/
分析中...
📦 Monorepo 子项目分析完成!
共检测到 2 个子项目:
📂 frontend/ - Web Frontend
✅ 语言: TypeScript 5.0+
✅ 框架: Next.js 14
✅ 架构: 组件化架构
📂 backend/ - API Server
✅ 语言: Go 1.21+
✅ 框架: Gin
✅ 架构: 分层架构
✅ 数据: PostgreSQL, Redis
🔗 项目关系:
frontend/ → backend/ (API 调用)
策略选择:
Q: 检测到这是一个 Monorepo 项目,包含 2 个子项目。您希望如何生成 CLAUDE.md?
选项:
1. 只在根目录生成统一的 CLAUDE.md(推荐)
→ 生成一个包含所有子项目信息的统一规范文件
2. 为每个子项目生成独立的 CLAUDE.md
→ 在根目录和每个子项目目录都生成独立的 CLAUDE.md
3. 仅为根目录生成,忽略子项目
→ 按照单项目模式生成
生成结果(选择选项 1):
✅ Monorepo 项目规范文件生成成功!
📄 文件位置: ./CLAUDE.md
📅 生成时间: 2025-11-08 22:30:00
📦 Monorepo 信息:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏗️ 项目类型: Monorepo (前后端分离)
📂 子项目数: 2
📊 子项目摘要:
📂 frontend/ - Web Frontend
✅ 语言: TypeScript 5.0+
✅ 框架: Next.js 14
✅ 架构: 组件化架构
📂 backend/ - API Server
✅ 语言: Go 1.21+
✅ 框架: Gin
✅ 架构: 分层架构
🔗 项目关系:
frontend/ → backend/ (API 调用)
🎯 自动检测项数: 15/18
💡 下一步操作:
1. 查看生成的 CLAUDE.md 文件
2. 根据各子项目实际情况调整细节
3. 提交到版本控制系统
🤖 Generated with Claude Code
{
"name": "project-init",
"description": "快速初始化项目 CLAUDE.md 规范文件",
"version": "1.0.0",
"author": {
"name": "Wang Xuecheng",
"email": "[email protected]"
}
}
命令执行时使用以下跨平台工具:
Read: 读取现有 CLAUDE.md(用于备份)Write: 生成 CLAUDE.md 文件AskUserQuestion: 交互式收集用户输入Bash(date:*): 获取时间戳(所有系统都支持)project-init/
├── .claude-plugin/
│ └── plugin.json # Plugin 元数据配置
├── commands/
│ └── project-init.md # 命令实现逻辑(含内置模板)
└── README.md # 本文档
A: 完全可以!生成的文件只是起点,您应该根据项目实际情况调整细节。
A: 如果选择了"备份后覆盖",原文件会保存为:
CLAUDE.md.backup-{timestamp}
# 恢复方法
cp CLAUDE.md.backup-20251103143000 CLAUDE.md
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub chamherry/claude-code-third-party-plugins --plugin project-initPlugins from other owners that cover similar ground