apply-comments

用于应用由 open-slide inspector 工具编写的待处理 @slide-comment 标记。当用户请求“应用注释”、“处理幻灯片注释”、“应用检查器注释”或引用 slides/<id>/index.tsx 中留下的标记时使用。

仓库最近推送
GitHub Stars
9,833
Forks
721
Issues / PRs
54

预览截图

来自skillπ 实验室的展示

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "apply-comments":https://skillpi.com/zh/skills/deepskill-a43565f036e0aefcacc52c05ad1ade6c7c53278be9f851d0c1abadf08d5a1059。安装前核对上游来源和版本:https://github.com/open-slide/open-slide。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于应用由 open-slide inspector 工具编写的待处理 @slide-comment 标记。当用户请求“应用注释”、“处理幻灯片注释”、“应用检查器注释”或引用 slides/<id>/index.tsx 中留下的标记时使用。

0 下载

介绍来源: third_party · open-slide · 0.0.1 参考来源

SkillPi 解读

能完成的任务
应用打开滑坡检查工具所写的待决@ comment 标记 。 当用户要求“应用评论”、“处理幻灯片评论”、“应用检查员评论”或内部留下的引用标记时使用 `slides/<id>/index.tsx` 。 。 。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
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-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

  1. Identify the target slide(s).

    • If the user names one (getting-started, q2-roadmap, etc.), work on that single slides/<slideId>/index.tsx.
    • If they say "all" or don't specify, scan every slides/*/index.tsx. Process each slide one at a time.
  2. Read the file and find all markers.

    • Run the regex above against the whole file.
    • For each match, base64url-decode text and JSON.parse it 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.
  3. 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 the note text to disambiguate.)
    • Read enough surrounding code (parent element, sibling elements, inline styles) to apply the change faithfully. A comment inside a <div> with an inline background style 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 note is ambiguous, do the smallest reasonable interpretation and mention the assumption in your summary.
  4. Apply edits in reverse line order.

    • Sort markers by descending lineIndex and process one at a time, using the Edit tool.
    • Processing top-down would invalidate line numbers for later markers as the file shrinks/grows.
  5. 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.
  6. 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.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.
    • If the dev server is running, screenshot each edited page via /s/<id>/preview?p=N to confirm the change looks right — see Previewing a page visually in slide-authoring.
  7. Report.

    • Summarise: N applied, M skipped plus a one-line description of each change (including the slide id).

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 outside slides/.
  • Do not add dependencies.
  • Do not re-introduce markers or leave TODO breadcrumbs — the user already has a record in git.

版本历史

  1. @open-slide/[email protected] GitHub ↗
    原版更新说明

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

  2. @open-slide/[email protected] GitHub ↗
    原版更新说明

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

  3. @open-slide/[email protected] GitHub ↗
    原版更新说明

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

  4. @open-slide/[email protected] GitHub ↗
    原版更新说明

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

  5. @open-slide/[email protected] GitHub ↗
    原版更新说明

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

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 解决幻灯片编辑工作流中的具体痛点
  • 功能闭环完整:从标记识别到修改应用再到清理验证
  • 面向专业开发者群体的实用工具
触发精准92/100

亮点

  • 触发词覆盖全面:包含多种自然语言表达
  • 支持文件路径引用作为触发条件
  • 边界清晰不易误触
结构规范95/100

亮点

  • 7步清晰执行流程,逻辑严谨
  • 提供权威的正则表达式和base64url解码helper
  • 边缘情况处理文档完整
执行可靠93/100

亮点

  • 反向行序处理避免行号失效
  • 多层验证机制确保修改正确性
  • 异常处理覆盖常见边缘场景
证据可验 (前四项均值)89/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。