page-clone
できること
このスキルは、既存のコースや取り込んだデッキからモデルとなるページをコピーし、デザインを保ったまま内容を差し替えます。新しいページを既存の様式に合わせたいコース作成者向けです。
使う場面
- ✓新しいページが、コースにある既存のページと全く同じ見た目であるべきとき。
- ✓取り込んだデッキがあり、そのデザインで新しいページがほしいとき。
- ✓レイアウトは保ちつつ、文言と内容だけを変えたいとき。
スキルのリンク
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/page-clone/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“スライド3と同じデザインで、インフレの原因を扱う新しいスライドを作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは、デザインをそのままにしてモデルのページを複製します。コピーの構造を読み、ページを描き直す代わりに、テキストの枠を一つずつ編集します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Cloning one page's design
The design already exists on another page. Your job is to put new content into that design without redrawing it: copy the page, then swap what it says.
Copy-then-edit is the only clone path in this runtime. generate_scene always
re-rolls a page from its outline entry — the model invents a fresh element tree
every time — so calling it on a copied page destroys exactly the design you came
for. Nothing here validates the shape of your result either: the design is
preserved because you copied it, and the judgement about which elements are
content and which are the skeleton is yours.
The sequence
duplicate_scene({ templateSceneId, targetOrder, title })— an exact copy of the model page at the position you want (templateOrderworks too, but an id is safer). The copy carries the full content, no narration actions, and a new outline entry. Pass atitlethat names the NEW page; the entry inherits the model page's brief, and a copy still called 「第 3 章回顾」 misleads both the learner and the narration step.- Read the copy with
read_stage,path:/scenes/<order|id>,detail:"source"— this is your address space and your fidelity source. It returns the whole page's persisted JSON, including raw content HTML, inline spans, fonts, colours, fills, shadows, geometry and z-order, and it is the root your patch paths are written against: a field you read at/content/canvas/elements/2/contentis written back through that same path. Copy unchanged markup and style fields from this result; do not reconstruct them from stripped text. - Decide, element by element, what each one is. Content slots are the ones whose words belong to the old subject. Skeleton is everything else — rules, bands, page numbers, logos, decorative shapes, background art — and it stays untouched even when it holds text.
- Call
patch_stageonce per content slot, withop:"set"on the exact path that holds that slot's words —/content/canvas/elements/3/contentfor a paragraph,/content/canvas/elements/5/data/0/0/textfor a table cell. One leaf per call: everything you do not name keeps the value you copied.slide-dslis the manual for which field holds the words in each element type. Do not patch geometry or style paths while cloning — they ARE the design you copied. - Read the copy with
read_stage detail:"text"after the edits. It returns every text-bearing element as{ path, id, type, text }plus a page-widecombinedText, so you read the whole page's words in one call and get the pointer to fix with them. Search it for source-topic residue; the read reports, and you decide what is stale, thenset,remove, ordelete_elementit. generate_actionson the copy to give it narration (audio is on by default). A duplicated page arrives silent.
Work one page at a time and re-read before you edit. Every patch_stage result
already carries the page's fresh inventory, so a run of edits on the same page
needs one read_stage call at the start, not one
per call.
Where a change goes
For a cloned slide, patch_stage uses set, remove, str_replace,
add_element, and delete_element; for cloning the usual choice is set on
the smallest content leaf. The only question is which path carries the change.
| Need | Call | What really happens |
|---|---|---|
| New words in a text block | set /content/canvas/elements/N/content |
Stores your HTML byte for byte — nothing filters it; preserve the source element's <span> marks and inline styles while changing the words |
| New words in a shape's label | set /content/canvas/elements/N/text/content |
Only the label's HTML moves; font, colour, vertical alignment, line height, shape fill and path all stay |
| One table cell | set /content/canvas/elements/N/data/0/0/text |
One cell's plain text; every other cell, id, colspan, rowspan and per-cell style is untouched |
よくある質問
新しいページを生成すればよいのではないですか?
スキルによると、ページを生成すると、デザインが最初から作り直されてしまうため、モデルのページの見た目が失われます。
コピーにはナレーションも残りますか?
スキルによると、コピーは内容すべてを持ちますが、ナレーションの動作は持ちません。
なぜコピーの名前を変えるのですか?
スキルによると、タイトルは新しい主題の名前にすべきです。そうしないと、学習者やナレーションの手順を誤解させるおそれがあります。
詳細
作者による元の説明
Building one page that looks like a page the course already has — copy the model page with `duplicate_scene`, then rewrite the copy's words with one `patch_stage` op per content slot. Use when a new page has to inherit an existing page's design, whether the model page came from an imported deck or the course wrote it earlier. Not for revising a page that is already the page you want (that is `pro-editing`), and not for the course-level work of cataloguing layouts and assigning one per outline entry (that is `style-clone`).
repo: THU-MAIC/OpenMAIC
人気
- GitHubのスター
- 42k
- ランキング
- #6407
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
build-personal-skill
42k過去のコース作成の記録やチャットを、自分の履歴に見られるパターンに基づいて、個人向けの再利用可能なスキルに変えるのを支援します。
curriculum-planner
42k一週間の講座や、章ごとに分けた本など、つながりのある一連の授業を計画し、承認を得てから一つずつ作るのを支援します。
deep-interactive
42kスライドを読ませるのではなく、ほとんどのページで、学習者がシミュレーション、図、コード、ゲームを操作できるコースを設計するのを支援します。
deep-research
42k最近の事実や事実に基づくトピックについて、まず生きている情報源を調べ、各主張を確認した情報源に結び付けてコースを作るのを支援します。
似ているスキル
canvas
394k接続されたMacのパネルにホスト型のビジュアルウィジェットを表示し、そのパネルを隠したり別のページに移動したりするようエージェントを支援します。
control-ui
394kセッション、ダッシュボード、接続されたGatewayを含め、OpenClaw Control UIを整理し、問題を解決するようエージェントを支援します。
diagram-maker
394kプロセス、システムのアーキテクチャ、ホワイトボードのスケッチのために、SVG、HTML、または編集可能なExcalidrawとして、分かりやすい図を作るようエージェントを支援します。