ln-150-presentation-creator
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-150-presentation-creator
Agent 安装分布
Skill 文档
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
HTML Presentation Builder
This skill creates an interactive, self-contained HTML presentation from existing project documentation. It transforms Markdown documents into a professional, navigable web presentation with diagrams, collapsible sections, and modern UI.
Purpose
Transforms existing Markdown documentation into an interactive, self-contained HTML presentation with 6 tabs (Overview, Requirements, Architecture/C4, Tech Spec, Roadmap, Guides) and Mermaid diagram support.
When to Use This Skill
This skill is a L2 WORKER invoked by ln-100-documents-pipeline orchestrator OR used standalone.
Use this skill when:
- Building HTML presentation from existing documentation
- Rebuilding presentation after documentation updates
- Creating standalone presentation for sharing (no full documentation setup needed)
- Validating that source documentation is ready for presentation generation
Part of workflow: ln-100-documents-pipeline â ln-110-project-docs-coordinator â ln-120-reference-docs-creator â ln-130-tasks-docs-creator â ln-140-test-docs-creator (optional) â ln-150-presentation-creator
Prerequisites: Existing documentation in docs/ directory with required files:
docs/project/requirements.md(REQUIRED)docs/project/architecture.md(REQUIRED)docs/project/tech_stack.md(REQUIRED)
Optional files (enhance presentation but not blocking):
docs/project/api_spec.md,database_schema.md,design_guidelines.md,runbook.mddocs/reference/adrs/*.md(ADRs with Category: Strategic|Technical)docs/reference/guides/*.md(How-to guides)docs/tasks/kanban_board.md(Epic Story Counters for Roadmap)
Workflow
The skill follows a 7-phase workflow: READ DOCS â VALIDATE SOURCE EXISTS â VALIDATE SOURCE QUALITY â CREATE DIR â COPY TEMPLATES â INJECT CONTENT â BUILD HTML.
Phase 1: READ DOCS – Load all project documentation from docs/ Phase 2: VALIDATE SOURCE EXISTS – Check required files exist (requirements.md, architecture.md, tech_stack.md), warn if optional missing Phase 3: VALIDATE SOURCE QUALITY – Check diagrams, placeholders, content length (read-only validation) Phase 4: CREATE DIR – Create presentation/ directory + README.md navigation hub Phase 5: COPY TEMPLATES – Copy HTML/CSS/JS templates to assets/ Phase 6: INJECT CONTENT – Parse MD docs â replace placeholders in tab files â delete example blocks Phase 7: BUILD HTML – Assemble modular components into standalone presentation_final.html
MANDATORY READ: Load references/phases_detailed.md for detailed workflow of each phase.
Phase 1: Read Documentation
Objective: Load all project documentation for transformation.
When to execute: Always (first phase)
Process:
-
Use docs/ as source:
- Read documentation from
docs/project/,docs/reference/,docs/tasks/directories - Standard locations created by ln-114, ln-112, ln-113
- Read documentation from
-
Read Core MD Documents:
project/requirements.md– Functional Requirementsproject/architecture.md– Architecture design, C4 diagramsproject/tech_stack.md– Technology versions, Docker configurationproject/api_spec.md– API endpoints, authentication (if exists)project/database_schema.md– Database schema, ER diagrams (if exists)project/design_guidelines.md– UI/UX design system (if exists)project/runbook.md– Operational procedures (if exists)
-
Read ADRs (if exist):
reference/adrs/adr-001-*.mdthroughadr-NNN-*.md- Parse ADR metadata (status, date, title, Category: Strategic|Technical)
-
Read Guides (if exist):
reference/guides/*.md– How-to guides for Guides tab
-
Read Kanban Board (if exists):
tasks/kanban_board.md– Epic Story Counters table for Roadmap progress
-
Extract metadata:
- Project name, date, version from documents
- Preserve Mermaid diagram blocks
Output: Loaded documentation data ready for validation and HTML generation
Phase 2: Validate Source Documentation Exists
Objective: Verify that required source documentation exists before building presentation. Prevent building incomplete presentations.
When to execute: After Phase 1 (documentation loaded)
Process:
2.1 Check required files
REQUIRED (must exist – block execution if missing):
- â
docs/project/requirements.md - â
docs/project/architecture.md - â
docs/project/tech_stack.md
For each required file:
- Use Glob tool:
pattern: "docs/project/{filename}" - If NOT found:
- Add to missing list
- If found:
- Check file size > 100 bytes (not empty)
If ANY required file missing or empty:
â ERROR: Cannot build presentation - missing required documentation:
- docs/project/requirements.md [missing/empty]
- docs/project/architecture.md [missing/empty]
Suggestion: Run ln-111-project-docs-creator to create missing files.
STOP execution.
2.2 Check optional files
OPTIONAL (enhance presentation – warn if missing but continue):
- â ï¸
docs/project/api_spec.md(for backend projects) - â ï¸
docs/project/database_schema.md(for projects with database) - â ï¸
docs/project/design_guidelines.md(for frontend projects) - â ï¸
docs/project/runbook.md(for operational projects)
For each optional file:
- Use Glob tool:
pattern: "docs/project/{filename}" - If NOT found:
- Add to optional missing list
If optional files missing:
â WARN: Optional files missing: [list]
Presentation will have reduced content in some tabs.
Continue execution.
2.3 Check optional directories
OPTIONAL directories:
docs/reference/adrs/– check if any ADR files exist (adrs/*.md)docs/reference/guides/– check if any guide files exist (guides/*.md)docs/tasks/kanban_board.md– check for Roadmap data
For each directory:
- Use Glob tool to find files
- If empty/missing:
- Log:
â¹ Optional directory empty: {directory} - related tab will show placeholder
- Log:
2.4 Report validation summary
Log summary:
â Source documentation validation completed:
Required files:
- â
requirements.md (found, 8.5 KB)
- â
architecture.md (found, 15.2 KB)
- â
tech_stack.md (found, 3.1 KB)
Optional files:
- â ï¸ api_spec.md (missing - Technical Spec tab will have reduced content)
- â
database_schema.md (found, 4.7 KB)
- â ï¸ design_guidelines.md (missing)
Optional directories:
- â
adrs/ (5 ADR files found)
- â ï¸ guides/ (empty - Guides tab will show placeholder)
- â
kanban_board.md (found - Roadmap will show progress)
Output: Validation passed (all required files exist) OR error (stop execution)
Phase 3: Validate Source Content Quality
Objective: Verify source docs contain sufficient content. Warn about incomplete content but don’t block execution.
When to execute: After Phase 2 (source files exist)
Checks performed (warnings only, non-blocking):
- Mermaid diagrams: architecture.md must have â¥1 diagram, database_schema.md must have ER diagram
- Placeholders: Detect
{{PLACEHOLDER}},[Add your ...],TODO:patterns - Content length: requirements.md >500 words, architecture.md >1000 words, tech_stack.md >200 words
Auto-fix: None – ln-115 is read-only. Run ln-111-project-docs-creator to fix issues.
Output: Content quality report with warnings
ð Detailed workflow: per phases_detailed.md §Phase 3
Phase 4: Create Presentation Directory & README
Objective: Setup presentation directory structure and navigation hub.
When to execute: After Phase 3 (source validation complete, warnings logged)
Process:
-
Create presentation directory:
mkdir -p docs/presentation/ -
Check if presentation/README.md exists:
- Use Glob tool:
pattern: "docs/presentation/README.md" - If file exists:
- Skip creation
- Log:
â docs/presentation/README.md already exists (preserved) - Proceed to Phase 5
- If NOT exists:
- Continue to step 3
- Use Glob tool:
-
Create presentation/README.md from template:
- Copy template:
references/presentation_readme_template.mdâdocs/presentation/README.md - Replace placeholders:
{{PROJECT_NAME}}â from requirements.md{{LAST_UPDATED}}â current date (YYYY-MM-DD)
- Content structure:
- Purpose: What is this presentation
- Quick Navigation: Links to presentation_final.html and assets/
- Customization Guide: How to edit source files in assets/
- Build Instructions: How to rebuild after changes
- Maintenance: When to rebuild, verification checklist
- Copy template:
-
Notify user:
- If created:
â Created docs/presentation/README.md (navigation hub) - If skipped:
â docs/presentation/README.md already exists (preserved)
- If created:
Output: docs/presentation/README.md (created or existing)
Phase 5: Copy Templates to Project
Objective: Copy HTML/CSS/JS templates from skill references/ to presentation directory.
When to execute: After Phase 4 (presentation directory exists)
Process:
-
Check if assets exist:
- Use Glob tool:
pattern: "docs/presentation/assets/" - If
docs/presentation/assets/exists:- Skip copying (user may have customized files)
- Log:
â Presentation assets already exist - preserving user customizations - Proceed to Phase 6
- If NOT exists:
- Continue to step 2
- Use Glob tool:
-
Copy template files:
cp references/presentation_template.html â docs/presentation/assets/ cp references/styles.css â docs/presentation/assets/ cp references/scripts.js â docs/presentation/assets/ cp references/build-presentation.js â docs/presentation/assets/ cp -r references/tabs/ â docs/presentation/assets/tabs/ -
Verify copied structure:
docs/presentation/assets/ âââ presentation_template.html # Base HTML5 + 6 tab navigation âââ styles.css # ~400-500 lines âââ scripts.js # Tab switching + Mermaid init âââ build-presentation.js # Node.js build script âââ tabs/ âââ tab_overview.html # Landing page âââ tab_requirements.html # FRs + ADRs âââ tab_architecture.html # C4 diagrams âââ tab_technical_spec.html # API + Data + Deployment âââ tab_roadmap.html # Epic list âââ tab_guides.html # How-to guides
Output: Template files copied to docs/presentation/assets/ (or skipped if already exist)
Note: Templates contain placeholders ({{VARIABLE_NAME}}) that will be replaced in Phase 6.
Phase 6: Content Injection & Example Cleanup
Objective: Parse MD docs, inject into HTML templates, remove example blocks.
When to execute: After Phase 5 (templates exist in assets/)
Process:
- Parse MD docs (10 sources): requirements, architecture, tech_stack, api_spec, database_schema, design_guidelines, runbook, adrs/.md, kanban_board, guides/.md
- Inject content: Replace
{{PLACEHOLDER}}in 6 tab files with parsed content - Delete examples: Remove
<!-- EXAMPLE START -->...<!-- EXAMPLE END -->blocks from all tabs
Tab placeholders: Overview (5), Requirements (4 + NFR ban), Architecture (5), Technical Spec (4), Roadmap (3), Guides (6)
Validation: No example markers, no hardcoded e-commerce data, only project-specific content
Output: Clean, project-specific tab files ready for build
ð Placeholder reference & example transformation: per phases_detailed.md §Phase 6
Phase 7: Build Final Presentation
Objective: Assemble modular components into standalone HTML file.
When to execute: After Phase 6 (content injected, examples deleted)
Process:
-
Check if presentation_final.html exists (Auto-rebuild for automation):
- Use Glob tool:
pattern: "docs/presentation/presentation_final.html" - If file exists:
- â Auto-rebuild (generated file, safe operation)
- Log:
â¹ Rebuilding presentation_final.html (generated file, safe to rebuild) - Continue to step 2
- If NOT exists:
- Log:
Creating presentation_final.html - Continue to step 2
- Log:
Why auto-rebuild:
- presentation_final.html is a generated file (source of truth: assets/ directory)
- Rebuilding is safe – no data loss (source files preserved in assets/)
- Maintains fully automatic workflow when invoked by ln-110-documents-pipeline
- User customizations in assets/ are preserved (only final HTML is regenerated)
- Use Glob tool:
-
Navigate to presentation assets directory:
cd docs/presentation/assets/ -
Run build script:
node build-presentation.js -
Build Script Process:
- Step 1: Read presentation_template.html
- Step 2: Read and inline styles.css â
<style>tag - Step 3: Read and inline scripts.js â
<script>tag - Step 4: Read all 6 tab files â inject into empty
<div>containers - Step 5: Replace {{PLACEHOLDERS}} with actual values
- Step 6: Write
../presentation_final.html
-
Validate Output (only if file was built):
- Check file size (~120-150 KB expected)
- Verify Mermaid diagrams syntax is valid
- Log:
â Build completed successfully
-
Notify user:
- If rebuilt (file existed):
â Rebuilt docs/presentation/presentation_final.html (~120-150 KB) - If created (file NOT existed):
â Created docs/presentation/presentation_final.html (~120-150 KB) - Remind:
Test in browser: Double-click to open, or use http-server
- If rebuilt (file existed):
Output: docs/presentation/presentation_final.html (self-contained, ~120-150 KB, no external dependencies except Mermaid.js CDN)
â ï¸ Important Note:
presentation_final.html is a generated file built from modular source files in assets/.
- â DO NOT edit
presentation_final.htmldirectly â changes will be lost on next rebuild - â
DO edit source files in
assets/directory (template, tabs, styles, scripts) - ð Rebuild after changes:
cd assets/ && node build-presentation.js
Complete Output Structure
docs/
âââ project/ # Source documentation (input)
â âââ requirements.md
â âââ architecture.md
â âââ tech_stack.md
â âââ api_spec.md (conditional)
â âââ database_schema.md (conditional)
â âââ design_guidelines.md (conditional)
â âââ runbook.md (conditional)
âââ reference/ # Source documentation (input)
â âââ adrs/
â â âââ *.md (Category: Strategic | Technical)
â âââ guides/
â âââ *.md (optional)
âââ tasks/ # Source documentation (input)
â âââ kanban_board.md (Epic Story Counters)
âââ presentation/ # Output directory
âââ README.md # Navigation hub
âââ presentation_final.html # Final standalone HTML (~120-150 KB)
âââ assets/ # Modular HTML structure
âââ presentation_template.html # Base HTML5 + 6 tabs
âââ styles.css # ~400-500 lines
âââ scripts.js # Tab switching + Mermaid
âââ build-presentation.js # Node.js build script
âââ tabs/
âââ tab_overview.html # Landing page
âââ tab_requirements.html # FRs + ADRs
âââ tab_architecture.html # C4 diagrams
âââ tab_technical_spec.html # API + Data + Deployment
âââ tab_roadmap.html # Epic list
âââ tab_guides.html # How-to guides
Note: Presentation READS from docs/project/, docs/reference/, docs/tasks/ but OUTPUTS to docs/presentation/.
HTML Features
- Single Source of Truth: No information duplication – each piece lives in exactly ONE tab
- Landing Page (Overview): Problem/Solution/Business Value, Stakeholders, Documentation Guide, Quick Facts, Tech Stack badges
- Interactive Navigation: 6 tabs with SCOPE tags, state persistence (localStorage), smooth transitions
- Table-Based Layout: FRs table only (Non-Functional Requirements are forbidden), Architecture highlights table
- Roadmap Simplified: Vertical Epic list with In/Out Scope sections, status badges, Dependencies/Success Criteria
- ADR Organization: Grouped by category (Strategic/Technical) with accordion, full content inline
- Diagram Visualization: Mermaid.js with tab-switch rerender (C4, ER, Sequence, Deployment)
- Responsive Design: Mobile-first (320px/768px/1024px+ breakpoints)
- Collapsible Sections: Auto-collapse with scroll preservation
- Modern UI: Clean professional design, WCAG 2.1 Level AA compliant
- English Language: All presentation content in English
Best Practices
Idempotent operation: Preserves README.md, preserves assets/ (user customizations), auto-rebuilds presentation_final.html.
Key rules by phase:
- Phase 2: STOP if required files missing; Phase 3: WARN only (non-blocking)
- Phase 5: Don’t overwrite existing assets (user customizations)
- Phase 6: Delete ALL example blocks, escape XSS, valid Mermaid syntax
- Phase 7: Warn if output >200 KB
Customization Options
Edit assets/styles.css (CSS variables for theming), assets/presentation_template.html (layout/tabs), or assets/tabs/*.html (tab content).
â ï¸ After any customization: Always rebuild the presentation:
cd assets/
node build-presentation.js
Important: Never edit presentation_final.html directly â it’s a generated file that gets overwritten on each build.
Prerequisites
Orchestrator: ln-110-documents-pipeline | Standalone: Yes (rebuild/validate existing docs)
Required files: requirements.md, architecture.md, tech_stack.md (in docs/project/) Optional files: api_spec, database_schema, design_guidelines, runbook, adrs/.md, guides/.md, kanban_board.md
Dependencies: Node.js v18+, Modern browser, Internet (Mermaid CDN)
Definition of Done
| Phase | Critical Checkpoints |
|---|---|
| 1. READ DOCS | â All docs loaded from docs/project/, docs/reference/, docs/tasks/ â Metadata extracted â Mermaid blocks preserved |
| 2. VALIDATE EXISTS | â Required files exist (requirements.md, architecture.md, tech_stack.md) â ERROR if missing |
| 3. VALIDATE QUALITY | â Diagrams checked â Placeholders detected â Content length checked â WARN only (non-blocking) |
| 4. CREATE DIR | â docs/presentation/ created â README.md created/preserved |
| 5. COPY TEMPLATES | â assets/ created with all templates OR preserved if exists |
| 6. INJECT CONTENT | â
All 6 tabs populated â
CRITICAL: Example blocks deleted â
No <!-- EXAMPLE --> markers â
No hardcoded e-commerce data |
| 7. BUILD HTML | â
node build-presentation.js executed â
presentation_final.html created (~120-150 KB) â
Tested in browser |
Output: docs/presentation/presentation_final.html + assets/ + README.md
Critical Rules
- 3 required files: requirements.md, architecture.md, tech_stack.md must exist â STOP execution if missing
- Never overwrite assets/: Existing assets/ directory is preserved (user customizations); only presentation_final.html is regenerated
- Delete ALL example blocks: Every
<!-- EXAMPLE START -->...<!-- EXAMPLE END -->must be removed; no hardcoded e-commerce data in output - Never edit presentation_final.html directly: It is a generated file; edit source files in assets/ and rebuild
- Node.js v18+ required: Build script depends on Node.js for assembling final HTML
Reference Files
- Detailed phase workflow:
references/phases_detailed.md - Presentation README template:
references/presentation_readme_template.md - HTML template:
references/presentation_template.html - Styles:
references/styles.css - Scripts:
references/scripts.js - Build script:
references/build-presentation.js - Tab templates:
references/tabs/tab_overview.html,tab_requirements.html,tab_architecture.html,tab_technical_spec.html,tab_roadmap.html,tab_guides.html
Troubleshooting
- ERROR: Missing required files: Run ln-111-project-docs-creator to create requirements.md, architecture.md, tech_stack.md
- WARN: Missing diagrams: Add Mermaid diagrams to architecture.md (C4 Context/Container/Component) and database_schema.md (ER diagram)
- WARN: Placeholders found: Complete documentation in source MD files before building
- WARN: Sparse content: Expand documentation (requirements.md >500 words, architecture.md >1000 words, tech_stack.md >200 words)
- Build script fails: Check Node.js v18+, navigate to assets/, verify all files exist
- Mermaid diagrams not rendering: Check syntax with Mermaid Live Editor, verify CDN loaded
- Tabs not switching: Check JavaScript loaded, open browser console for errors
- File too large (>200 KB): Reduce diagrams, minify CSS/JS, remove unused rules
Version: 8.0.0 Last Updated: 2025-12-12