apply-comments
Screenshots
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "apply-comments" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a43565f036e0aefcacc52c05ad1ade6c7c53278be9f851d0c1abadf08d5a1059. Verify the upstream source and version against https://github.com/open-slide/open-slide before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Applies pending @slide-comment annotations written by the open-slide inspector tool. Used when the user requests “apply comments,” “process slide comments,” “apply inspector comments,” or references markers left in slides/<id>/index.tsx.
Introduction source: third_party · open-slide · 0.0.1 Reference
SkillPi interpretation
- Tasks
- 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`.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: apply-comments
description: 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`.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). If the project's
package.jsonhas 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 thebuildscript) to surface compile errors. Fix any errors you introduced. - If the dev server is running, screenshot each edited page via
/s/<id>/preview?p=Nto confirm the change looks right — see Previewing a page visually inslide-authoring.
-
Report.
- Summarise:
N applied, M skippedplus a one-line description of each change (including the slide id).
- Summarise:
base64url decoding helper
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.
Edge cases
- Marker with no enclosing JSX element (shouldn't happen — the inspector won't write one — but if you find one): delete it and note as orphan.
- Multiple markers stacked on consecutive lines inside the same element: they all refer to that enclosing element. Read their notes in source order to understand the combined intent, then apply and delete them bottom-up per step 4.
- Comment asks for something outside the target element's scope (e.g. "add a new page"): do the closest-reasonable edit and mention the scope expansion in your summary.
- Can't resolve the comment (e.g. truly ambiguous, or the file changed shape such that the target element doesn't exist): leave the marker in place and report it as skipped. Don't guess.
Do not
- Do not touch
package.json,open-slide.config.ts, or files outsideslides/. - Do not add dependencies.
- Do not re-introduce markers or leave
TODObreadcrumbs — the user already has a record in git.
Version history
-
@open-slide/[email protected]
GitHub ↗
Original release notes
### Patch Changes - [#609](https://github.com/open-slide/open-slide/pull/609) [`034b070`](https://github.com/open-slide/open-slide/commit/034b07032f81ec6e9692f2463cdcb88b77a5d893) Thanks [@huntie](https://github.com/huntie)! - Keep slide text left-aligned in the overview grid and every other thumbnail instead of inheriting the host's alignment. - [#588](https://github.com/open-slide/open-slide/pull/588) [`d12e3e1`](https://github.com/open-slide/open-slide/commit/d12e3e1d8b208d326f3fce370e42bede3fb96b74) Thanks [@1weiho](https://github.com/1weiho)! - Show New deck before an agent is connected, so first-time users can create a deck and install an agent from the panel. - [#599](https://github.com/open-slide/open-slide/pull/599) [`2f7edd0`](https://github.com/open-slide/open-slide/commit/2f7edd01405e3da1d63d603ce4efe09568da3e97) Thanks [@Ruxiu0409](https://github.com/Ruxiu0409)! - Keep slide text left-aligned in the mobile thumbnail strip instead of inheriting the button's centered alignment. - [#589](https://github.com/open-slide/open-slide/pull/589) [`557b56e`](https://github.com/open-slide/open-slide/commit/557b56e277277ff16860eb7398fffae962866f0c) Thanks [@1weiho](https://github.com/1weiho)! - Fade to black when entering and leaving present mode, and nudge the slide with a hint when stepping past the last slide.
-
@open-slide/[email protected]
GitHub ↗
Original release notes
### Patch Changes - [#574](https://github.com/open-slide/open-slide/pull/574) [`8b67b02`](https://github.com/open-slide/open-slide/commit/8b67b0257d1f23138afcd640aaa0e0a468bd5f7c) Thanks [@1weiho](https://github.com/1weiho)! - Ship the agent modules the app imports so `open-slide dev` no longer fails to resolve `agent/types`, and stop publishing test files.
-
@open-slide/[email protected]
GitHub ↗
Original release notes
### Minor Changes - [#567](https://github.com/open-slide/open-slide/pull/567) [`c93ca36`](https://github.com/open-slide/open-slide/commit/c93ca36f2463cdf0fc47dc91fda2bea8c2a3d030) Thanks [@1weiho](https://github.com/1weiho)! - Add an in-app agent panel that uses a locally installed Claude Code or Codex to draft decks, apply comments, and edit pages. ### Patch Changes - [#559](https://github.com/open-slide/open-slide/pull/559) [`4081bf9`](https://github.com/open-slide/open-slide/commit/4081bf973db1c4b81b2772fafa66f93004c98bde) Thanks [@1weiho](https://github.com/1weiho)! - Keep letterbox bars black in present mode when the screen isn't 16:9.
-
@open-slide/[email protected]
GitHub ↗
Original release notes
### Minor Changes - [#556](https://github.com/open-slide/open-slide/pull/556) [`92d58d7`](https://github.com/open-slide/open-slide/commit/92d58d7a3b4a50476689af58240649e99bf83be6) Thanks [@1weiho](https://github.com/1weiho)! - Move comments into a toolbar comment mode: click an element or drag across a region, write the note in a floating composer, and see every pending comment as a numbered pin beside its target.
-
@open-slide/[email protected]
GitHub ↗
Original release notes
### Minor Changes - [#546](https://github.com/open-slide/open-slide/pull/546) [`4ed1175`](https://github.com/open-slide/open-slide/commit/4ed11753107aa895eb4b480824194ef15ab5f52c) Thanks [@1weiho](https://github.com/1weiho)! - Add a dev-only `/s/<id>/preview?p=N` route that renders a single page without editor chrome, and teach the built-in skills to screenshot it for a quick visual check. - [#524](https://github.com/open-slide/open-slide/pull/524) [`65026ea`](https://github.com/open-slide/open-slide/commit/65026ea3c05e656c3ba84792dae474a7479051c2) Thanks [@diegoctal](https://github.com/diegoctal)! - Add a Spanish (Español) translation of the UI to the language switcher. ### Patch Changes - [#512](https://github.com/open-slide/open-slide/pull/512) [`9195cbe`](https://github.com/open-slide/open-slide/commit/9195cbe15bf8dad17ff84a85c6f547ea4b7e4bae) Thanks [@gonzalovargas](https://github.com/gonzalovargas)! - Navigate between focused slide thumbnails with the arrow keys. - [#544](https://github.com/open-slide/open-slide/pull/544) [`b2bd016`](https://github.com/open-slide/open-slide/commit/b2bd016efe147d1dd518c2d40989a78b797c4062) Thanks [@1weiho](https://github.com/1weiho)! - Keep slide toolbar titles and actions accessible in narrow windows. - [#548](https://github.com/open-slide/open-slide/pull/548) [`92b7193`](https://github.com/open-slide/open-slide/commit/92b7193219273e1abce18e0cbd9402208a1e06ea) Thanks [@1weiho](https://github.com/1weiho)! - Refresh the favicon and sidebar logo with the new open-slide mark. - [#539](https://github.com/open-slide/open-slide/pull/539) [`ad82b89`](https://github.com/open-slide/open-slide/commit/ad82b8966793a90113e7d69988f6dc354bfec421) Thanks [@stantheman0128](https://github.com/stantheman0128)! - Duplicating a slide no longer creates a second folder whose name differs only by letter case. - [#522](https://github.com/open-slide/open-slide/pull/522) [`abafe9e`](https://github.com/open-slide/open-slide/commit/abafe9ead0807fcd2149a4e70f734eeb41734fa9) Thanks [@1weiho](https://github.com/1weiho)! - Undo and redo now jump back to the page where the edit was made and select the changed element, and the undo/redo buttons show their keyboard shortcuts.
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决幻灯片编辑工作流中的具体痛点
- 功能闭环完整:从标记识别到修改应用再到清理验证
- 面向专业开发者群体的实用工具
Highlights
- 触发词覆盖全面:包含多种自然语言表达
- 支持文件路径引用作为触发条件
- 边界清晰不易误触
Highlights
- 7步清晰执行流程,逻辑严谨
- 提供权威的正则表达式和base64url解码helper
- 边缘情况处理文档完整
Highlights
- 反向行序处理避免行号失效
- 多层验证机制确保修改正确性
- 异常处理覆盖常见边缘场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.