OpenMAIC Skill
Use this as a guided, confirmation-heavy SOP. Do not compress the whole setup into one reply and do not perform state-changing actions without explicit user confirmation.
Core Rules
- - Move one phase at a time.
- Before any state-changing action, ask for confirmation.
- If local state already exists, show what you found and ask whether to keep it.
- Do not assume the OpenClaw agent's own model or API key will be reused by OpenMAIC.
- OpenMAIC classroom generation uses OpenMAIC server-side provider config.
- This skill must not rely on any request-time model or provider overrides.
- Only OpenMAIC server-side config files may control provider selection and defaults.
- Do not default to asking the user to paste API keys into chat.
- Prefer guiding the user to edit local config files themselves.
- Do not offer to write API keys into config files on the user's behalf.
- Once setup is complete and the user clearly asks to generate a classroom, do not ask for a second confirmation before submitting the generation job.
- Keep confirmations for local file reads such as reading a PDF from disk.
Optional Skill Config
If present, read defaults from ~/.openclaw/openclaw.json under:
CODEBLOCK0
- - If
accessCode is present, default to hosted mode and skip the mode-selection prompt. - Use
repoDir and url only as defaults for local mode. - Still confirm before acting.
SOP Phases
0. Choose Mode
First check skill config for accessCode. If present, announce that a stored access code was found and proceed directly to hosted mode (load references/hosted-mode.md, skip phases 1–4). Do not ask the user to paste the code again.
If no accessCode in config, ask the user how they want to use OpenMAIC:
- 1. Use hosted OpenMAIC (recommended for quick start) — Requires an access code from open.maic.chat. No local setup needed.
- Run locally — Clone the repo, configure provider keys, and run on your machine.
If the user chooses hosted mode, load references/hosted-mode.md and skip phases 1–4.
If the user chooses local mode, proceed to phase 1 as usual.
1. Clone Or Reuse Existing Repo
Load references/clone.md.
Use this when the user has not installed OpenMAIC yet or when you need to confirm which local checkout to use.
2. Choose Startup Mode
Load references/startup-modes.md.
Use this after the repo location is confirmed. Present the available startup modes, recommend one, and wait for the user's choice.
3. Configure Provider Keys
Load references/provider-keys.md.
Use this before starting classroom generation. Recommend a provider path and tell the user exactly which config file to edit themselves. If generation later fails due to provider/model/auth issues, return to this phase and direct the user to update the same server-side config files.
After the core LLM key is configured, ask the user if they want to enable optional features (web search, image generation, video generation, TTS). Each requires its own provider key — see the "Optional Features" section in provider-keys.md.
4. Start And Verify OpenMAIC
After the user has chosen a startup mode and configured keys, start OpenMAIC using the chosen method, then verify the service with GET {url}/api/health.
5. Generate A Classroom
Load references/generate-flow.md.
Use this only after the service is healthy. Confirm before reading local PDFs. If the user has already clearly asked to generate, do not ask for a second confirmation before submitting the generation job, and then follow the polling loop until it succeeds or fails. Only send the supported content fields for generation requests. For long-running jobs, prefer sparse polling and tell the user to check back later if the turn ends before completion.
Response Style
- - Keep each step short and explicit.
- Prefer 2-3 concrete options when the user must choose.
- Always include the recommended option first and explain why in one sentence.
- After a step completes, say what changed and what the next confirmation is for.
- When returning a classroom link, place the raw absolute URL on its own line with no bold, markdown link syntax, code formatting, or tables.
OpenMAIC 技能
请将此作为一份引导式、需多次确认的标准操作流程。不要将整个设置压缩到一次回复中,且未经用户明确确认不得执行状态变更操作。
核心规则
- - 一次只推进一个阶段。
- 在执行任何状态变更操作前,先请求确认。
- 如果本地状态已存在,展示你所发现的内容,并询问是否保留。
- 不要假设 OpenClaw 代理自身的模型或 API 密钥会被 OpenMAIC 复用。
- OpenMAIC 课堂生成使用 OpenMAIC 服务端提供的配置。
- 本技能不得依赖任何请求时的模型或提供商覆盖设置。
- 只有 OpenMAIC 服务端配置文件可以控制提供商选择和默认设置。
- 不要默认要求用户将 API 密钥粘贴到聊天中。
- 优先引导用户自行编辑本地配置文件。
- 不要主动替用户将 API 密钥写入配置文件。
- 一旦设置完成且用户明确要求生成课堂,在提交生成任务前不要再次请求确认。
- 对本地文件读取(如从磁盘读取 PDF)保留确认环节。
可选技能配置
如果存在,从 ~/.openclaw/openclaw.json 的以下路径读取默认值:
jsonc
{
skills: {
entries: {
openmaic: {
enabled: true,
config: {
accessCode: sk-xxx,
repoDir: /path/to/OpenMAIC,
url: http://localhost:3000
}
}
}
}
}
- - 如果存在 accessCode,默认使用托管模式并跳过模式选择提示。
- 仅将 repoDir 和 url 作为本地模式的默认值使用。
- 操作前仍需确认。
标准操作流程阶段
0. 选择模式
首先检查技能配置中是否有 accessCode。如果存在,告知用户找到了存储的访问码,并直接进入托管模式(加载 references/hosted-mode.md,跳过阶段 1-4)。不要要求用户再次粘贴该码。
如果配置中没有 accessCode,询问用户希望如何使用 OpenMAIC:
- 1. 使用托管版 OpenMAIC(推荐快速上手)—— 需要从 open.maic.chat 获取访问码。无需本地设置。
- 本地运行 —— 克隆仓库,配置提供商密钥,并在本地机器上运行。
如果用户选择托管模式,加载 references/hosted-mode.md 并跳过阶段 1-4。
如果用户选择本地模式,按常规进入阶段 1。
1. 克隆或复用现有仓库
加载 references/clone.md。
当用户尚未安装 OpenMAIC 或需要确认使用哪个本地检出版本时使用此阶段。
2. 选择启动模式
加载 references/startup-modes.md。
在仓库位置确认后使用此阶段。展示可用的启动模式,推荐一种,并等待用户选择。
3. 配置提供商密钥
加载 references/provider-keys.md。
在开始课堂生成前使用此阶段。推荐一个提供商路径,并明确告知用户需要自行编辑哪个配置文件。如果后续生成因提供商/模型/认证问题失败,返回此阶段并引导用户更新相同的服务端配置文件。
核心大语言模型密钥配置完成后,询问用户是否要启用可选功能(网络搜索、图像生成、视频生成、文本转语音)。每个功能都需要各自的提供商密钥——详见 provider-keys.md 中的可选功能部分。
4. 启动并验证 OpenMAIC
用户选择启动模式并配置密钥后,使用所选方法启动 OpenMAIC,然后通过 GET {url}/api/health 验证服务是否正常运行。
5. 生成课堂
加载 references/generate-flow.md。
仅在服务健康检查通过后使用此阶段。在读取本地 PDF 前进行确认。如果用户已明确要求生成,在提交生成任务前不要再次请求确认,然后按照轮询循环直到成功或失败。仅发送生成请求所支持的内容字段。对于长时间运行的任务,优先采用稀疏轮询,并告知用户如果对话回合在完成前结束,请稍后再回来查看。
回复风格
- - 每一步保持简短明确。
- 当用户需要选择时,优先提供 2-3 个具体选项。
- 始终将推荐选项放在第一位,并用一句话解释原因。
- 步骤完成后,说明发生了什么变化以及下一步需要确认什么。
- 返回课堂链接时,将原始绝对 URL 单独放在一行,不使用粗体、Markdown 链接语法、代码格式或表格。