Codebase to Course
zarazhangrui/codebase-to-course
Turns a codebase into an interactive single-page HTML course for non-technical learners, with scroll modules, animated diagrams, quizzes and plain-English code translations.
Maps the structure of an OpenMAIC stage document so an agent can find the right path, read it and patch quizzes, widgets, actions and project pages without guessing.
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install THU-MAIC/OpenMAIC stage-dsl --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .claude/skills/stage-dsl && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .claude/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dslType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install THU-MAIC/OpenMAIC stage-dsl --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .agents/skills/stage-dsl && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .agents/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install THU-MAIC/OpenMAIC stage-dsl --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .cursor/skills/stage-dsl && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .cursor/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/THU-MAIC/OpenMAIC.git --path skills/agent-runtime/stage-dsl--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install THU-MAIC/OpenMAIC stage-dsl --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .gemini/skills/stage-dsl && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .gemini/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install THU-MAIC/OpenMAIC stage-dslInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .github/skills/stage-dsl && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .github/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install THU-MAIC/OpenMAIC stage-dsl --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/agent-runtime/stage-dsl .opencode/skills/stage-dsl && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "stage-dsl" agent skill from https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl into .opencode/skills/stage-dsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stage-dsl", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
stage-dslMaps the structure of an OpenMAIC stage document so an agent can find the right path, read it and patch quizzes, widgets, actions and project pages without guessing.
A stage holds metadata, an outline that records the generation plan, and an ordered list of scenes shown as pages. Each scene's `type` must match its `content.type`. The skill is a map, not a field manual: it explains which subtree owns a value, which path to read, and which reference chapter to load before writing anything.
It lays out the tool vocabulary: `read_stage` to inspect a path, `patch_stage` to edit scene content or actions with JSON Pointer operations, `grep_stage` for literal search, `list_folder_stages` for stage ids, `edit_deck` for inserting, deleting, reordering or retitling pages, and `create_stage`, `generate_scene` and `set_roster` for building a new stage. Scenes can be addressed by order or id, and a compact tree view helps find a target while the source view gives the exact JSON.
Field-level references cover actions, project-based learning, quizzes and interactive widgets. Orders are counted from one while array indices inside source JSON start at zero, and large inline media is shown as a read-only placeholder when reading. The separate slide-dsl skill remains the full manual for slide canvases.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 7d324aa. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
OpenMAIC Stage Document Map loads about 2.4k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 125 tokens; SKILL.md has 1,133 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from THU-MAIC/OpenMAIC at commit 7d324aa, republished under its MIT licence (© THU-MAIC). 1,133 words, ~2,358 tokens.
.claude/skills/stage-dsl/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.This is a map, not the field manual.
Use it to decide which subtree owns a value, which path to read, and which reference chapter to load. Then read the exact source before writing.
The durable structure is:
stage
├── outline
└── scenes[] ordered by scene.order, shown as pages 1..N
├── id stable scene identity
├── order 1-based page position
├── type slide | quiz | interactive | pbl
├── content shape selected by scene.type
│ ├── slide.canvas
│ ├── quiz.questions[]
│ ├── interactive.html / widgetConfig
│ └── pbl.projectV2
└── actions[] ordered playback verbsstage is the stage's metadata. outline is the generation plan. A persisted page
is a scene. Its type and content.type must agree.
The three generic tools do not replace page-list operations. Insert, delete,
reorder, and retitle pages with edit_deck.
| Need | Tool | How |
|---|---|---|
| Read a scene | read_stage | `path:/scenes/<order |
| Edit scene content or actions | patch_stage | `target:/scenes/<order |
| Search visible text or source | grep_stage | literal search over the whole stage |
| List stages in folders | list_folder_stages | returns the explicit stageId required by every stage tool |
| Insert, delete, reorder, or retitle pages | edit_deck | page-list operations stay outside the document patcher |
| Plan and build a new stage | conversation + create_stage + generate_scene | settle the page plan in conversation, then call generate_scene once per page with an explicit brief |
| Set the classroom cast | set_roster | write the settled roster before page generation |
| Path | Resolves to |
|---|---|
"" or omitted | the whole stage |
/outline | the persisted outline snapshot |
/scenes/3 | the scene whose order is 3 |
/scenes/scene_abc | the scene with that stable id |
/scenes/scene-abc | the historical hyphenated scene-id form |
/scenes/3/actions | only scene 3's action array |
Orders are 1-based. Array indices inside source JSON are 0-based.
detail:"tree" is the compact structural inventory. It reports scene id,
order, type, title, element/question/project counts, and action counts. It is
for finding a target, never for reconstructing a write value.
detail:"source" is the exact JSON at the selected path. A scene source is the
persisted scene object, so writable pointers begin /content/... or
/actions/.... Inline media bytes larger than 2 KiB are replaced in this read
projection by a read-only placeholder. The stored document is unchanged.
detail:"text" is the visible-text projection. Use it to find learner-facing
copy or prove that old wording no longer remains. It deliberately omits known
internal PBL prompts and runtime state.
Source and text responses are character-paged after 12,000 characters. Pass
the returned nextOffset back as offset until it disappears.
target is one scene path: /scenes/<order|sceneId>.
Every call carries a human intent and one or more ops. The ops are atomic:
the server applies them to a clone, validates the resulting scene, and writes
once. If op 2 fails, op 1 is not persisted.
| Op | Fields | Meaning |
|---|---|---|
set | path, value | replace an existing leaf or add an optional object key |
remove | path | delete an existing object key or splice an array index |
str_replace | path, oldText, newText, optional replaceAll | replace one exact occurrence of oldText inside the string field at path; replaceAll:true replaces every occurrence |
add_element | element, optional afterId or index | add one complete id-less slide element |
delete_element | elementId | delete one slide element by stable id |
Set/remove/str_replace paths are JSON Pointers rooted at the scene source:
/content/canvas/elements/0/content
/content/questions/1/options/0/label
/content/widgetConfig/description
/content/projectV2/milestones/0/title
/actions/2/textEscape / in an object key as ~1 and ~ as ~0. Array indices are
canonical zero-based integers: 0, 1, 2, never 03, -1, or +1.
Every intermediate segment must exist. set may create only the final object
key. remove requires the final key or array slot to exist.
For a change inside a large HTML document or long text field, prefer
str_replace over rewriting the whole field with set: transcribing 27 KB of
HTML to change one number is expensive, and any transcription error silently
corrupts the page. Read detail:"source", pick a short unique anchor, replace
it, then read back and grep_stage to verify. oldText must appear exactly
once in the stored string; on multiple matches extend the anchor or set
replaceAll:true. Neither oldText nor newText may contain a read-side
media omission placeholder; newText may be empty to delete the anchor.
Scene metadata is not writable here. Paths must begin /content/ or
/actions/; use edit_deck for page metadata and page-list changes.
scope:"text" searches the visible-text projection. scope:"source"
searches serialized scene JSON, including field names and internal data.
Search is literal, case-insensitive, and applies NFKC to both query and source.
Thus half-width AI finds full-width AI. Result start and end still slice
the original, unnormalized scene string correctly.
A call returns at most 10 matches per scene and 30 overall, within its time and
character budget. truncated:true always includes an opaque cursor. Repeat
the same query, scope, and stage with that cursor to continue.
For every edit:
detail:"source".detail:"text" or grep_stage when the check is “no old copy remains.”Never build a patch from tree; it intentionally omits neighbouring fields.
Never copy a <… bytes omitted: …> media placeholder into a write. Supply a
new real URL/src or leave that field untouched.
| What you need to write | Read this first |
|---|---|
| Slide canvas, background, theme, any of the ten slide element types | Read the installed slide-dsl skill at the location shown in <available_skills>. It is the complete manual and its examples already use scene-root /content/canvas/... pointers. |
| Quiz questions, options, answers, grading fields | references/quiz.md |
| Interactive HTML or typed widget configuration | references/widget.md |
| Narration, spotlight, whiteboard, video, discussion, or widget playback actions | references/actions.md |
| PBL projectV2 roles, milestones, microtasks, packaged design, or runtime-owned fields | references/pbl.md |
Slides use the closed slide element schema and reject unknown fields, wrong types, missing required fields, id changes, and element-type changes.
Quiz writes add a closed question/option check around the current document validator. Interactive content is closed at its content root, but historical widgetConfig objects remain intentionally tolerant below that root. PBL is closed at its content root, while the existing projectV2 validator requires its core containers and deliberately tolerates historical runtime extension fields.
That difference matters: “accepted” means the current persisted contract accepted the shape, not that every value is pedagogically sound or every renderer consumes it. The reference chapters name the hard boundary and the known semantic boundary separately.
/content/... and /actions/....str_replace with a short unique anchor instead of rewriting the whole field.add_element and delete_element for slide element identity changes.© THU-MAIC, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in skills/agent-runtime/stage-dsl of THU-MAIC/OpenMAIC.
Open the folder on GitHubat commit 7d324aa
OpenMAIC Stage Document Map next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| OpenMAIC Stage Document Map this skillTHU-MAIC/OpenMAIC | 40k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Codebase to Coursezarazhangrui/codebase-to-course | 5.7k | — | ~4.4k | Automated safety check: Pass | None | |
| Claude Code Self-Assessment Advisorlhfer/claude-howto-zh-cn | 2.3k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Lesson Generatordair-ai/dair-academy-plugins | 614 | 2 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Canvas Reading AnnotationX-isdoingreat/canvas-pilot | 125 | — | ~8.4k | Automated safety check: Notes | AGPL-3.0 | |
| Content Evaluation Frameworkaiskillstore/marketplace | 433 | — | ~3k | Automated safety check: Pass | None |
zarazhangrui/codebase-to-course
Turns a codebase into an interactive single-page HTML course for non-technical learners, with scroll modules, animated diagrams, quizzes and plain-English code translations.
lhfer/claude-howto-zh-cn
Quizzes you on Claude Code in a quick or deep mode, scores your level across 10 topics and recommends what to learn next, in Chinese.
dair-ai/dair-academy-plugins
Builds a self-contained multi-lesson course page with lesson navigation, objectives, flashcards, quizzes and source links, as plain HTML, CSS and JavaScript.
X-isdoingreat/canvas-pilot
Generic reading-annotation handler for academic-writing courses — annotates reading PDFs with color-coded highlights + margin notes + filled answer blanks per the instructor's rubric.
aiskillstore/marketplace
This skill should be used when evaluating the quality of book chapters, lessons, or educational content.
HKUDS/DeepTutor
Teaches the agent to set up and run DeepTutor from the command line: chat and capabilities, knowledge bases, partners, memory, sessions, notebooks and the server or Web app.
THU-MAIC/OpenMAIC
Guides setup, classroom generation and secondary development for OpenMAIC, the multi-agent interactive classroom, one confirmed phase at a time.
THU-MAIC/OpenMAIC
Designs a Chinese K-12 classroom for one OpenMAIC stage around the core-literacy model, using authentic tasks, performance assessment and observable evidence.
THU-MAIC/OpenMAIC
Designs a review-and-practice lesson around an independent first attempt, targeted feedback, supported practice, a fresh independent check and a next step.
THU-MAIC/OpenMAIC
Derives a reusable personal skill for course-making from a representative sample of the user's own past classrooms and chat history, confirmed with them before saving.
THU-MAIC/OpenMAIC
Plans a multi-classroom series such as a seven-day course, clarifies the brief in rounds, gets sign-off on the full lesson list, then builds each stage in a shared folder.
THU-MAIC/OpenMAIC
Plans online courses so learners manipulate simulations, diagrams, code, games or 3D scenes on most pages, with slides only for the opening and the close.
Categories
Maps the structure of an OpenMAIC stage document so an agent can find the right path, read it and patch quizzes, widgets, actions and project pages without guessing. A stage holds metadata, an outline that records the generation plan, and an ordered list of scenes shown as pages.type`.
OpenMAIC Stage Document Map fits situations like: patching a part of a stage you have not edited before; recovering after patch_stage rejects an operation; locating the field that holds a quiz question, widget or action; deciding whether a change needs edit_deck instead of patch_stage.
Run `npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a claude-code`. Or copy the skill folder (skills/agent-runtime/stage-dsl in THU-MAIC/OpenMAIC) into .claude/skills/stage-dsl in your project. Claude Code loads it when a task matches its description.
Run `npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a codex`. Or copy the skill folder (skills/agent-runtime/stage-dsl in THU-MAIC/OpenMAIC) into .agents/skills/stage-dsl in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add THU-MAIC/OpenMAIC --skill stage-dsl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stage-dsl, .gemini/skills/stage-dsl, .github/skills/stage-dsl and .opencode/skills/stage-dsl in your project.
SKILL.md names no scripts, command-line tools or credentials: OpenMAIC Stage Document Map is instructions for the agent only. Our summary lists: An OpenMAIC stage with the read_stage, patch_stage and grep_stage tools available.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
OpenMAIC Stage Document Map is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with OpenMAIC Stage Document Map: Codebase to Course (zarazhangrui/codebase-to-course, 5.7k stars), Claude Code Self-Assessment Advisor (lhfer/claude-howto-zh-cn, 2.3k stars), Lesson Generator (dair-ai/dair-academy-plugins, 614 stars) and Canvas Reading Annotation (X-isdoingreat/canvas-pilot, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
THU-MAIC (a GitHub organization) maintains it in THU-MAIC/OpenMAIC, which has 40,274 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 10, 2026.
Source: THU-MAIC/OpenMAIC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.