with one click
scaffold
脚手架(/scaffold):空项目创建栈模板,已有项目审计与建议。说「初始化」「创建项目」「脚手架」时用。须用户确认后再创建。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
脚手架(/scaffold):空项目创建栈模板,已有项目审计与建议。说「初始化」「创建项目」「脚手架」时用。须用户确认后再创建。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | scaffold |
| description | 脚手架(/scaffold):空项目创建栈模板,已有项目审计与建议。说「初始化」「创建项目」「脚手架」时用。须用户确认后再创建。 |
| disable-model-invocation | true |
模板:.cursor/templates/scaffold/(standard+:lint/test/verify/README + CI + .env.example)· CLI:.cursor/bin/scaffold.sh · 目录见 catalog.md
说明:脚手架是 scaffold skill 驱动的模板文件,不是多个 skill;日常编码细则仍由 rules/tech/*.mdc 按 glob 加载。
闸门:脚手架创建属于用户明确授权的仓库初始化;空仓库(detect → state=empty)可在无 plan.md 时执行。已有代码必须先 audit + AskQuestion 确认,默认 --dry-run,禁止静默覆盖。
/scaffold · 「初始化项目」「创建脚手架」「空仓库怎么开始」/plan 中用户要新建项目 → 在 PLANNING:true 阶段用本 skill 流程提问,确认后 apply 或写入 TASK-001 验收列./.cursor/bin/scaffold.sh detect
./.cursor/bin/scaffold.sh list
| 问题 | 选项示例 |
|---|---|
| 项目类型 | frontend · backend · systems |
| 技术栈 | react-vite-ts · vue-vite-ts · nextjs-ts · go-api · rust-axum · python-fastapi · java-gradle · cpp-cmake |
| 模块路径(Go) | 默认 example.com/app,问用户是否替换 |
| 包管理器 | npm / pnpm(前端);venv(Python) |
| 用户手册骨架(可选) | 是 → apply-bundle user-manual;否 → 跳过(见 user-manual reference/scaffold-bundle.md) |
| 测试报告骨架(可选) | 是 → apply-bundle test-report;否 → 跳过(见 test-report reference/scaffold-bundle.md) |
./.cursor/bin/scaffold.sh info <id>
./.cursor/bin/scaffold.sh apply <id> --dry-run
用表格列出将 CREATE / SKIP 的文件;说明 post_apply 与 verify。
./.cursor/bin/scaffold.sh apply <id>
可选附加包(不改默认 apply 文件集):
./.cursor/bin/scaffold.sh apply-bundle user-manual --dry-run
./.cursor/bin/scaffold.sh apply-bundle user-manual --stack react-vite-ts
./.cursor/bin/scaffold.sh apply-bundle test-report --dry-run
./.cursor/bin/scaffold.sh apply-bundle test-report --stack go-api
post_apply(npm install、go mod tidy 等)./scripts/verify.sh 或更新 config/workflow.json → verify_defaultcp .cursor/templates/plan.md ./plan.md → /plan 拆首个 Sprint(plan.md 已在 .gitignore,不提交)docs/specs/(或 workflow.json sdd.specs_dir)· 模板见 .cursor/templates/sdd/ · /plan §SDD/learn 写入栈与目录约定到 .cursorGrowth/learn/learn/dev-conventions.md 可选install-super-cursor.sh 复制全量母版后,不要假设每个 rules/tech/* 与外网 skill 都该默认加载。
| 步 | 动作 |
|---|---|
| 1 | 读栈证据(见 master routes.md §DAILY/LIBRARY) |
| 2 | DAILY — 匹配栈的 rules/tech/* + 核心 workflow skills(plan · run · learn) |
| 3 | LIBRARY — 离栈 tech rules、偶用 skill(perf · mcp · study 主题);需要时再手动 @ 或 slash |
| 4 | 可选:在 .cursorGrowth/learn/dev-conventions.md 记一行「本仓 DAILY 面」供 plan/run 引用 |
禁止:为裁剪再装 ECC/OpenClaw 等第二套 bundle CLI;母版路径保持 .cursor/ + 可选个人 ~/.cursor/skills/。
每套 standard 脚手架均含:
| 脚本 | 用途 |
|---|---|
scripts/test.sh | 开发中快速回归(仅测试) |
scripts/verify.sh | 任务/Sprint全量验收(lint+test+build 等) |
tests/README.md | 测试目录说明(Java 为 src/test/README.md) |
plan.md 验收列建议:
./scripts/test.sh 或栈内等价(npm run test · go test ./... · pytest)./scripts/verify.shnpm run test:watch · Go go test -v ./tests/... · Python pytest -v tests/unitmanifest 字段 test / verify 见 templates/scaffold/manifest.json。
detect + audit — 不直接 applyscripts/verify.sh / 只给建议--dry-run → 确认 → apply(无 --force 除非用户明确要求覆盖)rules/tech/* 与 /learn| 场景 | 做法 |
|---|---|
| 空仓库先搭架 | /scaffold 确认 → apply → /plan |
| 规划阶段纳入 | Sprint 加 TASK-001 初始化,验收:./.cursor/bin/scaffold.sh apply <id> && ./scripts/verify.sh |
| 仅建议 | SPIKE- 调研选型,结论归档后再 TASK-* |
/run 执行脚手架任务时仍须 gate-check 通过。
apply(尤其 established 仓库)--force 覆盖用户文件.cursor/templates/scaffold/(应走 /learn 或 rules/local/)总入口(/master)— 迷路时 AskQuestion 路由 plan/run/learn 等
交付验收(/delivery):视觉 · i18n · 文档对齐 · 后端对接 · 组件完整度 · 可维护性 · 生产就绪。Sprint 收尾或 /release 分支前走查。说「交付验收」「上线前检查」「生产就绪」时用。
规划(/plan):需求→先总后分→Sprint→plan.md→/run。说「规划」「拆任务」时用。禁止写业务代码。≠ IDE Plan 模式。
Sprint 出口(/release):分支 merge/PR/保留/丢弃 4 选 1 · semver · CHANGELOG · tag。 说「收尾」「merge」「开 PR」「发版」「打 tag」「分支怎么办」时用。自治发版→ship agent。
执行(/run):gate-check→ACTIVE→验收→审计→CHANGELOG→README(门面)→plan→必 commit。每任务/Sprint 收尾自动提交。
可发布测试报告(/report)— 全量/分层 verify 后汇总 · Report Contract · 日志解析 · benchmark 文档。项目无关 · 操作者无关。说「测试报告」「全量测试报告」「verify 报告」「benchmark 报告」时用。