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`.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
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.
{/* @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.
text is base64url-encoded JSON: {"note": "...", "hint"?: "...", "rect"?: {"x", "y", "w", "h"}, "page"?: n}.
rect is 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.page is 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*\*\/\}/gIdentify the target slide(s).
getting-started, q2-roadmap, etc.), work on that single slides/<slideId>/index.tsx.slides/*/index.tsx. Process each slide one at a time.Read the file and find all markers.
text and JSON.parse it to get { note, hint?, rect?, page? }.{ id, lineIndex (0-based), note, hint, rect, page }.Understand each comment in context.
<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 the note text to disambiguate.)<div> with an inline background style usually refers to that element's styling, for example.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.note is ambiguous, do the smallest reasonable interpretation and mention the assumption in your summary.Apply edits in reverse line order.
lineIndex and process one at a time, using the Edit tool.Remove each marker after applying its edit.
\n; if content shares the line, keep that content.Verify.
package.json has typecheck/lint scripts, run them with the project's package manager; scaffolded projects ship neither TypeScript nor a linter — there, rely on the running dev server (or the build script) to surface compile errors. Fix any errors you introduced./s/<id>/preview?p=N to confirm the change looks right — see Previewing a page visually in slide-authoring.Report.
N applied, M skipped plus a one-line description of each change (including the slide id).function decode(s) {
const pad = s.length % 4 === 0 ? '' : '='.repeat(4 - (s.length % 4));
return Buffer.from(s.replace(/-/g, '+').replace(/_/g, '/') + pad, 'base64').toString('utf8');
}You can run this inline via node -e '...' if you need to inspect a payload; otherwise just reason about the decoded string.
package.json, open-slide.config.ts, or files outside slides/.TODO breadcrumbs — the user already has a record in git.1weiho/open-slide
19b2ba1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.