slide-dsl
Skill này làm gì
Skill này là tài liệu tham chiếu về cách các trang slide được lưu trong OpenMAIC, từng trường một. Nó dành cho người hoặc AI chỉnh sửa slide ở mức dữ liệu, nơi một lỗi nhỏ có thể làm hỏng trang.
Khi nào nên dùng
- ✓Khi bạn cần thay đổi nội dung hoặc bố cục nền của slide trực tiếp.
- ✓Khi một chỉnh sửa cho slide không hiện như bạn mong đợi.
- ✓Khi bạn cần biết trường nào hiển thị thực sự dùng cho một giá trị.
Liên kết skill
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-dsl/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
“Đổi màu nền của slide này và đảm bảo thay đổi thật sự hiện trên màn hình.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI đọc cấu trúc đã lưu của trang, ghi đúng trường mà màn hình sử dụng, rồi đọc lại trang để xác nhận thay đổi hiện ra.
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 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
- Reading before writing — the three read depths
- The document —
content→canvas - The canvas — viewport, theme, background, animations, paint order
- How an edit reaches the JSON — three ops, pointer rules
- What the structure schema refuses — the only hard boundary
- Two renderers paint your page — playback vs. preview
- Fields every element carries
- The ten element types — one section each
- The rendering truth of
contentHTML — the most important section - Quick reference — one row per element type
- Where this sits
- 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. |
inventorystrips the markup. Itstextis 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.sourcealways 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 fullcontentobject —type,schemaVersionand the completecanvas, background, theme and animations included.detail:"text"gives you pointers. Eachpathis that element's own/content/canvas/elements/N, so a residue check hands you the pointer to fix. Note that itstextfor alatexelement is the LaTeX source, forcodethe lines joined by newlines, and fortablethe 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 |
|---|
Câu hỏi thường gặp
Hệ thống có dọn HTML tôi viết không?
Không. Skill nói hệ thống lưu những gì bạn gửi, nên sổ tay là hướng dẫn cho những gì hoạt động.
Điều gì được kiểm tra khi lưu?
Skill nói việc ghi chỉ được kiểm tra cấu trúc của trang, không kiểm tra ý nghĩa hay hình thức hiển thị.
Vì sao phải kiểm tra trang sau khi sửa?
Skill nói một trang có thể đúng cấu trúc nhưng vẫn trông sai trên màn hình.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 42k
- Vị trí xếp hạng
- #6410
- 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ự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.