Agent skill

OpenMAIC Page Clone

by THU-MAIC in THU-MAIC/OpenMAIC

Builds a new course page in an existing page's design by duplicating the model page and replacing its words one content slot at a time with patch operations.

MITAuto-check passedEducation

Install OpenMAIC Page Clone

skills CLI
$ npx skills add THU-MAIC/OpenMAIC --skill page-clone -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install THU-MAIC/OpenMAIC page-clone --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-runtime/page-clone .claude/skills/page-clone && rm -rf skills-src

Use ~/.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/

Facts

Skill name
page-clone
GitHub stars
40k
Token cost
~3.5k tokens
SKILL.md length
1,928 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

Builds a new course page in an existing page's design by duplicating the model page and replacing its words one content slot at a time with patch operations.

  • Works in 6 steps: duplicate_scene({ templateSceneId,… → **Read the copy with read_stage,… → Decide, element by element, what each… → …
  • Making a new course page that inherits the design of an existing one
  • SKILL.md covers The sequence, Where a change goes, When the new content does not… and Overflow discipline, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

To give a new page the look of one the course already has, the agent copies it with duplicate_scene at the chosen position and a title that names the new page, then rewrites only the words. The skill explains why copy-then-edit is the only clone path: generate_scene re-rolls a page from its outline entry and invents a fresh element tree, which would destroy the design being preserved.

After the copy, the agent reads the page with read_stage at source detail to get the exact JSON that serves as both fidelity source and address space, decides element by element what is content and what is skeleton, and calls patch_stage once per content slot with a set operation on the exact path holding the words. Rules, bands, page numbers, logos and background art stay untouched, geometry and style paths are never patched, and a final read at text detail checks the result. It is not for revising a page you already like, which is pro-editing, or for course-wide layout assignment, which is style-clone.

When your agent uses it

  • Making a new course page that inherits the design of an existing one
  • Reusing a page from an imported deck as the model for new content
  • Replacing a copied page's text without disturbing its layout

Example prompts

  • “Make page seven look like the chapter review page, but with the content on photosynthesis.”
  • “Copy the comparison page from the imported deck and put our pricing lessons in it.”
  • “Clone the title layout of page one for the new unit opener.”

Requirements

  • A course with at least one existing model page, in the OpenMAIC runtime

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. duplicate_scene({ templateSceneId, targetOrder, title }) — an exact copy
  2. **Read the copy with read_stage, path:/scenes/,
  3. Decide, element by element, what each one is. Content slots are the ones
  4. Call patch_stage once per content slot, with op:"set" on the exact
  5. Read the copy with read_stage detail:"text" after the
  6. generate_actions on the copy to give it narration (audio is on by

What it can do on your machine

Read from SKILL.md and the folder at commit 6a84dbe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OpenMAIC Page Clone loads about 3.5k tokens when it runs. Until then it costs about 135 tokens; SKILL.md has 1,928 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from THU-MAIC/OpenMAIC at commit 6a84dbe, republished under its MIT licence (© THU-MAIC). 1,928 words, ~3,484 tokens.

Download SKILL.mdSave it as .claude/skills/page-clone/SKILL.md (or your agent's skills folder).
name
page-clone
description
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`).
title
页面克隆

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

  1. duplicate_scene({ templateSceneId, targetOrder, title }) — an exact copy of the model page at the position you want (templateOrder works too, but an id is safer). The copy carries the full content, no narration actions, and a new outline entry. Pass a title that 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.
  2. 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/content is written back through that same path. Copy unchanged markup and style fields from this result; do not reconstruct them from stripped text.
  3. 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.
  4. Call patch_stage once per content slot, with op:"set" on the exact path that holds that slot's words — /content/canvas/elements/3/content for a paragraph, /content/canvas/elements/5/data/0/0/text for a table cell. One leaf per call: everything you do not name keeps the value you copied. slide-dsl is 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.
  5. 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-wide combinedText, 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, then set, remove, or delete_element it.
  6. generate_actions on 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.

NeedCallWhat really happens
New words in a text blockset /content/canvas/elements/N/contentStores 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 labelset /content/canvas/elements/N/text/contentOnly the label's HTML moves; font, colour, vertical alignment, line height, shape fill and path all stay
One table cellset /content/canvas/elements/N/data/0/0/textOne cell's plain text; every other cell, id, colspan, rowspan and per-cell style is untouched
One line of codeset /content/canvas/elements/N/lines/1/contentOne line's text, with every line id kept — language, filename, font size and box survive
A formulaset /content/canvas/elements/N/latexReplaces the source and re-renders the cached KaTeX html the renderer actually paints
A chart label or numberset /content/canvas/elements/N/data/labels/2One entry; keep labels, legends and series dimensionally consistent
A different imageset /content/canvas/elements/N/srcPoints the element at another source. It never creates a picture — get a real src from generate_image first, and keep the original rather than invent a URL
Nudge a boxset /content/canvas/elements/N/left (or top / width / height)One number at a time. On a cloned page this is a repair, not a step
Drop an optional fieldremove /content/canvas/elements/N/fillDeletes that key. remove on a path that is not there fails, and so does removing a required field
One content slot too manydelete_element (elementId)Removes the element and any animation bound to it
A genuinely new elementadd_element (complete element JSON, no id)Validates every field and rich-text value, assigns the id, inserts at afterId or index
Restack overlapping elementsset /content/canvas/elementsThe only change with no leaf — write the array whole, reordered, with the same ids and types
Rename the pageedit_deck retitleTitle only, in both the deck and the outline entry

Three properties make this safe to lean on, and all three are worth knowing before you do: only the path you name changes, identity is not patchable (the id set and each id's type must come back identical, which is why adding or removing an element has its own op), and a rejected patch changes nothing — a bad path, an unknown field, unsafe HTML or an invalid result fails loud with the page as it was. Nothing normalises your colours or fonts toward a house style either, which is the property that makes a copied design survive editing at all.

The content rule is simple: source HTML in, source HTML out. Change the text inside the returned paragraphs and spans; do not flatten the block to plain text or synthesize fresh styling. For lists, keep one <p> per item with the marker in the text (slide-craft explains why <ul> does not render its markers here).

When a cloned page needs one more slot, the cheapest honest source is an element already on it: read its JSON and add_element a copy with the words and box you want. add_element is full fidelity, so its caller supplies every geometry and style field — which is why an existing element is a better starting point than a blank one, and why this is the last resort rather than a step.

Show full SKILL.md (884 more words)Show less

When the new content does not fit the layout

This is the normal case, not an error: a layout with three bullet slots and content with seven points is a mismatch you resolve, and no tool will resolve it for you. In order of preference:

  1. Cut the content to the layout's capacity. A borrowed layout is a statement about how much can be said on one page. Tightening the expression preserves the design; growing the page destroys it.
  2. Split across two clones. Duplicate the model page again and carry the remainder onto the second copy. Two pages in the deck's own form beat one overstuffed page.
  3. Pick a roomier model page. If the course has a layout built for more content, clone that one and abandon this copy (edit_deck delete).
  4. Grow the layout, only as a last resort — add_element a copy of the closest content element, with its box set into the rhythm of the ones around it (match their left edge and spacing exactly, taken from the source boxes) and the new words already in it. You are now drawing, and it shows if you are careless.

Fewer content slots than the layout has is the easier direction: fill what you can meaningfully fill and delete_element the rest. Never leave a template's words standing on the page. A slot you neither replaced nor deleted is a bug — the old subject leaking into the new one — and a detail:"text" read with read_stage detail:"text" is the sweep that catches it before shipping.

Overflow discipline

Text sized for the model page's words is not sized for yours. Aim for the same order of magnitude as the text you replaced — that length was chosen for that box, and it is the only sizing information you have. When your replacement runs much longer, shorten the wording rather than resizing the box.

Verify with render_scene_preview when it is registered, and spend the calls where they buy something: the first page you clone from a given model page, and any later clone whose text is visibly longer than what it replaced. Skip it otherwise; previews cost calls. If a page overflows, load pro-editing and converge inside its budget of two preview rounds — shorten text first, and set a box only when the text is already tight. If two rounds have not converged, move the content to a roomier layout or name the page to the user. Do not ship a page with text running off it.

Finish the page

generate_actions on the copy, with a styleDirective when the surrounding pages have a register worth matching. Narration is written from the page's persisted content plus its outline entry, and that entry's brief came from the model page — so the content you just wrote has to be unambiguous on its own, and the title has to be the new page's title. Then read the result back with read_stage detail:"source" and check both halves of the result: every speech action carries an audioId, and every speech line is about this page's subject rather than the model page's — a narrated wrap-up or a topic name inherited from the brief is residue exactly as template words on the slide are. Repair it with patch_stage on that action's /actions/N/text pointer, then generate_tts the page so the audio matches the words.

Where this sits

  • style-clone governs the course-level job: reading an imported deck as a library of layouts, classifying them, and assigning one to each outline entry. It calls into this skill for the per-page mechanics.
  • slide-dsl is the field manual for the JSON you are patching — the ten element types, which field holds the words in each, what values are legal, and what the renderer really does with the HTML you write. Load it when you are about to patch a field you have not patched before, or when a patch comes back rejected.
  • pro-editing governs editing a page that is already the page you want. Load it when a clone comes out wrong, and follow its preview budget.
  • slide-craft is the design law the replacement content has to satisfy — the height table, the type scale, contrast pairs, how rich text really renders. Load it when a slot needs more than a like-for-like sentence swap.
  • stage-design still governs the build of the stage as a whole.

Hard rules

  • Copy, then edit. Never generate_scene on a copied page. It re-rolls the element tree from the outline entry and the borrowed design is gone.
  • Content changes; design does not. No geometry path, no style path, no new element and no restacking while cloning, unless the layout genuinely has to grow and you have read the neighbouring boxes first.
  • Every element ends up replaced, deliberately kept, or deleted. No template words survive by accident.
  • Always run the text sweep. read_stage detail:"text" returns every element's words plus one combinedText; read all of it, and fix what it turns up at the path it hands you. The read reports — it never decides or edits.
  • Facts do not travel with the layout. Text carried over from the model page is a claim in its new context; if it belongs to the old subject, it goes.
  • One page at a time. duplicate_scene, then that page's edits, then its actions — then the next page. Each write persists as it lands.

© 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

Files

Just SKILL.md in skills/agent-runtime/page-clone of THU-MAIC/OpenMAIC.

Open the folder on GitHubat commit 6a84dbe

Compare with similar skills

OpenMAIC Page Clone 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.

OpenMAIC Page Clone compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OpenMAIC Page Clone this skillTHU-MAIC/OpenMAIC40k—~3.5kAutomated safety check: PassMIT
Teaching Resource Research Skillmingchen666/Reviva241—~1kAutomated safety check: PassNone
Lecture Slides SummarizerLi-Baichuan-James/summarize-slides-skill312—~6.7kAutomated safety check: PassMIT
Canva Classroom Helpercanva-sdks/canva-skills117—~2.1kAutomated safety check: PassApache-2.0
Canvas Reading AnnotationX-isdoingreat/canvas-pilot125—~2.3kAutomated safety check: PassAGPL-3.0
Mira Quizsandeco/mira-animator218—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Find, verify, and curate teaching resources for lesson preparation.

    241 GitHub stars~1k tokensUpdated 18 days ago
    EducationAuto-check passed
  • Lecture Slides Summarizer

    Li-Baichuan-James/summarize-slides-skill

    Condenses a lecture PDF into an exam-focused LaTeX cheat sheet and compiled PDF with page citations, bilingual terms, formulas and only the diagrams that help.

    312 GitHub stars~6.7k tokensUpdated 5 mo ago
    EducationAuto-check passed
  • Canva Classroom Helper

    canva-sdks/canva-skills

    Turn a lesson plan into a teaching slide deck in Canva. An agent skill from canva-sdks/canva-skills.

    117 GitHub stars~2.1k tokensUpdated 3 mo ago
    EducationAuto-check passed
  • Canvas Reading Annotation

    X-isdoingreat/canvas-pilot

    A skill your agent uses for an approved short academic-reading assignment routed by canvas-execute, including in-place PDF annotation, answer blanks, video worksheets, or short reflection drafts.

    125 GitHub stars~2.3k tokensUpdated 2 mo ago
    EducationAuto-check passed
  • Mira Quiz

    sandeco/mira-animator

    Slide de QUIZ AO VIVO no Mira: a plateia escaneia um QR-code e responde uma múltipla escolha num Google Forms; o slide lê as respostas via Google Sheets gviz/JSONP.

    218 GitHub stars~1.9k tokensUpdated 24 days ago
    EducationAuto-check passed
  • Microsoft Excel

    CraftOS-dev/CraftBot

    Microsoft Excel API integration with managed OAuth. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub starsUsed in 1 repo~3.5k tokens
    EducationAuto-check passed

More from THU-MAIC/OpenMAIC

All 25 skills in this repo
  • Guides setup, classroom generation and secondary development for OpenMAIC, the multi-agent interactive classroom, one confirmed phase at a time.

    40k GitHub stars~1.7k tokensUpdated today
    Auto-check: notes
  • Designs a Chinese K-12 classroom for one OpenMAIC stage around the core-literacy model, using authentic tasks, performance assessment and observable evidence.

    40k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • 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.

    40k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Designs a review-and-practice lesson around an independent first attempt, targeted feedback, supported practice, a fresh independent check and a next step.

    40k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • 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.

    40k GitHub stars~678 tokensUpdated today
    Auto-check passed
  • Curriculum Planner

    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.

    40k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Questions about OpenMAIC Page Clone

What does OpenMAIC Page Clone do?

Builds a new course page in an existing page's design by duplicating the model page and replacing its words one content slot at a time with patch operations. To give a new page the look of one the course already has, the agent copies it with duplicate_scene at the chosen position and a title that names the new page, then rewrites only the words. The skill explains why copy-then-edit is the only clone path: generate_scene re-rolls a page from its outline entry and invents a fresh element tree, which would destroy the design being preserved.

When should I use OpenMAIC Page Clone?

OpenMAIC Page Clone fits situations like: making a new course page that inherits the design of an existing one; reusing a page from an imported deck as the model for new content; replacing a copied page's text without disturbing its layout.

How do I install OpenMAIC Page Clone in Claude Code?

Run `npx skills add THU-MAIC/OpenMAIC --skill page-clone -a claude-code`. Or copy the skill folder (skills/agent-runtime/page-clone in THU-MAIC/OpenMAIC) into .claude/skills/page-clone in your project. Claude Code loads it when a task matches its description.

How do I install OpenMAIC Page Clone in Codex?

Run `npx skills add THU-MAIC/OpenMAIC --skill page-clone -a codex`. Or copy the skill folder (skills/agent-runtime/page-clone in THU-MAIC/OpenMAIC) into .agents/skills/page-clone in your project. Codex loads it when a task matches its description.

Can I use OpenMAIC Page Clone in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add THU-MAIC/OpenMAIC --skill page-clone -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/page-clone, .gemini/skills/page-clone, .github/skills/page-clone and .opencode/skills/page-clone in your project.

What does OpenMAIC Page Clone need to run?

SKILL.md names no scripts, command-line tools or credentials: OpenMAIC Page Clone is instructions for the agent only. Our summary lists: A course with at least one existing model page, in the OpenMAIC runtime.

Does OpenMAIC Page Clone access the network?

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.

Is OpenMAIC Page Clone safe to install?

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.

What licence does OpenMAIC Page Clone use?

OpenMAIC Page Clone is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OpenMAIC Page Clone use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to OpenMAIC Page Clone?

Skills that share tags, products or a category with OpenMAIC Page Clone: Teaching Resource Research Skill (mingchen666/Reviva, 241 stars), Lecture Slides Summarizer (Li-Baichuan-James/summarize-slides-skill, 312 stars), Canva Classroom Helper (canva-sdks/canva-skills, 117 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.

Who maintains OpenMAIC Page Clone?

THU-MAIC (a GitHub organization) maintains it in THU-MAIC/OpenMAIC, which has 40,213 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 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.