stage-dsl
できること
このスキルは、OpenMAICの教室の背後にある構造の地図で、どの部分がどの値を保持しているかを示します。教室を直接読んだり編集したりする人やAIのためのものです。
使う場面
- ✓教室の中で、ある値がどこに保存されているかを見つけたいとき。
- ✓教室への編集が拒否され、その理由を理解する必要があるとき。
- ✓教室のすべてのページで、ある単語を検索したいとき。
スキルのリンク
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/stage-dsl/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この教室のうち、「予算」という語が含まれるページをすべて探して、それぞれの保存場所を示してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは教室の読み取り、編集、検索のツールを使い、この地図に従って、書き込みの前に構造の正しい部分を選びます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
The stage document map
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 document model
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 verbs
stage 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.
Tool vocabulary
| 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 |
Addressing with read_stage
| 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.
Writing with patch_stage
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/text
Escape / 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 exi
よくある質問
ページの種類にはどんなものがありますか?
スライド、クイズ、インタラクティブ、PBLのページの種類があります。
ページを追加・削除するにはどうしますか?
スキルは、ページを挿入、削除、並べ替え、タイトルの変更をするために、ページ一覧のツールを使うよう示しています。
これは完全な項目のガイドですか?
いいえ。スキルは地図であり、より詳しいリファレンスの章を指しています。
詳細
作者による元の説明
The map for reading and editing an OpenMAIC stage document with read_stage, patch_stage, and grep_stage. Load it before patching a structure you have not patched before, when patch_stage rejects an operation, or whenever the path from a stage, outline, scene, content object, or action to the field you need is uncertain. It routes to field-level references for quizzes, interactive widgets, actions, and PBL projects; the installed slide-dsl skill remains the complete slide canvas manual.
repo: THU-MAIC/OpenMAIC
人気
- GitHubのスター
- 42k
- ランキング
- #6412
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
build-personal-skill
42k過去のコース作成の記録やチャットを、自分の履歴に見られるパターンに基づいて、個人向けの再利用可能なスキルに変えるのを支援します。
curriculum-planner
42k一週間の講座や、章ごとに分けた本など、つながりのある一連の授業を計画し、承認を得てから一つずつ作るのを支援します。
deep-interactive
42kスライドを読ませるのではなく、ほとんどのページで、学習者がシミュレーション、図、コード、ゲームを操作できるコースを設計するのを支援します。
deep-research
42k最近の事実や事実に基づくトピックについて、まず生きている情報源を調べ、各主張を確認した情報源に結び付けてコースを作るのを支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。