html-preview

html-preview is a skill for Claude Code, Codex from microsoft/vscode. It costs 50 tokens per session (1,245 once invoked), scanned A, original, MIT.

A set of instructions for creating visual, rendered reports and diagrams as inline HTML previews in the coding agent window.

In plain words
What is it for?
It can produce implementation plans, code-review explanations, comparisons, diagrams, visual reports, and static user-interface mockups.
Why use it?
It helps when layout, tables, diagrams, or a static interface make the result easier to understand than plain text. It keeps ordinary explanations and code examples in Markdown instead.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit It can produce implementation plans, code-review explanations, comparisons, diagrams, visual reports, and static user-interface mockups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/vscode/html-preview
About the project

Visual Studio Code is a code editor that supports editing, navigating, understanding, debugging, and extending software projects. Developers use it for the edit-build-debug cycle, and the catalogue add-ons provide skills, instructions, and agents for working within the editor.

microsoft/vscode · 195,850 stars · on GitHub · code.visualstudio.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add microsoft/vscode --skill html-preview
Clone the repo
git clone --depth 1 https://github.com/microsoft/vscode

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-preview

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/vscode/html-preview/github.svg)](https://agentmods.dev/skills/microsoft/vscode/html-preview)
Your own site
<a href="https://agentmods.dev/skills/microsoft/vscode/html-preview"><img src="https://agentmods.dev/badge/skills/microsoft/vscode/html-preview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for html-preview

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/vscode/html-preview"><img src="https://agentmods.dev/badge/skills/microsoft/vscode/html-preview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01245
Opus 5.5 $0.00020 $0.00498
Sonnet 5.5 $0.00010 $0.00249
Haiku 4.5 $0.00005 $0.00125

Measured 9d ago against content hash 6e5ce7fb230a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

html-preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/vs/sessions/skills/html-preview/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HTML previews

Use HTML when layout helps the user understand or review the result. Keep short explanations and ordinary code examples in Markdown. Honor the user's requested format; do not turn every answer into HTML.

This is on-demand authoring guidance bundled with the Agents window, available across workspaces when HTML previews and AI features are enabled. Rendering does not depend on invoking this skill.

Produce a preview

Return the document in a closed Markdown code fence with the language html-preview. Ordinary html fences remain source code. The preview appears after its closing fence arrives.

The chat.htmlPreview.enabled setting controls inline rendering in the Agents window and is on by default. While it is off, these fences display as source code. Do not change the user's setting unless asked.

  • Use self-contained HTML and CSS, tables, simple inline SVG, and native details/summary disclosures.
  • Use headings, text labels, meaningful image descriptions, and readable contrast. Do not rely on color alone to convey findings or status.
  • For long reports, provide a table of contents with links such as <a href="#risks">Risks</a> and matching element IDs. Only links within the same document work. Put external citations and workspace source links in Markdown outside the preview.
  • Prefer fluid layouts and wrapping text. Keep wide tables and code samples scrollable rather than clipping them.
  • Inline previews expand to fit their content and scroll with the transcript. Prefer content-based heights over viewport-height layouts.
  • Inline previews have no surrounding title bar, border, or permanent buttons. Leave html and body backgrounds, typography, and outer padding unset so the renderer can match the surrounding chat. Use explicit backgrounds only for meaningful inner surfaces.
  • Use semantic VS Code theme variables instead of hardcoded light/dark colors. Prefer inherited text color, var(--vscode-descriptionForeground, GrayText) for secondary text, var(--vscode-editorWidget-background, Canvas) for an inner panel, var(--vscode-widget-border, currentColor) for its border, and var(--vscode-textLink-foreground, LinkText) for links.
  • For charts, use the --vscode-charts-blue, --vscode-charts-green, and other chart palette variables with currentColor fallbacks. Include labels or patterns and a data table or text explanation; color alone is not sufficient.
  • Use VS Code spacing, radius, and type-role variables where applicable, with standalone fallbacks. Keep chrome quiet, make the main finding lead, and avoid giving every section a competing card or accent color.
  • Scripts, JavaScript event handlers, forms, inputs, buttons, embedded frames, canvas applications, external links, remote images, stylesheets, fonts, and network requests are not supported. Do not promise sliders, draggable boards, live charts, or working export buttons.
  • For interaction, use native disclosures and section links instead of script-dependent tabs or controls. If the user needs a running application, explain that it requires a separate application workflow.
  • Embedded PNG, JPEG, GIF, and WebP data images are supported; prefer simple inline SVG for diagrams so output stays compact.
  • Keep each preview below 64,000 characters and the overall response concise. Split a large explanation into focused sections or previews instead of embedding large assets.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago Changed 6e5ce7fb230a
  2. 17d ago First seen · 60 lines · 50 tokens per session scan A eeed2ad3980a

Subscribe to this mod's changes

html-preview is a skill published in the GitHub repository microsoft/vscode (195,850 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,245 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-13.

Related

html-preview compared with skills from other repositories

html-preview next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
html-previewmicrosoft/vscodeSkill196ktodayMITA50Claude Code, Codex
cyrene-diagramPlaya-0v0/Cyrene-AgentSkill8119d agoMITA50Claude Code, Codex
figmamereyabdenbekuly-ctrl/clodex-ideSkill8721mo agoAGPL-3.0A48Claude Code, Codex
magic-uimagicuidesign/magicuiSkill24k2d agoMITA56Claude Code, Codex
winui-designmicrosoft/winappCliSkill1.4ktodayMITA70Claude Code
openscreen-designgetopenscreen/openscreenSkill8.4ktodayMITA62Claude Code
cyrene-obsidian-workspacePlaya-0v0/Cyrene-AgentSkill8119d agoMITA42Claude Code, Codex