slide-craft
Skill này làm gì
Skill này cung cấp các quy tắc thiết kế đằng sau trang slide OpenMAIC, gồm lề, cỡ chữ, độ tương phản và khoảng cách. Nó dành cho người chỉnh sửa slide muốn thay đổi khớp với thiết kế gốc.
Khi nào nên dùng
- ✓Khi bạn đang thay đổi một phần tử trên slide và muốn nó vừa khít.
- ✓Khi chữ trên slide quá to hoặc quá nhỏ so với khung của nó.
- ✓Khi một slide trông chật hoặc trống và cần khoảng cách tốt hơn.
Liên kết skill
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-craft/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chữ trên slide này đang tràn khỏi khung. Sửa để nó vừa và vẫn khớp với các slide khác.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI dùng một bộ số đo và quy tắc cho canvas slide, chiều cao chữ và độ tương phản màu để tạo thay đổi vừa với thiết kế của trang.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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>
Câu hỏi thường gặp
Canvas slide có kích thước bao nhiêu?
Skill nói canvas là 1000 x 562,5 đơn vị, với lề 50 đơn vị ở mọi phía.
Có bao gồm sửa màu không?
Có. Skill có các cặp tương phản và quy tắc để sửa màu.
Nó có tự căn chỉnh các phần tử không?
Không. Skill nói không có thao tác căn chỉnh, nên mỗi vị trí phải được đặt rõ ràng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 42k
- Vị trí xếp hạng
- #6409
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
build-personal-skill
42kGiúp agent của bạn biến lịch sử soạn khóa học và trò chuyện thành một skill cá nhân tái sử dụng, dựa trên các mẫu trong chính lịch sử của bạn.
curriculum-planner
42kGiúp agent của bạn lên kế hoạch chuỗi bài học liên kết, như khóa bảy ngày hoặc sách chia theo chương, rồi xây từng bài sau khi bạn duyệt.
deep-interactive
42kGiúp agent của bạn thiết kế khóa học mà người học thao tác với mô phỏng, sơ đồ, mã và trò chơi ở hầu hết các trang, thay vì đọc slide.
deep-research
42kGiúp agent của bạn xây khóa học về chủ đề mới hoặc dựa trên dữ kiện, nghiên cứu nguồn trực tiếp trước và gắn mỗi khẳng định với nguồn đã kiểm tra.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.