Html Draft 标志

Html Draft

社区
serejaris
html-draft

当用户需要扁平工程蓝图风格的独立 HTML 图表时使用,例如架构图、系统流程图、技术规格表和组件图。使用 Tailwind v4(浏览器 CDN)进行布局,并使用 D3 v7(CDN)生成 SVG 图表,最终生成一个 HTML 文件。仅由用户主动调用,不要自动触发。触发词:“/html-draft”、“сделай blueprint”、“технический чертёж”、“архитектурная схема”、“инженерная схема”、“blueprint diagram”、“engineering blueprint”、“technical spec sheet”、“architecture diagram”、“system flow diagram”。

Add to TypingMind

概览

发布者serejaris
代码仓库personal-corp-os
技能名称html-draft
星标数
232
复刻数
26
附带文件
2
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 2 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 serejaris 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Html Draft AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/serejaris/personal-corp-os/tree/main/skills/html-draft
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serejaris/personal-corp-os.git /tmp/personal-corp-os
mkdir -p .claude/skills
cp -r /tmp/personal-corp-os/skills/html-draft .claude/skills/html-draft
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Html Draft,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Html Draft。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Html Draft 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

html-draft — Flat Engineering Blueprint Diagrams

Generate one HTML page that renders a technical diagram in a strict flat-blueprint aesthetic — the look of a printed engineering specification sheet, not a marketing landing.

Stack: Tailwind v4 via @tailwindcss/browser CDN for layout + utilities, D3 v7 via jsDelivr CDN for SVG-based diagrams (nodes, connectors, layouts, animations).

Use this when the user wants an architecture diagram, system flow, technical spec sheet, or component map as a standalone HTML artifact (suitable for slides, reports, exports).

Don't use this for:

  • Inline schemas inside markdown documents — use a mermaid renderer instead
  • Newspaper / reading-first single-column pages with monospace ink-on-cream feel
  • Multi-section interactive explainers with pill navigation

Design philosophy

Precise. Objective. High data-ink ratio (Tufte). Every pixel earns its place; nothing decorative. The stack is modern (Tailwind + D3) but the output looks like a printed engineering doc.

Visual rules

Flat, outlined, monochrome

  • No drop shadows, gradients, glassmorphism, blur, rounded buttons
  • 1px or 2px solid borders define structure
  • White content blocks on a light-gray canvas
  • Accent: black, or a single semantic color (red for error, etc.) used sparingly
  • Do not import a Tailwind component library — pure utility classes only

Design tokens (declared once via @theme)

css
@theme {
  --color-c-bg: #f8fafc;          /* page background — slate-50 */
  --color-c-canvas: #ffffff;      /* diagram canvas */
  --color-c-border: #cbd5e1;      /* slate-300 */
  --color-c-text-main: #0f172a;   /* slate-900 */
  --color-c-text-sub: #64748b;    /* slate-500 */
  --color-c-accent: #b91c1c;      /* red-700 — semantic only */
  --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Monaco, Consolas, monospace;
}

Tokens become Tailwind utilities automatically: bg-c-canvas, border-c-border, text-c-text-sub, font-mono.

Typography

  • Headings, labels: sans-serif (font-ui)
  • Data, paths, code, IDs, version strings: font-mono
  • Never link Google Fonts — the system stack already covers both roles

Layout

  • Whole diagram lives in a .diagram-canvas — bordered box with generous padding (p-8 or more)
  • Header: title + UPPERCASE subtitle, separated from body by a 1px bottom border
  • Strict alignment via grid / flex utilities; no eyeballing

Connectors

  • Thin straight or orthogonal lines (1px solid)
  • Dashed lines for abstract / logical relationships, never structural ones
  • D3-rendered SVG for non-orthogonal arrows; Tailwind border-t / border-l for orthogonal CSS connectors

Icons & badges

  • Icons: simple stroke SVG (no fills, no detail) drawn via D3 or inline <svg>
  • Badges: outlined or solid black/gray block, small uppercase mono text

Hard requirements

  1. Tailwind v4 via browser CDN — version-pinned https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4
  2. D3 v7 via jsDelivr CDN — version-pinned https://cdn.jsdelivr.net/npm/d3@7
  3. Return only the HTML — no markdown wrapper, no commentary outside the file
  4. Complete document — <!DOCTYPE html> through </html>
  5. Design tokens declared in a single <style type="text/tailwindcss"> @theme block — no scattered custom CSS
  6. Custom CSS minimal — only what Tailwind utilities cannot express (e.g. SVG marker definitions, complex pseudo-elements)
  7. No external fonts (no Google Fonts, no Adobe Fonts) — only Tailwind + D3 CDNs

Output template

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>[Diagram Title]</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    <style type="text/tailwindcss">
      @theme {
        --color-c-bg: #f8fafc;
        --color-c-canvas: #ffffff;
        --color-c-border: #cbd5e1;
        --color-c-border-strong: #94a3b8;
        --color-c-text-main: #0f172a;
        --color-c-text-sub: #64748b;
        --color-c-accent: #b91c1c;
        --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
        --font-mono: 'SF Mono', Monaco, Consolas, monospace;
      }

      body {
        font-family: var(--font-ui);
      }

      .mono {
        font-family: var(--font-mono);
      }
    </style>
  </head>
  <body class="bg-c-bg text-c-text-main p-10">
    <div class="max-w-[1200px] mx-auto bg-c-canvas border-2 border-c-border-strong p-8">
      <header class="border-b border-c-border pb-4 mb-6 flex items-end justify-between">
        <div>
          <h1 class="text-2xl font-semibold">[Title]</h1>
          <p class="mono text-[11px] uppercase tracking-widest text-c-text-sub mt-1">
            [SUBTITLE]
          </p>
        </div>
        <div class="mono text-[11px] text-c-text-sub text-right">
          DOC-[ID]<br/>REV A
        </div>
      </header>

      <!-- Diagram content: Tailwind grid for spec sheets, D3 SVG for flows -->
      <section class="grid grid-cols-2 border border-c-border">
        <!-- spec cells, see snippets below -->
      </section>

      <!-- D3 mount point for SVG diagrams -->
      <svg id="d3-diagram" class="w-full border border-c-border mt-6" height="400"></svg>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
    <script>
      // D3 diagram rendering — see "D3 patterns" section below
    </script>
  </body>
</html>

Reusable component snippets

Node / box

html
<div class="bg-c-canvas border border-c-border p-3">
  <div class="text-[10px] uppercase tracking-wide text-c-text-sub">label</div>
  <div class="mono text-sm">value</div>
</div>

Badge

html
<span class="inline-block mono text-[10px] uppercase px-1.5 py-0.5 border border-c-text-main">
  ACTIVE
</span>

<span class="inline-block mono text-[10px] uppercase px-1.5 py-0.5 bg-c-text-main text-c-canvas">
  SCHEDULED
</span>

<span class="inline-block mono text-[10px] uppercase px-1.5 py-0.5 bg-c-accent text-c-canvas">
  OVERDUE
</span>

Connector (orthogonal, CSS)

html
<div class="border-t border-c-border"></div>
<div class="border-t border-dashed border-c-border"></div>

Spec grid cell

html
<div class="p-4 border-r border-b border-c-border last:border-r-0">
  <div class="text-[10px] uppercase tracking-wide text-c-text-sub mb-1">label</div>
  <div class="mono text-sm">value</div>
</div>

D3 patterns

Use D3 when geometry is non-orthogonal, computed, or large enough that hand-placing nodes is unmaintainable.

Pattern 1 — explicit nodes + links (architecture diagrams)

javascript
const svg = d3.select('#d3-diagram');
const nodes = [
  { id: 'api',    x: 100, y: 100, label: 'API'    },
  { id: 'worker', x: 400, y: 100, label: 'Worker' },
  { id: 'db',     x: 250, y: 280, label: 'DB'     },
];
const links = [
  { source: 'api',    target: 'worker', style: 'solid'  },
  { source: 'api',    target: 'db',     style: 'solid'  },
  { source: 'worker', target: 'db',     style: 'dashed' },
];
const byId = Object.fromEntries(nodes.map(n => [n.id, n]));

// arrow marker
svg.append('defs').append('marker')
  .attr('id', 'arrow').attr('viewBox', '0 -5 10 10')
  .attr('refX', 8).attr('refY', 0).attr('markerWidth', 6).attr('markerHeight', 6)
  .attr('orient', 'auto')
  .append('path').attr('d', 'M0,-4L8,0L0,4').attr('fill', '#0f172a');

// links
svg.selectAll('line').data(links).enter().append('line')
  .attr('x1', d => byId[d.source].x).attr('y1', d => byId[d.source].y)
  .attr('x2', d => byId[d.target].x).attr('y2', d => byId[d.target].y)
  .attr('stroke', '#0f172a').attr('stroke-width', 1)
  .attr('stroke-dasharray', d => d.style === 'dashed' ? '4 3' : null)
  .attr('marker-end', 'url(#arrow)');

// nodes
const g = svg.selectAll('g.node').data(nodes).enter().append('g')
  .attr('transform', d => `translate(${d.x - 50}, ${d.y - 18})`);
g.append('rect').attr('width', 100).attr('height', 36)
  .attr('fill', '#fff').attr('stroke', '#0f172a').attr('stroke-width', 1);
g.append('text').attr('x', 50).attr('y', 22)
  .attr('text-anchor', 'middle').attr('font-size', 12)
  .attr('font-family', 'system-ui').text(d => d.label);

Pattern 2 — tree layout (hierarchical structures)

d3.hierarchy() + d3.tree() for parent/child trees (component maps, org charts). Render with the same flat node style; never use the default rounded D3 examples.

Pattern 3 — DAG / flow

d3-dag (optional) or manual topological layout. For < 15 nodes, hand-place coordinates — it's faster and tighter than a layout algorithm.

Pattern 4 — sankey / flow volumes

d3-sankey plugin (https://cdn.jsdelivr.net/npm/d3-sankey@0.12) when volumes matter. Keep ribbons grayscale; one accent only for the watched flow.

What D3 must not do here

  • No force-directed simulations bouncing around — diagrams are static engineering docs
  • No smooth zoom/pan unless the user asks — extra interactivity adds noise
  • No tooltips / hover popups unless the user asks
  • No colorful palettes — the visual rules above still bind

Composition guide

  • Architecture diagram: services as D3 rect nodes, data flow as solid SVG lines with arrow markers, dependencies as dashed
  • System flow: linear stages left-to-right or top-to-bottom; decision points as outlined diamonds (D3 polygons); use Tailwind grid for non-flow sections of the same page
  • Spec sheet: Tailwind grid of labeled cells, each with a mono value and a sans-serif label; status badge top-right of each cell
  • Component map: nested boxes in HTML (Tailwind) for top level; D3 hierarchy for deep trees; badges on each node

Quality bar

  1. Every text item earns its space — no decorative copy
  2. Alignment is strict — no off-grid placement
  3. Mono and sans roles never bleed (don't put labels in mono or data in sans)
  4. Color usage stays monochrome unless one semantic accent is justified
  5. CDN scripts pinned to specific major versions (@tailwindcss/browser@4, d3@7)
  6. D3 code is readable — named variables, no one-letter chaining beyond what's idiomatic
  7. The page renders correctly on first paint even before D3 mounts (no layout jump)

When input is incomplete

  • No content → ask for the diagram type (architecture / flow / spec sheet / component map) and the items to render
  • Vague subject → propose a node list and ask for confirmation before rendering
  • User asks for a different library (Mermaid inside, Recharts, Chart.js) → push back: this skill is Tailwind + D3 only; suggest mermaid-diagrams skill if the user wants Mermaid
  • User asks for interactivity (tooltips, drag, zoom) → confirm explicitly; default is static print-style

Source

Methodology adapted from QoderWork's drafter-diagram skill (flat-engineering-blueprint visual system), restacked on Tailwind v4 + D3 v7.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Html Draft AI 技能有什么作用?

当用户需要扁平工程蓝图风格的独立 HTML 图表时使用,例如架构图、系统流程图、技术规格表和组件图。使用 Tailwind v4(浏览器 CDN)进行布局,并使用 D3 v7(CDN)生成 SVG 图表,最终生成一个 HTML 文件。仅由用户主动调用,不要自动触发。触发词:“/html-draft”、“сделай blueprint”、“технический чертёж”、“архитектурная схема”、“инженерная схема”、“blueprint diagram”、“engineering blueprint”、“technical spec sheet”、“architecture diagram”、“system flow diagram”。

为什么在 TypingMind 中使用 Html Draft?

因为您只需安装一次,就能搭配任何模型使用。Html Draft 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Html Draft?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/serejaris/personal-corp-os/tree/main/skills/html-draft。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Html Draft?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Html Draft 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Html Draft 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Html Draft AI 技能免费吗?

是的。serejaris 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇