secondme
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSecondMe 一站式项目创建
One-stop Project Creation for SecondMe
将 → → 三个步骤合并为一个完整流程。
secondme-initsecondme-prdsecondme-nextjs工具使用: 收集用户输入时使用 工具。
AskUserQuestionCombine the three steps of → → into a complete workflow.
secondme-initsecondme-prdsecondme-nextjsTool Usage: Use the tool when collecting user input.
AskUserQuestion参数说明
Parameter Description
| 参数 | 说明 |
|---|---|
| (无参数) | 完整流程:初始化 → PRD → 生成项目 |
| 快速流程:初始化 → 跳过 PRD → 生成项目 |
| Parameter | Description |
|---|---|
| (No parameters) | Full workflow: Initialization → PRD → Project Generation |
| Quick workflow: Initialization → Skip PRD → Project Generation |
执行流程
Execution Workflow
环境检查(首次执行前)
Environment Check (Before First Execution)
重要提醒: 当前目录将作为项目根目录,Next.js 项目会直接在此目录中初始化。
-
显示当前工作目录路径,让用户确认:
📂 当前工作目录: /path/to/current/dir ⚠️ Next.js 项目将直接在此目录中初始化,请确保你已在一个新建的空文件夹中运行。 -
检查当前目录内容(除、
.secondme/、.git/、CLAUDE.md等配置文件外):.claude/- 如果目录为空或仅有配置文件:继续
- 如果存在其他文件:发出警告并使用 让用户确认是否继续
AskUserQuestion
Important Reminder: The current directory will be used as the project root directory, and the Next.js project will be initialized directly here.
-
Display the current working directory path for user confirmation:
📂 Current Working Directory: /path/to/current/dir ⚠️ The Next.js project will be initialized directly in this directory. Please ensure you are running this in a new empty folder. -
Check the contents of the current directory (excluding configuration files such as,
.secondme/,.git/,CLAUDE.md):.claude/- If the directory is empty or only contains configuration files: Continue
- If other files exist: Issue a warning and use to let the user confirm whether to continue
AskUserQuestion
阶段 0:检测当前状态
Phase 0: Detect Current Status
检查 是否存在:
.secondme/state.json如果存在,读取 字段判断进度:
stage| stage | 说明 | 操作 |
|---|---|---|
| 已完成初始化 | 询问:从 PRD 阶段继续,还是重新开始? |
| 已完成 PRD | 询问:直接生成项目,还是重新定义 PRD? |
| 项目已生成 | 询问:重新生成项目,还是全部重新开始? |
如果不存在,从阶段 1 开始。
Check if exists:
.secondme/state.jsonIf it exists, read the field to determine progress:
stage| stage | Description | Action |
|---|---|---|
| Initialization completed | Ask: Continue from the PRD phase, or start over? |
| PRD completed | Ask: Generate the project directly, or redefine the PRD? |
| Project generated | Ask: Regenerate the project, or start over entirely? |
If it does not exist, start from Phase 1.
阶段 1:项目初始化
Phase 1: Project Initialization
执行 的完整流程:
secondme-init- 收集 App Info 或手动输入凭证(如果用户没有凭证,引导前往 https://develop.second.me 注册并创建 App)
- 解析 Scopes,推断功能模块
- 收集数据库连接串
- 确认模块选择
- 生成 (包含
.secondme/state.json、api配置)docs - 生成
CLAUDE.md
完成标志: 设为
stage"init"Execute the full workflow of :
secondme-init- Collect App Info or manually enter credentials (if the user does not have credentials, guide them to https://develop.second.me to register and create an App)
- Parse Scopes and infer functional modules
- Collect database connection strings
- Confirm module selection
- Generate (including
.secondme/state.jsonandapiconfigurations)docs - Generate
CLAUDE.md
Completion Flag: Set to
stage"init"阶段 2:产品需求定义
Phase 2: Product Requirement Definition
如果使用 参数:跳过此阶段,直接进入阶段 3。
--quick否则,执行 的完整流程:
secondme-prd- 展示已选模块的 API 能力
- 收集应用目标和目标用户
- 根据模块针对性提问(chat/profile/note)
- 收集设计偏好
- 确认需求摘要
- 更新 的
state.json字段prd
完成标志: 设为
stage"prd"If the parameter is used: Skip this phase and proceed directly to Phase 3.
--quickOtherwise, execute the full workflow of :
secondme-prd- Display the API capabilities of the selected modules
- Collect application objectives and target users
- Ask targeted questions based on modules (chat/profile/note)
- Collect design preferences
- Confirm requirement summary
- Update the field in
prdstate.json
Completion Flag: Set to
stage"prd"阶段 3:生成 Next.js 项目
Phase 3: Generate Next.js Project
执行 的完整流程:
secondme-nextjs- 读取 中的配置和 PRD
state.json - 在当前目录初始化 Next.js 项目
- 安装依赖(Prisma)
- 生成 (从
.env.local读取端点)state.api - 生成 Prisma Schema(User 表必含 Token 字段)
- 根据模块生成代码
- 使用 skill 生成 UI
frontend-design:frontend-design
完成标志: 设为
stage"ready"Execute the full workflow of :
secondme-nextjs- Read the configurations and PRD from
state.json - Initialize the Next.js project in the current directory
- Install dependencies (Prisma)
- Generate (read endpoints from
.env.local)state.api - Generate Prisma Schema (the User table must include the Token field)
- Generate code based on modules
- Generate UI using the skill
frontend-design:frontend-design
Completion Flag: Set to
stage"ready"快速模式 vs 完整模式
Quick Mode vs Full Mode
完整模式 (/secondme)
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ 阶段 1 │ → │ 阶段 2 │ → │ 阶段 3 │
│ 初始化 │ │ PRD 定义 │ │ 生成项目 │
└─────────────┘ └─────────────┘ └─────────────┘
快速模式 (/secondme --quick)
┌─────────────┐ ┌─────────────┐
│ 阶段 1 │ → │ 阶段 3 │
│ 初始化 │ │ 生成项目 │
└─────────────┘ └─────────────┘Full Mode (/secondme)
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Phase 1 │ → │ Phase 2 │ → │ Phase 3 │
│ Initialization │ │ PRD Definition │ │ Project Generation │
└─────────────┘ └─────────────┘ └─────────────┘
Quick Mode (/secondme --quick)
┌─────────────┐ ┌─────────────┐
│ Phase 1 │ → │ Phase 3 │
│ Initialization │ │ Project Generation │
└─────────────┘ └─────────────┘输出结果
Output Result
流程完成后显示:
🎉 SecondMe 项目创建完成!
项目信息:
- 应用名称: [app_name]
- 已选模块: auth, chat, profile
- 数据库: PostgreSQL
启动步骤:
1. npm install
2. npx prisma db push
3. npm run dev
项目将在 http://localhost:3000 启动
提示:
- .secondme/ 目录包含敏感配置,请添加到 .gitignore
- 如需修改配置,可单独运行 /secondme-init
- 如需重新定义需求,可单独运行 /secondme-prdAfter the workflow is completed, the following will be displayed:
🎉 SecondMe project creation completed!
Project Information:
- App Name: [app_name]
- Selected Modules: auth, chat, profile
- Database: PostgreSQL
Startup Steps:
1. npm install
2. npx prisma db push
3. npm run dev
The project will start at http://localhost:3000
Tips:
- The .secondme/ directory contains sensitive configurations, please add it to .gitignore
- To modify configurations, you can run /secondme-init separately
- To redefine requirements, you can run /secondme-prd separately单独使用子命令
Using Subcommands Separately
如果只需要执行某个阶段,可以单独使用:
| 命令 | 说明 |
|---|---|
| 仅执行初始化 |
| 仅执行 PRD 定义 |
| 仅执行项目生成 |
| 跳过 PRD 检查,直接生成 |
If you only need to execute a certain phase, you can use the following commands separately:
| Command | Description |
|---|---|
| Execute only initialization |
| Execute only PRD definition |
| Execute only project generation |
| Skip PRD check and generate directly |
错误恢复
Error Recovery
如果流程中断:
- 已完成的阶段数据会保存在
state.json - 重新运行 会检测进度并询问是否继续
/secondme - 可以选择从中断点继续,或重新开始某个阶段
If the workflow is interrupted:
- Data from completed phases will be saved in
state.json - Rerunning will detect progress and ask whether to continue
/secondme - You can choose to continue from the breakpoint or restart a certain phase
设计原则提醒
Design Principle Reminder
生成的项目遵循以下设计原则:
- 亮色主题:仅使用浅色主题
- 简约优雅:极简设计,减少视觉噪音
- 中文界面:所有用户可见文字使用中文
- 稳定优先:避免复杂动画,仅用简单过渡效果
The generated project follows the following design principles:
- Light Theme: Only use light theme
- Simple and Elegant: Minimalist design, reduce visual noise
- Chinese Interface: All user-visible text uses Chinese
- Stability First: Avoid complex animations, only use simple transition effects