This snippet should be used when creating user-journey-optimized HTML documents that guide readers through a clear narrative arc with curated content and dark mode support.
Create journey-focused HTML documents that guide users from context β insight β action.
mkdir -p claude_files/html${CLAUDE_PLUGIN_ROOT}/templates/html/base-template.htmlclaude_files/html/{description}.html (no modifications){{TITLE}} β actual title<!-- ===== CONTENT GOES HERE ===== --> β actual contentopen claude_files/html/{description}.htmlViolations β STOP:
<!DOCTYPE html> manually<style> tagsmkdir -p claude_files/htmlclaude_files/html/{description}.html (lowercase, kebab-case)open claude_files/html/{description}.htmlNaming convention:
api-comparison.html, youtube-tutorial.html)${CLAUDE_PLUGIN_ROOT}/templates/html/base-template.html (CSS, JS, structure)${CLAUDE_PLUGIN_ROOT}/templates/html/plan-template.html (for PLANHTML)${CLAUDE_PLUGIN_ROOT}/templates/html/examples.mdWorkflow: Read β Write β Edit (preserves CSS exactly)
NEVER use hardcoded colors - use CSS variables or existing classes
Checklist:
<pre><code>.diagram-containerCORE PHILOSOPHY: Less is more. Curate ruthlessly.
Anti-patterns to AVOID:
Color coding: Red=critical, Gold=important, Green=good, Gray=muted
Every HTML document should follow this arc:
.important-always-visible.primary-section or brief prose.two-column-layout.collapsible (collapsed).card.priority or bold list| Journey Stage | Component | Content Type |
|---|---|---|
| Hook | .important-always-visible |
TL;DR, key takeaway |
| Context | Brief prose or bullets | Background needed |
| Insight | Mermaid + .two-column-layout |
Core analysis |
| Evidence | .collapsible (closed) |
Supporting details |
| Action | .card.priority |
Next steps |
Decision Tree:
.important-always-visible (always visible, never collapsed).two-column-layout (max one per document).collapsible (collapsed by default).card.priority at the END<code>text</code><pre><code>text</code></pre><div>Rule: ONE diagram per document. Pick the single most illuminating view.
Ask before adding a diagram:
Basic structure:
<div class="diagram-container">
<div class="mermaid">
flowchart TD
Start --> Process --> End
</div>
</div>
Styling:
classDef with light text (color:#fff)color:#000 in inline stylesExamples: See ${CLAUDE_PLUGIN_ROOT}/templates/html/examples.md
<div class="important-always-visible">
<h2>π― Bottom Line</h2>
<p><strong>One sentence capturing the key insight.</strong></p>
<ul>
<li><strong>Impact:</strong> Why this matters</li>
<li><strong>Recommendation:</strong> What to do</li>
</ul>
</div>
<div class="two-column-layout">
<div>
<h3>Option A</h3>
<p>Synthesized pros/cons</p>
</div>
<div>
<h3>Option B</h3>
<p>Synthesized pros/cons</p>
</div>
</div>
<div class="collapsible" data-collapsible="closed">
<div class="collapsible-header">
<span>π Technical Details</span>
<span class="arrow">βΆ</span>
</div>
<div class="collapsible-content">
<!-- Raw data, logs, extended analysis -->
</div>
</div>
<div class="card priority">
<h3>π Next Steps</h3>
<ol>
<li><strong>First:</strong> Immediate action</li>
<li><strong>Then:</strong> Follow-up action</li>
<li><strong>Finally:</strong> Verification step</li>
</ol>
</div>
Before adding ANY content, ask:
Target: A user should be able to understand the key insight in 30 seconds by reading only uncollapsed content.
{{TITLE}}${CLAUDE_PLUGIN_ROOT}/templates/html/base-template.html${CLAUDE_PLUGIN_ROOT}/templates/html/examples.md