ultra-init
SolidInitialize Ultra Builder Pro project: detect context, confirm with user, scaffold .ultra/ via task.init_project, set up git.
AI & Automation 2 stars
0 forks Updated yesterday MIT
Install
Quality Score: 81/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# ultra-init — Phase 3.1
把当前工作目录(或 `--target-dir`)初始化为一个 Ultra Builder Pro 项目:拉起
`.ultra/` 骨架、写入 `tasks.json` 元数据、按需配 git。
真实的目录搭建 + 模板拷贝 + tasks.json 注入统一由 **MCP tool `task.init_project`** 完成;
MCP 不可达时回退 `ultra-tools task init-project`。
## 设计要点(对比 pre-Phase-3 行为)
- **无 Claude 独占依赖**:`task.init_project` + `ultra-tools init-project` 两条路径
都不调 Claude 原生工具,4 个 runtime 都能走通。
- **模板内置**:`.ultra/` 骨架来自仓内 `templates/.ultra/`;不再依赖 `~/.claude/.ultra-template/`。
- **幂等**:二次 init 默认拒绝,`--overwrite` 才会备份旧 `.ultra/` 为
`.ultra.backup.<ts>` 后重建。
## Workflow
### Step 0: 状态检测(skill 调用方做)
在调 `task.init_project` 之前,调用方(Claude / CLI / SDK)需要先判断:
- `target_dir/.ultra/` 是否已存在 → 决定是否需要 `overwrite=true`
- `target_dir/.git/` 是否已存在 → 影响 Step 3 的分支
- 读 `package.json` / `Cargo.toml` / `pyproject.toml` / `go.mod` 推断项目类型和栈
- 如果调用方是 Claude,可在此用 `TaskCreate` 跟踪 Step 0–4 的 session 内进度
(这是 runtime 的 session-local 跟踪,不走 MCP)
### Step 1: 补全参数
入参不足时补:
| 字段 | 缺省 |
|------|------|
| `project_name` | 当前目录名(`path.basename(target_dir)`) |
| `project_type` | Step 0 识别结果;多技术栈 → `fullstack` |
| `stack` | Step 0 识别到的依赖(逗号分隔多值,如 `react,express,postgres`) |
| `git_init` | `.git/` 不存在 → 询问用户 |
### Step 1.5: 交互确认(仅当检测到模糊或重入)
触发条件:
- `target_dir/.ultra/` 已存在(重入)
- 识别到多项目类型(Web + API)
- 显式 `--interactive` 标志
交互渠道:
- **Claude runtime**:调 `AskUserQuestion`(原生)
- **其他 runtime**:使用 Host 原生提问界面;若当前表面不支持交互,
要求用户通过显式命令行参数选择
确认 4 个问题:
1. 项目类型(可多选,`detected` 标签打在识别项)
2. 技术栈(可多选)
3. 已有 `.git/` → 保留 / 重置备份 / 不用 git
...
Details
- Author
- rocky2431
- Repository
- rocky2431/ultra-builder-pro-cli
- Created
- 3 months ago
- Last Updated
- yesterday
- Language
- JavaScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
cm-init
分析已有代码项目并生成 Codex AGENTS.md 与 CM/Claude 兼容项目规则。仅用于非空存量项目,不负责创建新项目脚手架。
0 Updated today
kingxiaozhe AI & Automation Listed
init-project
Detect a target project's stack (Python/uv, Node/TypeScript, Docker, Supabase, Git) and initialize or audit it against standard conventions — ruff/PEP8 or eslint/prettier, docker-compose profiles, Supabase migrations, .env hygiene, commit/branch conventions, folder layout — then write the result into the target repo's CLAUDE.md.
0 Updated 4 days ago
darkstar1227 AI & Automation Listed
project-init
Bootstrap a new repo with git, GitHub remote, labels, CLAUDE.md, and a PROJECT-SEED.md for handoff to /brainstorm.
0 Updated today
fxmartin