OpenClaw SaaS Builder
Use this skill when the user wants full project orchestration instead of a quick snippet.
Core idea
OpenClaw is the driver.
Gemini CLI is the brainstorming and generation copilot.
GitHub CLI is for repo creation and GitHub operations.
Vercel CLI is optional for deployment.
Do not treat Gemini as an unsupervised executor.
Use it to generate plans, alternatives, code drafts, copy, architecture ideas, and reviews.
OpenClaw remains responsible for file edits, shell execution, validation, and external side effects.
What this skill should produce
For a serious SaaS or web project, aim to create at least:
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- source code scaffold or implementation
For deployment-ready work, also aim for:
- - INLINECODE6
- INLINECODE7
- CI/deploy notes
Preflight first
Before promising repo creation or deployment, run the preflight helper:
CODEBLOCK0
Interpretation:
- - If Gemini CLI fails, continue with OpenClaw-only planning or ask whether to proceed without Gemini.
- If
gh auth status fails, do not promise automatic repo creation yet. - If
vercel whoami fails, do not promise deployment yet.
If Vercel is required, the user should already have the CLI installed and authenticated.
Typical checks:
CODEBLOCK1
Build modes
Read references/saas-build-modes.md when deciding scope.
Use one of these modes explicitly:
- - idea mode
- MVP mode
- production mode
- launch mode
Default workflow
Phase 1: Discovery and brainstorming
Clarify:
- - product goal
- target users
- pain point
- MVP scope
- must-have features
- non-goals
- monetization or business purpose
- data and privacy concerns
- preferred stack or constraints
Use Gemini CLI to accelerate this phase.
Prefer structured output.
Good pattern:
- - ask Gemini for a concise options list
- ask Gemini for tradeoffs
- ask Gemini for a JSON spec draft
Phase 2: Requirements package
Create these docs early:
- - INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
Use the bundled helpers when useful:
CODEBLOCK2
Read references/saas-doc-templates.md for the expected sections.
If the user asks for diagrams, generate Mermaid diagrams in markdown first.
Phase 3: Implementation plan
Break work into small, ordered milestones.
Use TODO.md or a milestone list.
Good milestone pattern:
- 1. bootstrap repo
- scaffold app
- core domain logic
- auth and data
- UI and polish
- tests
- docs
- repo publish
- deploy
Phase 4: Build
Choose the build path based on complexity.
For small or medium tasks
- - inspect files directly
- use Gemini CLI for spec, code drafts, or review
- edit files with OpenClaw tools
- run tests locally
For larger coding tasks
Prefer ACP or coding-agent for implementation loops.
Use Gemini CLI as planning and review support, not as the only coding engine.
Phase 5: GitHub repository creation
Only do this when the user has explicitly asked for it or clearly requested end-to-end setup.
Typical local flow:
- 1. initialize git if needed
- create README and baseline docs
- verify INLINECODE18
- create repo with a sensible name
- set remote
- commit initial version
- push default branch
Use the helper when appropriate:
CODEBLOCK3
Use the GitHub skill for detailed command patterns.
Naming guidance:
- - use a short, readable slug
- prefer product name or function over vague names
- avoid joke names unless the user asks
Phase 6: Optional Vercel deployment
Only do this when the user asked for deployment.
Before deploy, verify:
CODEBLOCK4
If Vercel auth is not ready, stop and say exactly that.
Do not fake deployment readiness.
Use the helper when appropriate:
CODEBLOCK5
Typical flow:
- 1. verify framework and build output
- confirm env vars
- run Vercel link or init if needed
- deploy
- capture deployment URL
- write deploy notes to INLINECODE19
Safety and approval rules
These actions change the outside world and should be treated as explicit-user-intent actions:
- - creating remote repos
- pushing commits to remote
- creating cloud projects
- deploying to Vercel
- sending webhooks or emails
Planning, docs, scaffolding, and local implementation can proceed normally.
For external side effects, confirm intent if the request is ambiguous.
How to use Gemini CLI inside this skill
Use gemini-cli skill patterns.
Recommended helpers:
- - INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
Recommended Gemini uses:
- - brainstorming product directions
- generating JSON specs
- drafting architecture alternatives
- drafting landing-page copy
- reviewing rewritten files
- naming ideas for repos or products
Bad use:
- - blindly executing Gemini-generated shell
- trusting invalid JSON
- letting Gemini decide external side effects without review
Recommended outputs by project stage
Early stage
- - INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
Mid stage
- - code scaffold
- component and module plan
- INLINECODE29
- test checklist
Late stage
- - INLINECODE30
- INLINECODE31
- GitHub repo
- deploy URL
References
Read these when needed:
- - INLINECODE32
- INLINECODE33
- INLINECODE34
Use skills/gemini-cli/references/website-prompts.md when the project includes a marketing site or landing page.
Publish readiness notes
This skill is meant to be practical, not magical.
It assumes:
- - Gemini CLI is installed and authenticated
- GitHub CLI is installed and authenticated for repo creation
- Vercel CLI is installed and authenticated for deployment
- OpenClaw remains the orchestrator for validation, editing, and safety decisions
OpenClaw SaaS Builder
当用户需要完整的项目编排而非快速代码片段时,请使用此技能。
核心理念
OpenClaw 是驱动引擎。
Gemini CLI 是头脑风暴和代码生成的副驾驶。
GitHub CLI 用于仓库创建和 GitHub 操作。
Vercel CLI 为可选部署工具。
不要将 Gemini 视为无监督执行器。
应使用它生成计划、备选方案、代码草稿、文案、架构思路和代码审查。
OpenClaw 负责文件编辑、Shell 执行、验证和外部副作用。
本技能应产出的内容
对于正式的 SaaS 或 Web 项目,至少应创建:
- - requirements.md
- architecture.md
- Rules.md
- README.md
- TODO.md
- skills-plan.md
- 源代码脚手架或实现
对于可部署的成品,还需产出:
- - .env.example
- deployment.md
- CI/部署说明
前置检查
在承诺创建仓库或部署之前,请先运行前置检查脚本:
bash
./skills/openclaw-saas-builder/scripts/preflightsaasbuilder.sh
结果解读:
- - 如果 Gemini CLI 失败,则继续使用纯 OpenClaw 规划,或询问用户是否在无 Gemini 的情况下继续。
- 如果 gh auth status 失败,则暂不承诺自动创建仓库。
- 如果 vercel whoami 失败,则暂不承诺部署。
如果需要 Vercel,用户应已安装并认证 CLI。
典型检查命令:
bash
which vercel
vercel --version
vercel whoami
构建模式
在确定范围时,请阅读 references/saas-build-modes.md。
明确使用以下模式之一:
默认工作流程
阶段一:探索与头脑风暴
明确以下内容:
- - 产品目标
- 目标用户
- 痛点
- MVP 范围
- 必备功能
- 非目标
- 变现或商业目的
- 数据与隐私考量
- 首选技术栈或约束条件
使用 Gemini CLI 加速此阶段。
优先使用结构化输出。
推荐模式:
- - 让 Gemini 提供简洁的选项列表
- 让 Gemini 分析权衡方案
- 让 Gemini 生成 JSON 规范草稿
阶段二:需求文档包
尽早创建以下文档:
- - requirements.md
- architecture.md
- Rules.md
- skills-plan.md
- TODO.md
在适用时使用内置辅助脚本:
bash
./skills/openclaw-saas-builder/scripts/generate_requirements.sh <项目名称> <简要说明>
./skills/openclaw-saas-builder/scripts/generate_architecture.sh <项目名称> <简要说明>
./skills/openclaw-saas-builder/scripts/generate_rules.sh <项目名称> <简要说明>
阅读 references/saas-doc-templates.md 了解预期章节结构。
如果用户要求图表,请先在 Markdown 中生成 Mermaid 图表。
阶段三:实施计划
将工作分解为有序的小里程碑。
使用 TODO.md 或里程碑列表。
推荐的里程碑模式:
- 1. 初始化仓库
- 搭建应用框架
- 核心业务逻辑
- 认证与数据
- UI 与优化
- 测试
- 文档
- 发布仓库
- 部署
阶段四:构建
根据复杂度选择构建路径。
中小型任务
- - 直接检查文件
- 使用 Gemini CLI 生成规范、代码草稿或审查
- 使用 OpenClaw 工具编辑文件
- 本地运行测试
大型编码任务
优先使用 ACP 或编码代理进行实施循环。
将 Gemini CLI 作为规划和审查支持,而非唯一的编码引擎。
阶段五:GitHub 仓库创建
仅在用户明确要求或明确请求端到端设置时执行此操作。
典型本地流程:
- 1. 如有需要,初始化 git
- 创建 README 和基础文档
- 验证 gh auth status
- 使用合理的名称创建仓库
- 设置远程仓库
- 提交初始版本
- 推送默认分支
在适当时使用辅助脚本:
bash
./skills/openclaw-saas-builder/scripts/creategithubrepo.sh <仓库名称> [--private|--public]
使用 GitHub 技能获取详细的命令模式。
命名建议:
- - 使用简短、可读的短横线命名
- 优先使用产品名称或功能名称,避免模糊命名
- 除非用户要求,否则避免使用玩笑名称
阶段六:可选 Vercel 部署
仅在用户要求部署时执行此操作。
部署前,验证:
bash
which vercel
vercel --version
vercel whoami
如果 Vercel 认证未就绪,请停止并明确说明。
不要假装部署就绪。
在适当时使用辅助脚本:
bash
./skills/openclaw-saas-builder/scripts/deploy_vercel.sh
典型流程:
- 1. 验证框架和构建输出
- 确认环境变量
- 如有需要,运行 Vercel 链接或初始化
- 部署
- 捕获部署 URL
- 将部署说明写入 deployment.md
安全与审批规则
以下操作会改变外部环境,应视为明确的用户意图操作:
- - 创建远程仓库
- 推送提交到远程
- 创建云项目
- 部署到 Vercel
- 发送 Webhook 或邮件
规划、文档、脚手架和本地实施可以正常进行。
对于外部副作用,如果请求不明确,请确认用户意图。
在本技能中使用 Gemini CLI
使用 gemini-cli 技能模式。
推荐辅助脚本:
- - ./skills/gemini-cli/scripts/checkgemini.sh
- ./skills/gemini-cli/scripts/geminijsonvalidate.sh
- ./skills/gemini-cli/scripts/geminireview.sh
- ./skills/gemini-cli/scripts/geminiwithmodel.sh
推荐的 Gemini 用途:
- - 头脑风暴产品方向
- 生成 JSON 规范
- 起草架构备选方案
- 起草落地页文案
- 审查重写的文件
- 为仓库或产品命名
不推荐的用途:
- - 盲目执行 Gemini 生成的 Shell 命令
- 信任无效的 JSON
- 让 Gemini 在未经审查的情况下决定外部副作用
按项目阶段推荐的产出
早期阶段
- - requirements.md
- architecture.md
- Rules.md
- TODO.md
中期阶段
- - 代码脚手架
- 组件和模块计划
- .env.example
- 测试清单
后期阶段
- - README.md
- deployment.md
- GitHub 仓库
- 部署 URL
参考资料
需要时阅读以下文件:
- - references/saas-doc-templates.md
- references/repo-and-deploy-checklist.md
- references/saas-build-modes.md
当项目包含营销网站或落地页时,使用 skills/gemini-cli/references/website-prompts.md。
发布就绪说明
本技能旨在实用而非神奇。
它假设:
- - Gemini CLI 已安装并认证
- GitHub CLI 已安装并认证(用于创建仓库)
- Vercel CLI 已安装并认证(用于部署)
- OpenClaw 仍负责验证、编辑和安全决策的编排