slide-craft
What it does
This skill gives the design rules behind OpenMAIC slide pages, including margins, text sizes, contrast, and spacing. It is for people editing slides who want changes that match the original design.
When to use it
- βWhen you are changing one element on a slide and want it to fit.
- βWhen a slide's text is too big or too small for its box.
- βWhen a slide feels crowded or empty and needs better spacing.
Skill link
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-craft/SKILL.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βThis slide's text is overflowing its box. Fix it so it fits and still matches the other slides.β
5 new skills a week. 1 minute to read.
How it works
The AI uses a set of measurements and rules for the slide canvas, text heights, and color contrast to make a change that fits the page's design.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
The design law of a slide page
Every slide in this runtime was drawn under a long set of rules β the canvas, the height table, the type scale, the spacing standards. The generator that drew the page had all of them in front of it. When you patch one element, you have the page's numbers and nothing else, and the rules are the only way to tell a repair from a dent.
This is that rule set, restated for editing. It is about the page, not the process: which numbers a change has to stay consistent with, and which fields actually reach the screen.
The canvas you are editing inside
The canvas is 1000 Γ 562.5. All elements respect a 50px margin, so the
live area is left β [50, 950], top β [50, 512.5], and an element's right
edge (left + width) stays β€ 950, its bottom edge β€ 512.5.
The page's own alignment grid, which existing elements are already on:
- Left-aligned content sits at
left = 60orleft = 80. - Centred content is
left = (1000 - width) / 2β recomputed, never guessed. - Right-aligned content is
left = 1000 - width - 60.
Changing width on centred content changes left too, and they are two separate
writes. Read the neighbours' boxes first and land on the column they are already
using; a lone element 8px off the shared left edge reads as a mistake even though
nothing overflows.
There is no alignment operation. Every position is an explicit number you
write to that element's own left / top / width / height, one path per call,
computed from the neighbours you read. Aligning a row means giving each element the
number the row already uses β not asking the page to tidy itself.
Text is sized by table, not by eye
A text element has 10px padding on all four sides, so its usable area is
(width - 20) Γ (height - 20), and heights come from one table
(line-height 1.5, padding included):
| Font size | 1 line | 2 lines | 3 lines | 4 lines | 5 lines |
|---|---|---|---|---|---|
| 14px | 43 | 64 | 85 | 106 | 127 |
| 16px | 46 | 70 | 94 | 118 | 142 |
| 18px | 49 | 76 | 103 | 130 | 157 |
| 20px | 52 | 82 | 112 | 142 | 172 |
| 24px | 58 | 94 | 130 | 166 | 202 |
| 28px | 64 | 106 | 148 | 190 | 232 |
| 32px | 70 | 118 | 166 | 214 | 262 |
| 36px | 76 | 130 | 184 | 238 | 292 |
When you replace an element's words, re-derive its height instead of keeping the old one:
characters_per_line = (width - 20) / font_size. Keep the longest line at β€ 75% of that; past 100% the text wraps and takes a row you did not budget.- Count the lines your new content needs β one per
<p>, plus a wrap for every paragraph overcharacters_per_lineβ then add ~0.8 of a line of slack and round up. - Look the height up against the largest font size present in the content, not the average.
Height is a container, not a clamp: overflowing text spills past the box rather than shrinking, and the page shows the spill. The fix order is shorten the words, then step to the next table row, then widen the box β in that order, because a slide that needs a bigger box usually needs fewer words.
The type scale
| Content | Size |
|---|---|
| Main title | 32-36px |
| Subtitle | 24-28px |
| Key points | 18-20px |
| Body | 16-18px |
| Caption | 14-16px |
Levels stay 2-4px apart and everything at one level uses one size. When you touch an element, take its size from the siblings that share its role on that page rather than from this table fresh β the page's own scale wins, and this table is how you recognise which level an element belongs to.
Size lives in the content HTML, as inline font-size on the <p> β there is
no font-size field to write. So changing a size means writing the whole content
string back, which means you have to know the markup you are replacing.
What the renderer really does with your HTML
The content of a text element is an HTML string, and this page's CSS resets
most tag semantics. Four consequences decide how you write rich text:
<ul>/<ol>render without markers. The stylesheet's reset stripslist-styleand the indent, and the rule that puts them back is scoped to the browser editor β not to classroom playback. A list sent as<ul><li>β¦</li></ul>
FAQ
What size is the slide canvas?
The skill says the canvas is 1000 by 562.5 units, with a 50-unit margin on every side.
Does it cover color fixes?
Yes. The skill includes contrast pairs and rules for color fixes.
Does it align elements automatically?
No. The skill says there is no alignment operation, so each position must be set explicitly.
Details
Original description by the author
The design law of a slide page β canvas geometry, the text height table, the type scale, contrast pairs, spacing rhythm, and which element type carries which content. Load it when patching slide elements one at a time, when a fix is about colour or contrast, when text has to grow or shrink inside a box, when a page feels crowded or empty, or when replacement content needs real rich-text structure. It is the standard `page-clone` and `pro-editing` edit against, not a procedure of its own β those two decide which pages to touch and in what order, this one decides what a good page looks like when
repo: THU-MAIC/OpenMAIC
Popularity
- GitHub stars
- 42k
- Ranking position
- #6409
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
build-personal-skill
42kHelps your agent turn your past course-making records and chats into a personal, reusable skill, based on patterns found in your own history.
curriculum-planner
42kHelps your agent plan a series of connected lessons, such as a seven-day course or a book split by chapter, and build them one at a time after your approval.
deep-interactive
42kHelps your agent design a course where learners play with simulations, diagrams, code, and games on most pages, instead of reading slides.
deep-research
42kHelps your agent build a course on recent or factual topics by researching live sources first and tying each claim to a source it checked.
Similar skills
canvas
394kLets your agent show a hosted visual widget on a connected Mac panel, then hide the panel or move it to another page.
control-ui
394kHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.
diagram-maker
394kHelps your agent create clear diagrams as SVG, HTML, or editable Excalidraw files for processes, system architecture, and whiteboard sketches.