Install
openclaw skills install html-collabUse this skill for any HTML document that will go through LLM–human review cycles. Trigger when: the user asks to write, draft, or generate a document for review or feedback; the user provides a .html file containing annotations or a collab-data block; the user types /html-collab, /html-collab on, or /html-collab off; a .html file contains an AI Bootstrap comment pointing to this skill. When the user asks to "write a doc" or "draft something for review" without specifying a format, default to html-collab format — don't wait to be asked. /html-collab off triggers this skill too, but outputs clean presentation HTML instead.
openclaw skills install html-collabUse this skill when creating documents meant for iterative LLM–human review, or when reading/revising annotated html-collab files.
/html-collab or /html-collab onExplicitly enable html-collab format for subsequent document generation. Equivalent to the default behavior — use when the user wants to be explicit.
/html-collab offSwitch to plain HTML mode for subsequent output. Use when the user wants a clean, presentation-ready document — no collab-data, no data-cid, no engine script, no sidebar. Typical use case: a finished document ready for an audience, not for further annotation.
Plain HTML output should be well-structured, self-contained, and styled — a document a reader can open directly in a browser with no toolbars or review UI.
When: User asks you to write, draft, or generate a document (and html-collab mode is on).
Steps:
skill/assets/template.html as your base structure (also available at https://raw.githubusercontent.com/ljn-hust/html-collab/main/skill/assets/template.html). If you do not have local access, fetch it from the URL above.<article id="collab-content"> with semantic HTML:
<h1> for the document title, <h2> for sections, <p> for paragraphs, <ul>/<li> for lists.data-cid attribute to every block element. Rules:
<type>-<zero-padded-3-digits> — e.g. p-001, h-001, sec-001, li-001p → <p>, h → <h1>–<h6>, sec → <section>, li → <li>, bq → <blockquote>, pre → <pre>, tbl → <table>collab-data meta:
title: the document titleoriginalCreated and lastRevised: both set to the current ISO timestampmodel: your model identifiermaxImageBytes: 51200 (default = 50 KB; do not change unless user specifies)imageStorage: "base64"comments: []edits: []#collab-header (the top bar with the Save button) and #collab-sidebar (the comment panel) belong exclusively to the html-collab engine.<article id="collab-content"> — as a block at the top of the article or a floating element relative to #collab-main..html file.When: User provides a .html file that has been annotated by a human.
Reading efficiently:
<!-- collab:llm-skip:start --> and <!-- collab:llm-skip:end --> — this is engine CSS/JS you do not need to parse.meta.summary is present in collab-data, read it first for a compact structural index before parsing the full article.Steps:
<article id="collab-content"> — this is the document text.<script type="application/json" id="collab-data">.[DOCUMENT CONTENT]
<paste the inner HTML of <article id="collab-content"> here>
[HUMAN FEEDBACK]
Comments:
· [<target>] "<quote>" → "<comment text>" [screenshot, <size>, base64]
Edits:
· [<target>] "<original>" → "<revised>"
Always output this block even if there are no comments or edits — it confirms to the user what you read. This conversation record is permanent: REVISE will clear comments and edits from the file, but the feedback is preserved here in the chat history.
Image handling — per environment:
sizeBytes > meta.maxImageBytes, compress it with a script and write the compressed base64 back to data, update sizeBytes, add "compressedBy": "<model-id>". Example using Python/Pillow:
python3 - <<'PYEOF'
import base64, io, sys
from PIL import Image
data = base64.b64decode("""PASTE_BASE64_HERE""")
img = Image.open(io.BytesIO(data))
out = io.BytesIO()
img.save(out, 'JPEG', quality=55, optimize=True)
print(base64.b64encode(out.getvalue()).decode())
PYEOF
data to null and add "compressedBy": null, "description": "<one-sentence summary of the screenshot>".[screenshot, <size>KB, base64-omitted] in the context block. Do not include the raw base64 string.Where the same data-cid appears in both Comments and Edits: the comment's quote reflects the original (pre-edit) text. In REVISE, apply the edit first, then interpret the comment against the updated text.
When: After READ, the user asks you to revise the document.
Steps:
edits: replace the text of the corresponding data-cid block with revised verbatim.comments: revise the content of the targeted block to address the feedback. For blocks with both an edit and a comment, apply the edit first, then address the comment.p-007 exists, next paragraph is p-008)..html file:
<article> contentdata-cid values preserved (do not reassign existing IDs)collab-data reset: comments: [], edits: []meta.lastRevised updated to current timestampmeta.model updated to your model identifiermeta.originalCreated unchangedmeta.versionHash set to "" — the engine recomputes this on next browser savemeta.summary set to "" — the engine recomputes this on next browser savemarket-analysis-20260606.html. This lets users build a natural version sequence in their folder without manual renaming.skill/assets/template.html (remote: https://raw.githubusercontent.com/ljn-hust/html-collab/main/skill/assets/template.html)examples/example.htmlindex.html (or https://ljn-hust.github.io/html-collab/)