preview

Convert markdown documents into self-contained glanceable HTML pages with diagrams and drill-downs.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/hanh-nd/agent-kit --skill preview-hanh-nd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: preview
Source: https://github.com/hanh-nd/agent-kit/tree/main/plugins/agent-kit/.gemini/skills/preview
Command: npx skills add https://github.com/hanh-nd/agent-kit --skill preview-hanh-nd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Long markdown documents such as design briefs, implementation plans, and research reports are walls of text that are hard to scan. This Skill distills any markdown file or folder into a single self-contained HTML page with a glanceable visual summary on top and the full source preserved in collapsible sections. ## Core Features & Use Cases - Distilled hero plus drill-downs: Generates a visual one-pager (decision cards, scope columns, KPI facts) with the complete source content embedded in collapsible <details> sections, so no information is lost. - Automatic strategy routing: Detects the document shape (design brief, implementation plan, or generic) from content signals and applies the matching layout strategy without any flags or configuration. - Mandatory Mermaid diagrams and theme toggle: Every page includes at least one rendered Mermaid v11 diagram with a validate-before-render guard, plus a light/dark theme toggle. - Use Case: Point it at a folder containing a design brief's README.md and DETAIL.md, and it writes a PREVIEW.html next to them that a teammate can grasp in seconds and expand for full detail. ## Quick Start Ask the agent to preview the markdown file or folder at a given path, and it will generate and open a PREVIEW.html in that directory.

Frequently Asked Questions about preview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a markdown document into an HTML page?▼

Pass the markdown file or folder path to the preview skill and it reads the content, picks a layout strategy, and writes a self-contained PREVIEW.html next to the input. The page opens automatically in your browser on macOS, Linux, or Windows.

How do I visualize a design brief or implementation plan?▼

The skill auto-detects design briefs (README plus DETAIL structure) and implementation plans (ARCHITECTURE plus TASKS or WBS markers) and renders decision cards, scope columns, and a Mermaid flow diagram. Ambiguous documents fall back to a generic section-card layout.

Does the generated HTML need external files or a server?▼

No. The output is one self-contained HTML file with all CSS and JavaScript inline. Only CDN resources like Google Fonts, Mermaid v11, and optional Chart.js are loaded externally, so the file opens directly in any browser.

What happens if a Mermaid diagram fails to render?▼

The skill validates Mermaid code with mermaid.parse before rendering and repairs broken blocks when possible. If a block cannot be fixed, it degrades to a styled code block so the page always renders without the Mermaid error graphic.

Where is the PREVIEW.html output written?▼

Given a folder, PREVIEW.html is written inside that folder itself. Given a single file, it is written into the folder containing that file. Existing PREVIEW.html files are overwritten silently.