HTML
它能做什么
把你当前会话的结果转换为一个干净、设计精美的网页。它适用于希望把分析或回答制作成可分享、精致版本的人。
适用场景
- ✓当你想把本次聊天中的分析转换为可分享的网页的时候。
- ✓当你想要一份设计感强、而非纯文本的报告的时候。
- ✓当你需要一个不加载任何外部网站内容的单个 HTML 文件的时候。
技能链接
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/HTML/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这份分析做成一个设计精美的 HTML 页面,我可以和团队分享。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能会把你的内容放入固定结构中,由一个固定的渲染器应用布局和配色。结果是一个 HTML 文件,字体和样式都内置其中,然后作为可分享页面发布。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
HTML
Turns whatever the session just produced into one self-contained, designed HTML file and publishes it as an Artifact. Deterministic split: the model's only job is distilling the session output into a typed content JSON and picking a design register; Tools/Render.ts owns every layout, typography, and color decision. Output is Artifact-CSP safe: inline CSS, fonts embedded as data URIs from local font files, zero external requests. The renderer command, block types and register table live in Intents/Render.md.
Ideal State
- Any session output becomes one self-contained, Artifact-safe HTML file that makes zero external requests and renders for the owner.
- Layout, typography and color come entirely from
Tools/Render.tsregisters; the model supplies only typed content JSON, so no hand-styled one-off ships. - The artifact is verified before hand-off — published through the Artifact tool and pixel-checked.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| Render | /HTML, "HTML artifact", "render this as HTML" |
Intents/Render.md |
Data & Config
No user configuration: registers are defined in Tools/Render.ts, which embeds fonts found in ~/Library/Fonts, /Library/Fonts or /System/Library/Fonts/Supplemental (macOS font folders; with none present it falls back to system font stacks). Publishing needs the Claude Code Artifact tool and its artifact-design skill; without them Render.ts still writes the local HTML file.
Gotchas
- DOM-render screenshot pipelines drop CSS pseudo-element generated content (counters,
::beforelabels render in the browser but vanish from DOM-render captures, and they're invisible to text extraction). Render.ts therefore emits all numbering and labels as real DOM text. Never add CSS counters to a register. (Discovered 2026-07-11.) - Artifacts block all external requests — a Google Fonts
<link>fails silently and you get the fallback stack. Embed via data-URI@font-face(Render.ts does this when the register's font file exists locally) or design on system stacks. - The artifact viewer wraps your file in its own document skeleton — emit
<title>+<style>+ body content only; no<!doctype>/<html>/<head>/<body>tags. - A published artifact is private to its owner's claude.ai account — verifying it in a browser signed into a different account/org 404s. Verify the render by serving the HTML file locally and capturing that; verify publication via the Artifact tool's
listaction. - Numbered section markers must mean something. Render.ts numbers sections (document order — legitimate). Don't number list items unless the content is a true sequence; use
listblocks with bold lead-ins instead.
Examples
Example 1: After a research or red-team session
User: "/HTML"
→ Render intent
→ The session's findings, quotes and sources are published as a `dossier` artifact, its local render pixel-checked, and the URL handed over with a one-line description
Example 2: Different subject, different register
User: "render the quarterly cost analysis as HTML"
→ Render intent
→ A `ledger` artifact with tables and callouts, the register that fits a cost report
常见问题
页面会从互联网加载任何内容吗?
不会。它不发出任何外部请求,字体和样式都嵌入在文件中。
谁来控制设计?
由固定的渲染器负责布局、字体排版和配色,因此每个页面都遵循统一风格。
页面在分享前会被检查吗?
会。页面在交付前会被验证,包括视觉检查。
详情
作者的原始描述
Renders the current session output as a self-contained, designed HTML artifact via a deterministic renderer that owns all layout from typed JSON. USE WHEN /HTML, HTML artifact, render this as HTML, make this an HTML page, artifact of this analysis, designed HTML output. NOT FOR ISAs (ISARender.ts is the canonical ISA renderer), deployed sites or web apps, web UI design systems (Webdesign), static images or diagrams (Art), or writing the analysis itself.
repo: danielmiessler/LifeOS
热度
- GitHub 星标
- 20k
- 排名
- #10429
- 许可证
- MIT
- 更新时间
- 2026/10/28
评论
- …