name: visual-page description: > Proactively create a visual HTML page when plain text cannot effectively convey the information. Use this skill when: the content involves diagrams (flowcharts, architecture, sequence diagrams), data comparisons (tables, charts), timelines, interactive demos, visual layouts, or any scenario where a simple webpage would communicate more clearly than markdown text. Also use when the user explicitly asks for a visual page, a webpage, or says "show me" / "画个图" / "做个页面" / "可视化". This skill should be used proactively by the model — do not wait for the user to ask. descriptions: zh-Hans: "在纯文本难以表达时主动创建可视化 HTML 页面,适用于图表、流程、时间线、交互演示和布局说明。" displayNames:
Create a self-contained local HTML page and deliver it to the user.
.html file in the current workspace or a temp directory.index.html-style document with all CSS and JavaScript inlined unless an external CDN library is genuinely useful (Tailwind, Chart.js, Mermaid, D3).<media type="file" src="/absolute/path/to/page.html" caption="Visual page" />When the user asks to revise or update a page, edit the existing HTML file directly so any previous references stay valid. If the previous file is unavailable, create a new one and mention it.
Aesthetics is the goal, not decoration. A page that "works" but looks cheap is a failure. The reader's eyes judge in 2 seconds before reading a single word. Treat beauty as a non-negotiable requirement equal to data correctness.
图表先行,文字辅助。 Charts, diagrams, and illustrations are the PRIMARY communication tool — they let readers grasp the point in seconds. Text exists to annotate details that visuals can't convey alone. When building a page, start from "what chart/diagram tells this story?" not "what paragraphs explain this?" If a section has 3+ paragraphs without a visual, you're doing it wrong — find the chart, flow, or illustration that replaces most of that text.
Design for the reader. You are guiding a human eye, not displaying your work. One H1, one core conclusion, F-pattern scanning. Empty space is a feature. Charts and inline SVG beat dense paragraphs for any structured comparison or hierarchy.
Less is more. Every element earns its place. No filler sections, no data slop (pointless stats/badges). When unsure between "add another card" or "let it breathe" — let it breathe.
| Mode | When | Background | Font |
|---|---|---|---|
| Data UI | Dashboards, charts, tables | #fafafa / white |
Sans (Outfit) |
| Long-read / Report | Research, design docs, architecture pages | Warm cream #f7f5f0 |
Sans body + serif headlines (DM Serif Display) |
| Terminal | Code demos, log viewers | #1a1a2e (NEVER #000) |
Mono-prominent |
Wrong-mode = ugly page. Research report on dark slate → dashboard look. Dashboard with serif → poster look.
BANNED: pure #000, purple/blue AI gradients, neon glows, oversaturated accents.
Accent — pick ONE per page:
#10b981 / #3b82f6 / #f59e0b / #f43f5e / #6366f1#2f6f5e / #c97b3f / #b06367Use at 5-10% opacity for backgrounds, 100% for headers/icons only.
Report palette: cream #f7f5f0, cards white + border #e9e3d6, text #14171e / #3a4256 / #7c7a72. Optional: two corner radial gradients at 5% opacity.
BANNED fonts: Inter, Roboto, Arial, Fraunces, system defaults.
Use: Outfit (sans), JetBrains Mono (mono), DM Serif Display (Report headlines only).
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
Report headlines: font-serif text-3xl font-normal tracking-[-0.005em]. Body always sans. Serif forbidden on Data UI.
BANNED: 3 equal cards in a row, centered-everything heroes, border-l-4 accent cards, h-screen.
Use: max-w-5xl mx-auto px-6 md:px-8, space-y-16, CSS Grid 12-column, min-h-[100dvh]. Mobile: single-column below 768px, no horizontal scroll.
Most CSS frameworks assume Latin typography. CJK characters are square blocks with built-in
visual mass — copying Latin defaults (line-height: 1.7+, body 16-17px, section gap 80px+,
card padding 28-32px) makes Chinese pages feel sparse, with the first screen showing only
a hero and one card.
Calibrate: does the first screen communicate the core idea, or is it just hero + breathing room?
Working ranges for CJK-heavy text (adjust by content, not hard rules):
Latin-only pages can be more generous. Mixed CJK + Latin follows the CJK side.
rounded-2xl, border border-zinc-200/50. Diffusion shadows only: shadow-[0_2px_8px_rgba(0,0,0,0.04)] / shadow-[0_4px_16px_-2px_rgba(0,0,0,0.06)]. Hover: hover:-translate-y-0.5 hover:shadow-md transition-all duration-200.
No emoji as icons, no ASCII art (┌─┐ │ ├─) for diagrams. Use inline SVG from lucide.dev with currentColor, stroke-width="2", viewBox="0 0 24 24". One icon per section header max.
For diagrams: use the minimal patterns in §8, or Mermaid for 4+ nodes. Never box-drawing characters.
Default mindset: every key point deserves a visual. Ask "what chart explains this?" before writing paragraphs. Text annotates what the visual can't show alone.
| Visual need | Renderer |
|---|---|
| Architecture / module layers | Inline SVG or CSS grid |
| Flowchart, process flow (≥4 nodes) | Mermaid |
| Flowchart, process flow (2-3 nodes) | Inline SVG or CSS cards + arrows |
| Pie / bar / line chart, time-series >8 points | Chart.js |
| Data comparison (2-8 rows) | CSS bench bars or <table> |
| Timeline / roadmap | CSS list with vertical rail |
| Key-value pairs ≤6 rows | CSS two-column grid |
Rule: don't import Chart.js / Mermaid for <5 data points or <4 nodes — hand-roll with CSS / inline SVG.
When using Chart.js, match the page typography: font.family = "'Outfit'", muted gridlines (borderColor = 'rgba(0,0,0,0.04)'), borderRadius: 6.
Three starting points for the most common shapes. Treat them as scaffolds, not constraints — adjust spacing, colors, structure to fit the page. CSS vars assume the Report palette (see §2).
Bench bar (comparison row):
<div class="bench"><span class="bench-label">Name</span><div class="bench-track"><div class="bench-fill" style="width:42%"></div></div><span class="bench-val">42%</span></div>
.bench { display: grid; grid-template-columns: 140px 1fr 60px; gap: 12px; align-items: center; padding: 6px 0; }
.bench-track { height: 16px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.bench-fill { height: 100%; background: var(--primary); border-radius: 6px; }
KV card (≤6 key-value rows):
<dl class="kv"><dt>Key</dt><dd>Value</dd><dt>Key</dt><dd>Value</dd></dl>
.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 10px; column-gap: 16px; margin: 0; }
.kv dt { color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.kv dd { margin: 0; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
Step timeline (vertical rail):
<ol class="timeline"><li><strong>Step</strong><p>Detail.</p></li><li><strong>Step</strong><p>Detail.</p></li></ol>
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--primary); opacity: .35; }
.timeline li { position: relative; padding: 0 0 24px 32px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: white; border: 2px solid var(--primary); }
For architecture diagrams (boxes + arrows) and multi-node flows, hand-write inline SVG or use Mermaid — they vary too much to template.
#000, no AI gradients, no neon, no Inter/Roboto/ArialcurrentColorborder-l-4 accent cards.html file via <media />Here's a visual page — much clearer than text:
<media type="file" src="/absolute/path/to/page.html" caption="Visual page" />