← 返回 Skills 市场
ljn-hust

html-collab

作者 ljn-hust · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
31
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install html-collab
功能描述
Use 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 re...
使用说明 (SKILL.md)

html-collab Skill

Use this skill when creating documents meant for iterative LLM–human review, or when reading/revising annotated html-collab files.


Commands

/html-collab or /html-collab on

Explicitly enable html-collab format for subsequent document generation. Equivalent to the default behavior — use when the user wants to be explicit.

/html-collab off

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


GENERATE — Create a new html-collab document

When: User asks you to write, draft, or generate a document (and html-collab mode is on).

Steps:

  1. Start with the content of 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.
  2. Fill \x3Carticle id="collab-content"> with semantic HTML:
    • Use \x3Ch1> for the document title, \x3Ch2> for sections, \x3Cp> for paragraphs, \x3Cul>/\x3Cli> for lists.
  3. Assign a data-cid attribute to every block element. Rules:
    • Format: \x3Ctype>-\x3Czero-padded-3-digits> — e.g. p-001, h-001, sec-001, li-001
    • Types: p\x3Cp>, h\x3Ch1>\x3Ch6>, sec\x3Csection>, li\x3Cli>, bq\x3Cblockquote>, pre\x3Cpre>, tbl\x3Ctable>
    • Sequential per type across the whole document (not per section)
    • Every block must have one; never skip or duplicate
  4. Populate collab-data meta:
    • title: the document title
    • originalCreated and lastRevised: both set to the current ISO timestamp
    • model: your model identifier
    • maxImageBytes: 51200 (default = 50 KB; do not change unless user specifies)
    • imageStorage: "base64"
    • comments: []
    • edits: []
  5. Document-level UI belongs inside the article, not in the framework.
    • #collab-header (the top bar with the Save button) and #collab-sidebar (the comment panel) belong exclusively to the html-collab engine.
    • If the document needs custom UI controls (e.g. a language toggle, a table of contents, a theme switch), place them inside \x3Carticle id="collab-content"> — as a block at the top of the article or a floating element relative to #collab-main.
    • Putting custom controls in the framework header confuses human reviewers into thinking they're engine features.
  6. Output the complete .html file.

READ — Extract context from an annotated file

When: User provides a .html file that has been annotated by a human.

Reading efficiently:

  • Skip everything between \x3C!-- collab:llm-skip:start --> and \x3C!-- collab:llm-skip:end --> — this is engine CSS/JS you do not need to parse.
  • If meta.summary is present in collab-data, read it first for a compact structural index before parsing the full article.

Steps:

  1. Parse \x3Carticle id="collab-content"> — this is the document text.
  2. Parse the JSON inside \x3Cscript type="application/json" id="collab-data">.
  3. Build and present this context block in the conversation before doing anything else:
[DOCUMENT CONTENT]
\x3Cpaste the inner HTML of \x3Carticle id="collab-content"> here>

[HUMAN FEEDBACK]

Comments:
  · [\x3Ctarget>] "\x3Cquote>" → "\x3Ccomment text>" [screenshot, \x3Csize>, base64]

Edits:
  · [\x3Ctarget>] "\x3Coriginal>" → "\x3Crevised>"

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.

  1. Image handling — per environment:

    • Bash tool available (e.g. Claude Code): For each image where sizeBytes > meta.maxImageBytes, compress it with a script and write the compressed base64 back to data, update sizeBytes, add "compressedBy": "\x3Cmodel-id>". Example using Python/Pillow:
      python3 - \x3C\x3C'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
      
    • Multimodal, no Bash: Receive the image as a visual input for understanding. In output, set data to null and add "compressedBy": null, "description": "\x3Cone-sentence summary of the screenshot>".
    • Text-only model: Replace each image with [screenshot, \x3Csize>KB, base64-omitted] in the context block. Do not include the raw base64 string.
  2. 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.


REVISE — Produce a new version incorporating human feedback

When: After READ, the user asks you to revise the document.

Steps:

  1. For each entry in edits: replace the text of the corresponding data-cid block with revised verbatim.
  2. For each entry in 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.
  3. Add new blocks as needed: assign fresh CIDs continuing from the highest existing number for each type (e.g. if p-007 exists, next paragraph is p-008).
  4. Remove blocks as needed: retire their CIDs permanently — never reuse them.
  5. Output the revised .html file:
    • Updated \x3Carticle> content
    • All original data-cid values preserved (do not reassign existing IDs)
    • collab-data reset: comments: [], edits: []
    • meta.lastRevised updated to current timestamp
    • meta.model updated to your model identifier
    • meta.originalCreated unchanged
    • meta.versionHash set to "" — the engine recomputes this on next browser save
    • meta.summary set to "" — the engine recomputes this on next browser save
    • File output by environment:
      • Bash/file access available (e.g. Claude Code): Write directly over the original file. The conversation history preserves the feedback record; no extra file needed.
      • Chat environment (no file access): Suggest a filename using the document title and today's date — e.g. market-analysis-20260606.html. This lets users build a natural version sequence in their folder without manual renaming.


Reference

  • Template: skill/assets/template.html (remote: https://raw.githubusercontent.com/ljn-hust/html-collab/main/skill/assets/template.html)
  • Example: examples/example.html
  • Live demo: index.html (or https://ljn-hust.github.io/html-collab/)
安全使用建议
Install only if you intentionally want generic review documents to become html-collab files. Avoid using it for confidential drafts unless you are comfortable with full document text and feedback being copied into chat, keep backups before revisions, and prefer the bundled template over remote GitHub fallbacks.
能力评估
Purpose & Capability
The core purpose is coherent: generate, read, and revise single-file HTML documents with embedded review comments, edits, screenshots, and a browser-side save UI. The template code appears focused on local document editing and does not show network exfiltration.
Instruction Scope
The skill triggers on broad generic drafting requests and generated HTML embeds AI-facing bootstrap instructions and a skill URL in comments and JSON, which can steer downstream agents outside an explicit user request.
Install Mechanism
The package itself is simple and has no declared dependencies, and VirusTotal/static scan were clean. However, the instructions include a mutable GitHub fallback for template or skill retrieval rather than relying only on the bundled artifact.
Credentials
Some requested actions exceed passive document handling: running Python/Pillow to rewrite embedded images, pasting full document and feedback into chat, and overwriting original files in file-access environments.
Persistence & Privilege
The browser save flow is user-initiated, but the REVISE instructions tell file-capable agents to overwrite the original annotated HTML without requiring confirmation or backup, and comments/images persist inside the document until revision clears them.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install html-collab
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /html-collab 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release — single-file HTML format for LLM–human collaborative editing. Supports GENERATE, READ, and REVISE workflows. Compatible with Claude Code and OpenClaw.
元数据
Slug html-collab
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

html-collab 是什么?

Use 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 re... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 31 次。

如何安装 html-collab?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install html-collab」即可一键安装,无需额外配置。

html-collab 是免费的吗?

是的,html-collab 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

html-collab 支持哪些平台?

html-collab 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 html-collab?

由 ljn-hust(@ljn-hust)开发并维护,当前版本 v0.1.0。

💬 留言讨论