Skip to content
Skillpedia
Websites & UI (frontend)42k Β· #6410

slide-dsl

What it does

This skill is the reference for how slide pages are stored in OpenMAIC, field by field. It is for people or AIs editing slides at the data level, where a small mistake can break a page.

When to use it

  • βœ“When you need to change a slide's underlying content or layout data directly.
  • βœ“When an edit to a slide does not appear the way you expected.
  • βœ“When you need to know which field the display actually uses for a value.

Skill link

https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-dsl/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-dsl/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œChange the background color of this slide and make sure the change actually shows on screen.”

5 new skills a week. 1 minute to read.

How it works

The AI reads the page's stored structure, writes the exact field the display uses, and then reads the page back to confirm the change appears.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

The slide DSL

A slide page is a JSON document. Editing it well means writing the exact field that holds the thing you want to change, in the exact shape the renderer reads, and leaving every neighbouring field byte-identical.

Read this part first, because it changes how you should use everything below. The write path stores what you send. There is no markup allow-list, no sanitizer, no colour or font normalisation, no geometry clamping, no house style applied on the way in. patch_stage checks one thing β€” that the resulting document still matches the DSL structure schema (field names, types, required fields, closed objects) β€” and then persists your value byte for byte.

So there is nothing between you and the screen. A structurally legal page can still be an unreadable page: markup the renderer never styles, a colour on a field nothing paints, a formula snapshot that disagrees with its source. The guard rail catches shape, not meaning. This manual is the meaning. Where it tells you how the renderer behaves, that is the whole of your knowledge β€” write against it, then read the page back and check what you wrote is what is there.

Contents

  1. Reading before writing β€” the three read depths
  2. The document β€” content β†’ canvas
  3. The canvas β€” viewport, theme, background, animations, paint order
  4. How an edit reaches the JSON β€” three ops, pointer rules
  5. What the structure schema refuses β€” the only hard boundary
  6. Two renderers paint your page β€” playback vs. preview
  7. Fields every element carries
  8. The ten element types β€” one section each
  9. The rendering truth of content HTML β€” the most important section
  10. Quick reference β€” one row per element type
  11. Where this sits
  12. Hard rules

Reading before writing

read_stage has three depths β€” detail:"tree", detail:"source" and detail:"text" β€” and they are not interchangeable.

detail What comes back Use it for
inventory (default) One compact line per element β€” id, type, plain-text text, left, top, width, height, src Finding an element. Never as a patch source.
source The exact persisted page JSON β€” the root every patch path is written against Every patch. Read it again after a write.
text Every text-bearing element as { path, id, type, text } plus one page-wide combinedText Proving old copy left no residue.
  • inventory strips the markup. Its text is the element's HTML with tags replaced by spaces and whitespace collapsed. A patch built from it invents style values that were never there and deletes the ones that were.
  • source always returns the whole page. There is no per-element projection, so array indices cannot drift between what you read and what you write. It returns the full content object β€” type, schemaVersion and the complete canvas, background, theme and animations included.
  • detail:"text" gives you pointers. Each path is that element's own /content/canvas/elements/N, so a residue check hands you the pointer to fix. Note that its text for a latex element is the LaTeX source, for code the lines joined by newlines, and for table the cells joined by |.

The document

A slide scene's content is:

{ type: 'slide', schemaVersion?: number, canvas: Slide }

type and schemaVersion sit outside /content/canvas/ and are therefore not reachable by a slide-canvas patch path β€” such a pointer begins /content/canvas/. Everything you can write lives under canvas.

The canvas

Field Required Meaning
FAQ

Does the system clean up HTML I write?

No. The skill says the system stores what you send, so the manual is the guide for what works.

What is checked when saving?

The skill says the write is only checked for the structure of the page, not for meaning or appearance.

Why check a page after editing?

The skill says a page can be valid in shape but still look wrong on screen.

Details

Original description by the author

The complete slide DSL manual β€” the canvas and its background, the ten element types field by field with units, defaults and legal values, where each type keeps its words, which field the renderer actually paints when two disagree, exactly what happens to the HTML you put in `content`, and the structure schema that is now the ONLY thing a write is checked against. Nothing filters your markup and nothing normalises your values, so this manual is the whole of what makes a page render correctly. Load it before patching a field you have not patched before, when a patch comes back rejected, when a

repo: THU-MAIC/OpenMAIC

Popularity

GitHub stars
42k
Ranking position
#6410
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills