apply-comments
ما الذي تفعله
تقرأ هذه المهارة علامات التعليق التي يتركها محرر open-slide داخل ملفات الشرائح، ثم تنفذ كل تعديل مطلوب. وهي مخصصة لمن يراجعون الشرائح في محرر open-slide ويريدون تطبيق الملاحظات.
متى تستخدمها
- ✓عندما تطلب من وكيلك تطبيق التعليقات التي تركتها في محرر الشرائح.
- ✓عندما تريد معالجة تعليقات المفتش في ملف شريحة ومسحها.
- ✓عندما تريد تنفيذ تغييرات مثل تصحيح لون أو صياغة بناءً على التعليقات في صفحة.
رابط المهارة
https://github.com/open-slide/open-slide/blob/main/packages/core/skills/apply-comments/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“طبّق التعليقات التي تركتها على الشريحة 3 في المحرر، وأزل العلامات عند الانتهاء.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تجد المهارة كل علامة تعليق في ملف الشريحة، وتقرأ الملاحظة والعنصر أو المنطقة التي تشير إليها، وتجري التعديل بما يتوافق مع قواعد كتابة open-slide، ثم تحذف العلامة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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).
الأسئلة الشائعة
أين تُحفظ التعليقات؟
كأسطر علامات صغيرة داخل ملف الفهرس للشريحة، موضوعة في العنصر الذي يشير إليه كل تعليق.
هل ستتبع التعديلات أسلوب الشريحة؟
نعم. تطبق المهارة كل تغيير وفق قواعد open-slide، فيبقى متسقًا.
هل تُزال العلامات؟
نعم. تُحذف كل علامة بعد تطبيق تعليقها.
التفاصيل
الوصف الأصلي من المؤلف
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`.
repo: open-slide/open-slide
الشعبية
- نجوم GitHub
- 9.6k
- الترتيب
- #12218
- الترخيص
- MIT
- آخر تحديث
- 29/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
create-slide
9.6kيساعد وكيلك على صياغة شريحة أو عرض جديد في مشروع open-slide، باختيار سمة وكتابة ملفات الصفحات بدلًا منك.
create-theme
9.6kيساعد وكيلك على إنشاء سمة شرائح قابلة لإعادة الاستخدام، بلوحة ألوانها وخطوطها وتخطيطها، مع ملف معاينة حي لمشروع open-slide.
current-slide
9.6kيساعد وكيلك على معرفة الشريحة والصفحة والعنصر الذي تنظر إليه في عارض open-slide، حتى يعني قولك هذه الصفحة الصفحة الصحيحة.
slide-authoring
9.6kيعطي وكيلك القواعد التقنية لكتابة صفحات open-slide، بما في ذلك حجم اللوحة وسلم الخطوط والألوان والصور والملاحظات والانتقالات.
مهارات مشابهة
canvas
394kيتيح لوكيلك عرض أداة مرئية مستضافة على لوحة Mac متصلة، ثم إخفاء اللوحة أو نقلها إلى صفحة أخرى.
control-ui
394kيساعد وكيلك على تنظيم واجهة OpenClaw Control UI واستكشاف أخطائها، بما في ذلك الجلسات ولوحات المعلومات وبوابات Gateway المتصلة.
diagram-maker
394kيساعد وكيلك على إنشاء مخططات واضحة بصيغة SVG أو HTML أو Excalidraw قابلة للتعديل، للعمليات وبنية الأنظمة والرسومات على السبورة.