Hosted-only OpenMAIC skill for Jimmy's fork. Guides users to generate AI classrooms using the hosted open.maic.chat service via OpenClaw. No local setup required.
This skill guides users through generating AI classrooms using hosted-only OpenMAIC. No local installation, provider configuration, or server startup needed.
If present, read defaults from ~/.openclaw/openclaw.json under:
{
"skills": {
"entries": {
"openmaic": {
"enabled": true,
"config": {
"accessCode": "sk-xxx"
}
}
}
}
}
accessCode is present, use it directly. Do not ask the user to paste it.accessCode, guide the user to get one from open.maic.chat and add it to the config file.Read ~/.openclaw/openclaw.json:
accessCode is found: Announce the code is stored, skip to Phase 2.To generate classrooms, you need an access code from open.maic.chat.
1. Visit https://open.maic.chat and get your access code (starts with sk-)
2. Add it to ~/.openclaw/openclaw.json under:
skills.entries.openmaic.config.accessCode
3. Tell me when you're done.
Wait for confirmation before continuing.Step 2a — Check service health (no auth):
GET https://open.maic.chat/api/health
capabilities object from data.capabilities. You will use this in Phase 2.5.Step 2b — Verify access code (obtain session cookie):
POST https://open.maic.chat/api/access-code/verify
Content-Type: application/json
{ "code": "<access-code>" }
openmaic_access session cookie. Save this cookie — include it in all subsequent requests.Based on the capabilities from Phase 2a, offer optional preferences before asking for the topic.
Always ask for language:
請選擇課程語言:
- 中文 (zh-CN)
- 英文 (en-US)
Always offer agent mode:
教師角色模式:
default— 使用預設的教師/學生角色(速度較快)generate— 由 AI 根據主題生成專屬角色(內容更豐富,但稍慢)
Only present optional features when the corresponding capability is true:
| Feature | Capability flag | Recommend |
|---|---|---|
| 網路搜尋 (Web search) | capabilities.webSearch | ✅ 推薦開啟 |
| 圖片生成 | capabilities.imageGeneration | 選填 |
| 影片生成 | capabilities.videoGeneration | 選填 |
| 語音朗讀 (TTS) | capabilities.tts | 選填 |
If none of the optional capabilities are true, skip feature selection and proceed directly to Phase 3.
Load references/hosted-generate-flow.md for the complete technical API flow.
Follow these steps:
Collect input: Ask for topic text, or ask to upload a PDF (confirm before reading from disk). Combine with the preferences collected in Phase 2.5.
Submit request: POST to /api/generate-classroom with the full request body including all selected options.
Show live progress: While polling, display a progress bar and step label after each poll:
[████████░░] 80% — 生成場景 4/5...
Update the display on each response — do not print a new line per poll; replace the previous status line.
Handle failure: If status === "failed", show the error field and offer to retry from the beginning.
Return result: When status === "succeeded", return the classroom URL on its own line:
https://open.maic.chat/classroom/<classroomId>
Include a brief summary: