Apply comments

From compozy/agh · View interactive version

Apply comments is an AI agent skill from the GitHub repository compozy/agh. 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`.

How to use this skill

Skill file

Apply slide comments

The open-slide editor has an inspector tool that lets the user click on a rendered page element 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)>" */}

```

/\{\/\\s@slide-comment\s+id="(c-[a-f0-9]+)"\s+ts="([^"]+)"\s+text="([A-Za-z0-9_\-]+={0,2})"\s\\/\}/g

```

Procedure

  1. Identify the target slide(s).
  1. Read the file and find all markers.
  1. Understand each comment in context.
  1. Apply edits in reverse line order.
  1. Remove each marker after applying its edit.
  1. Verify.
  1. Report.

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

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.