apply-comments
Skill này làm gì
Skill này đọc các dấu đánh dấu nhận xét mà trình soạn open-slide để lại trong file slide, rồi thực hiện từng chỉnh sửa được yêu cầu. Dành cho người xem slide trong trình soạn open-slide và muốn phản hồi được áp dụng.
Khi nào nên dùng
- ✓Khi bạn yêu cầu agent áp dụng các nhận xét bạn để lại trong trình soạn slide.
- ✓Khi bạn muốn các nhận xét của trình kiểm tra trong một file slide được xử lý và xóa.
- ✓Khi bạn muốn một thay đổi như sửa màu hoặc chữ được thực hiện từ nhận xét trên một trang.
Liên kết skill
https://github.com/open-slide/open-slide/blob/main/packages/core/skills/apply-comments/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
“Áp dụng các nhận xét tôi để lại trên slide 3 trong trình soạn, và xóa các dấu đánh dấu khi xong.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill tìm từng dấu đánh dấu nhận xét trong file slide, đọc ghi chú và phần tử hoặc vùng mà nó trỏ đến, thực hiện chỉnh sửa theo quy tắc soạn slide của open-slide, rồi xóa dấu đánh dấu.
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.
Apply slide comments
The open-slide editor has a comment mode that lets the user click a rendered page element, or drag across a region of the page, and attach a textual comment (e.g. "make this red", "change to 'Open Slide Rocks'"). Each comment is persisted as an in-source JSX marker inside slides/<slideId>/index.tsx.
Your job: read those markers, perform the described edits, and delete the markers.
Before making any page edit, consult the
slide-authoringskill — it is the technical reference for howslides/<id>/index.tsxis structured (canvas, type scale, palette, assets, file contract). A comment like "make this bigger" or "change the accent colour" should be applied in a way that stays consistent with those rules.
Marker format
{/* @slide-comment id="c-<8hex>" ts="<ISO>" text="<base64url(JSON)>" */}
Sits as the first child inside the JSX element it refers to (i.e. between that element's opening
>and its other children). The marker is dropped into its target, not floated above it. Newly written markers get a line of their own; older ones may share a line with the content that follows them.textis base64url-encoded JSON:{"note": "...", "hint"?: "...", "rect"?: {"x", "y", "w", "h"}, "page"?: n}.rectis present when the comment was left on a dragged region rather than on an element. Values are pixels on the 1920×1080 page canvas, measured from the page's top-left corner. The marker still sits inside the deepest element that contains the region, but the note refers to what is inside that region — possibly several children, or only part of the enclosing element.pageis the 0-based index (into the default export array) of the page the comment was left on.
Detection regex (authoritative — use exactly this):
/\{\/\*\s*@slide-comment\s+id="(c-[a-f0-9]+)"\s+ts="([^"]+)"\s+text="([A-Za-z0-9_\-]+={0,2})"\s*\*\/\}/g
Procedure
Identify the target slide(s).
- If the user names one (
getting-started,q2-roadmap, etc.), work on that singleslides/<slideId>/index.tsx. - If they say "all" or don't specify, scan every
slides/*/index.tsx. Process each slide one at a time.
- If the user names one (
Read the file and find all markers.
- Run the regex above against the whole file.
- For each match, base64url-decode
textandJSON.parseit to get{ note, hint?, rect?, page? }. - Record each hit as
{ id, lineIndex (0-based), note, hint, rect, page }. - If there are no markers, tell the user and stop.
Understand each comment in context.
- The targeted JSX element is the enclosing element of the marker — i.e. read upward from the marker line until you reach the unclosed JSX opening tag whose body the marker lives in. That element is the target. (For self-closing elements like
<img />, the inspector hoists the marker to the nearest non-self-closing ancestor; in that case the comment usually refers to a child of the enclosing element rather than the enclosing element itself — use thenotetext to disambiguate.) - Read enough surrounding code (parent element, sibling elements, inline styles) to apply the change faithfully. A comment inside a
<div>with an inlinebackgroundstyle usually refers to that element's styling, for example. - When the payload has a
rect, work out which children of the enclosing element fall inside that region (compare their positions and sizes against the rect on the 1920×1080 canvas) and apply the note to those — not to the whole enclosing element. - If the
noteis ambiguous, do the smallest reasonable interpretation and mention the assumption in your summary.
- The targeted JSX element is the enclosing element of the marker — i.e. read upward from the marker line until you reach the unclosed JSX opening tag whose body the marker lives in. That element is the target. (For self-closing elements like
Apply edits in reverse line order.
- Sort markers by descending
lineIndexand process one at a time, using theEdittool. - Processing top-down would invalidate line numbers for later markers as the file shrinks/grows.
- Sort markers by descending
Remove each marker after applying its edit.
- Delete the marker token. If nothing else is left on that line, delete the whole line including its trailing
\n; if content shares the line, keep that content. - Never leave a marker behind for an edit you applied — that signals a failure. Markers deliberately skipped per the edge cases below stay in place.
- Delete the marker token. If nothing else is left on that line, delete the whole line including its trailing
Verify.
- After all edits, re-read the file and confirm the only remaining markers are ones you reported as skipped.
- Confirm the edited JSX is well-formed (balanced tags, no dangling attributes).
Câu hỏi thường gặp
Nhận xét được lưu ở đâu?
Dưới dạng các dòng đánh dấu nhỏ bên trong file chỉ mục của slide, đặt ngay trong phần tử mà nhận xét đề cập đến.
Các chỉnh sửa có theo phong cách của slide không?
Có. Skill áp dụng từng thay đổi theo quy tắc soạn open-slide, nên nó nhất quán.
Các dấu đánh dấu có bị xóa không?
Có. Mỗi dấu đánh dấu bị xóa sau khi nhận xét của nó đã được áp dụng.
Chi tiết
Mô tả gốc của tác giả
Apply pending @slide-comment markers written by the open-slide inspector tool. Use when the user asks to "apply comments", "process slide comments", "apply the inspector comments", or references markers left inside `slides/<id>/index.tsx`.
repo: open-slide/open-slide
Độ phổ biến
- Sao GitHub
- 9.6k
- Vị trí xếp hạng
- #12218
- Giấy phép
- MIT
- Cập nhật
- 29/10/2026
Bình luận
- …
Thêm skill từ kho mã này
create-slide
9.6kGiúp agent của bạn soạn một slide hoặc bộ slide mới trong dự án open-slide, chọn chủ đề và viết các file trang cho bạn.
create-theme
9.6kGiúp agent của bạn tạo một chủ đề slide dùng lại được, gồm bảng màu, phông chữ và bố cục, kèm file xem trước trực tiếp cho dự án open-slide.
current-slide
9.6kGiúp agent của bạn tìm slide, trang và phần tử nào bạn đang xem trong trình xem open-slide, để 'trang này' luôn trỏ đúng vào trang bạn muốn.
slide-authoring
9.6kCung cấp cho agent của bạn các quy tắc kỹ thuật để viết trang open-slide, gồm kích thước canvas, thang cỡ chữ, màu sắc, hình ảnh, ghi chú và chuyển cảnh.
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.