# Apply Slide Comments

Applies pending slide comment markers left by the open-slide inspector.

- Repository: https://github.com/open-slide/open-slide (9607 stars)
- Category: Documents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add open-slide/open-slide --skill apply-comments -g -a claude-code -y`
Codex: `npx skills add open-slide/open-slide --skill apply-comments -g -a codex -y`
Cursor: `npx skills add open-slide/open-slide --skill apply-comments -g -a cursor -y`
Gemini CLI: `npx skills add open-slide/open-slide --skill apply-comments -g -a gemini-cli -y`

## 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`.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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-authoring`** skill, it is the technical reference for how `slides/<id>/index.tsx` is 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.
- `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*\*\/\}/g
  ```

## Procedure

The rest: https://github.com/open-slide/open-slide/blob/HEAD/packages/core/skills/apply-comments/SKILL.md
