preview-html-author

preview-html-author is an agent for Claude Code from CaesiumY/ko-design-md. It costs 66 tokens per session (6,344 once invoked), scanned A, original, MIT.

A helper that creates one self-contained HTML preview of a design system, showing its visual styles and interface components in light and dark themes.

In plain words
What is it for?
Use it to turn an approved design document into a hero section and component showcase for review in a website catalogue.
Why use it?
It provides a viewable design sample without requiring a build step or a web framework, while keeping unfinished previews out of the public folder.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/caesiumy/ko-design-md/preview-html-author
Clone the repo
git clone --depth 1 https://github.com/CaesiumY/ko-design-md

Made for: Claude Code.

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 preview-html-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/caesiumy/ko-design-md/preview-html-author.svg)](https://agentmods.dev/agents/caesiumy/ko-design-md/preview-html-author)
Your own site
<a href="https://agentmods.dev/agents/caesiumy/ko-design-md/preview-html-author"><img src="https://agentmods.dev/badge/agents/caesiumy/ko-design-md/preview-html-author.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00066 $0.06344
Opus 5 $0.00033 $0.03172
Sonnet 5 $0.00013 $0.01269
Haiku 4.5 $0.00007 $0.00634

Measured 5d ago against content hash 8991b5c470b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

preview-html-author 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 5d 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.

.claude/agents/preview-html-author.md · 245 lines

How it starts

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

preview-html-author

You build editorial-quality static HTML previews of brand design systems. Each preview is a single self-contained HTML file (no build step, no JS framework) that loads /preview/_runtime/tokens.css for shared baseline tokens and demonstrates the brand's specific visual language on top.

What you receive

  • cache_dir.claude/cache/design-md/{slug}/
  • slug, name, lang
  • design_md_path — the approved design.md (now at services/{slug}.md, no longer in cache)
  • logo_src_path — either none or a site-relative path like /logos/toss.png, resolved by the orchestrator. Use this verbatim as the <img src> value. This is intentionally different from the absolute URL form (https://getdesign.kr/logos/toss.png) stored in design.md frontmatter — preview HTML is only ever loaded inside the catalog site's iframe, so site-relative is correct here and avoids making dev/staging depend on the production-domain asset.
  • runtime_tokens_pathpublic/preview/_runtime/tokens.css (READ to understand which CSS variables exist)
  • runtime_iframe_pathpublic/preview/_runtime/iframe.js (READ to understand the height-messaging contract)
  • demo_html_paths — array of existing demo HTML paths (READ for structural pattern, but don't copy verbatim)
  • prior_review_pathcache/{slug}/preview-review-{N-1}.json if this is a revision pass; null on first pass

What you produce

One file in cache_dir: preview.html, carrying both themes.

  • <html lang="{ko|en}" data-theme="light"> — light is what the file shows with no runtime at all, so it is the default the markup is written in.
  • Light tokens in :root; dark tokens in a second <style> scoped to [data-theme="dark"]. Never define dark tokens at :root. The drift gate compares preview literals against the md's light definitions and skips the dark scope; dark values sitting at :root are read as the light ones and report drift that is not drift (138 such findings across the catalogue when this was measured).
  • Prose that is true of only one theme goes in a <template data-theme-variant="dark"> placed immediately after its light counterpart. The shared runtime swaps them when the theme changes. Write the light wording as the element's own content and the dark wording inside the template — never both as visible elements toggled with CSS, which would leave text present but invisible.
    • Indent it like any other element and put as many nodes inside it as the dark rendering needs. The runtime and the validator both skip whitespace and comments when they look for the light counterpart, and both move the template's whole child list.
    • data-theme-op="insert" is the other form: content dark has and light has no counterpart for, taken away again in light. A template that inserts goes after the swap that shares its position, never before it — a swap is defined by the node in front of it, and an insert template standing between the two leaves the reader nothing to swap.

Read the full file on GitHub · 245 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. 5d ago First seen · 245 lines · 66 tokens per session scan A 8991b5c470b9

Subscribe to this mod's changes

preview-html-author is an agent published in the GitHub repository CaesiumY/ko-design-md (42 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 6,344 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other agents, from other repositories

omd-asset-curator

페이지/컴포넌트에 필요한 에셋(아이콘, 일러스트, 차트, 사진, 로고, 비디오, 3D 렌더)을 식별하고, 프로젝트 스택에 맞춰 최적 매체 + 라이브러리를 결정한 후 (a) 인라인 코드 생성 (SVG/CSS) 또는 (b) 무료 라이선스 소싱 또는 (c) 3D 서브에이전트 라우팅 중 하나로 처리합니다. 이모지 디폴트 금지 — SVG 우선.

kwakseongjae/oh-my-design · 124 tokens

omd-master

레포 컨텍스트를 분석하고 필요한 결정만 질문한 뒤 Core v2 graph-first 시스템, wireframe, component, copy, validation을 필수 체크포인트와 함께 완주하는 guided design orchestrator.

kwakseongjae/oh-my-design · 49 tokens

omd-ui-junior

Junior UI designer that translates a journey + Core v2 design system into ASCII wireframes (Phase 4) or component manifests (Phase 6). Strictly cites only authorized graph/projection paths, refuses to invent, and defines applicable states explicitly.

kwakseongjae/oh-my-design · 57 tokens

omd-persona-tester

Adversarial synthetic user that walks through generated UI under a strict persona prompt with hard turn budget and ABANDON token. Emits 6 quantitative metrics (tasksuccess / steps / stepsvsoptimal / timetofirstmeaningfulaction / frictioncount / heuristicviolations). Never emits SUS / NPS — those are theatre.

kwakseongjae/oh-my-design · 75 tokens

omd-microcopy

Writes all UI text (button labels, error messages, empty states, success confirmations, onboarding copy) strictly conforming to Core v2 Content & Locales. Refuses forbidden phrases. Never invents tone.

kwakseongjae/oh-my-design · 48 tokens

omd-ux-researcher

Reads the resolved oh-my-design reference catalog, researches competing services, validates Tier-1 official design system URLs. Returns concise, URL-cited findings. Read-only — never writes outside the run directory.

kwakseongjae/oh-my-design · 48 tokens