# 0xyaoyun/ppt-kit architecture

> Architecture diagram of the GitHub repository 0xyaoyun/ppt-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0xyaoyun/ppt-kit
- Repository: https://github.com/0xyaoyun/ppt-kit

## Overview

ppt-kit is a Claude Code skill paired with a Python slide-generation engine. Its main workflow is: a user supplies reference material and presentation content; the skill guides style extraction and deck planning; the engine combines a skin, deck plan, page archetypes, and image slots into fixed-canvas HTML; Chromium renders PDF output with a 1:1 size check. Separate capabilities include reusable reference-library ingestion and search, skin validation, freeform pages, and decorative overlays. The README documents broader reference inputs; the sampled extractor and library code establish only an HTML extraction path, so those capabilities are not linked as implemented here.

Main entry points: [`pptkit/assemble.py`](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/assemble.py) (HTML assembler), [`pptkit/skin.py`](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/skin.py) (Skin validation), [`bin/pptkit.py`](https://github.com/0xyaoyun/ppt-kit/blob/main/bin/pptkit.py) (Python CLI), [`skill/SKILL.md`](https://github.com/0xyaoyun/ppt-kit/blob/main/skill/SKILL.md) (Claude Code skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Authoring workflow"]
  node_claude["Claude Code skill<br/>[SKILL.md]"]
  node_blueprints["Document blueprints"]
  node_deckplan["Deck plan"]
end

subgraph group_style["Style assets"]
  node_extract["HTML style extractor<br/>[extract_html.py]"]
  node_skin["Skin validation<br/>[skin.py]"]
  node_tokens["Token resolver<br/>[tokens.py]"]
  node_vocab["Controlled vocabulary<br/>[vocab.py]"]
  node_ref_library[("Reference library<br/>[library.py]")]
end

subgraph group_composition["Deck composition"]
  node_archetypes["Page archetypes<br/>[archetypes.py]"]
  node_layouts["Page templates"]
  node_assemble["HTML assembler<br/>[assemble.py]"]
  node_images["Image slots<br/>[images.py]"]
end

subgraph group_output["Assembly and output"]
  node_canvas["Canvas dimensions<br/>[canvas.py]"]
  node_renderer["PDF renderer<br/>[render.py]"]
  node_cli["Python CLI<br/>[pptkit.py]"]
  node_pdf["HTML and PDF output"]
end

node_user(("Presentation author"))

node_user -->|"describes deck"| node_claude
node_claude -->|"extracts style"| node_extract
node_claude -->|"plans slides"| node_deckplan
node_blueprints -->|"guides planning"| node_deckplan
node_claude -.->|"validates skin"| node_skin
node_ref_library -->|"extracts profile"| node_extract
node_skin -->|"resolves tokens"| node_tokens
node_skin -->|"checks tags"| node_vocab
node_cli -->|"ingests references"| node_ref_library
node_cli -->|"validates skin"| node_skin
node_cli -->|"assembles deck"| node_assemble
node_assemble -->|"validates content"| node_archetypes
node_assemble -->|"renders templates"| node_layouts
node_assemble -->|"resolves CSS"| node_tokens
node_assemble -->|"resolves slots"| node_images
node_assemble -->|"sets dimensions"| node_canvas
node_deckplan -->|"supplies slides"| node_assemble
node_skin -->|"supplies style"| node_assemble
node_cli -->|"renders PDF"| node_renderer
node_renderer -->|"checks dimensions"| node_canvas
node_assemble -->|"provides HTML"| node_renderer
node_renderer -->|"produces PDF"| node_pdf
node_assemble -->|"produces HTML"| node_pdf

click node_claude "https://github.com/0xyaoyun/ppt-kit/blob/main/skill/SKILL.md"
click node_blueprints "https://github.com/0xyaoyun/ppt-kit/tree/main/structures"
click node_deckplan "https://github.com/0xyaoyun/ppt-kit/tree/main/decks"
click node_extract "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/extract_html.py"
click node_skin "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/skin.py"
click node_tokens "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/tokens.py"
click node_vocab "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/vocab.py"
click node_ref_library "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/library.py"
click node_archetypes "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/archetypes.py"
click node_layouts "https://github.com/0xyaoyun/ppt-kit/tree/main/layouts"
click node_assemble "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/assemble.py"
click node_images "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/images.py"
click node_canvas "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/canvas.py"
click node_renderer "https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/render.py"
click node_cli "https://github.com/0xyaoyun/ppt-kit/blob/main/bin/pptkit.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_claude,node_blueprints,node_deckplan toneBlue
class node_extract,node_skin,node_tokens,node_vocab,node_ref_library toneAmber
class node_archetypes,node_layouts,node_assemble,node_images toneMint
class node_canvas,node_renderer,node_cli,node_pdf toneRose
class node_user toneIndigo
```

## Components

### Authoring workflow

- [Claude Code skill](https://github.com/0xyaoyun/ppt-kit/blob/main/skill/SKILL.md): `skill/SKILL.md`
- [Document blueprints](https://github.com/0xyaoyun/ppt-kit/tree/main/structures): `structures`
- [Deck plan](https://github.com/0xyaoyun/ppt-kit/tree/main/decks): `decks`

### Style assets

- [HTML style extractor](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/extract_html.py): `pptkit/extract_html.py`
- [Skin validation](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/skin.py): `pptkit/skin.py`
- [Token resolver](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/tokens.py): `pptkit/tokens.py`
- [Controlled vocabulary](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/vocab.py): `pptkit/vocab.py`
- [Reference library](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/library.py): `pptkit/library.py`

### Deck composition

- [Page archetypes](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/archetypes.py): `pptkit/archetypes.py`
- [Page templates](https://github.com/0xyaoyun/ppt-kit/tree/main/layouts): `layouts`
- [HTML assembler](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/assemble.py): `pptkit/assemble.py`
- [Image slots](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/images.py): `pptkit/images.py`

### Assembly and output

- [Canvas dimensions](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/canvas.py): `pptkit/canvas.py`
- [PDF renderer](https://github.com/0xyaoyun/ppt-kit/blob/main/pptkit/render.py): `pptkit/render.py`
- [Python CLI](https://github.com/0xyaoyun/ppt-kit/blob/main/bin/pptkit.py): `bin/pptkit.py`
- **HTML and PDF output**

### Other components

- **Presentation author**

## Connections

- Presentation author → Claude Code skill: describes deck (evidence: `README.md`)
- Claude Code skill → HTML style extractor: extracts style (evidence: `README.md`)
- Claude Code skill → Deck plan: plans slides (evidence: `README.md`)
- Document blueprints → Deck plan: guides planning (evidence: `README.md`)
- Claude Code skill → Skin validation: validates skin
- Reference library → HTML style extractor: extracts profile (evidence: `pptkit/library.py`)
- Skin validation → Token resolver: resolves tokens (evidence: `pptkit/skin.py`)
- Skin validation → Controlled vocabulary: checks tags (evidence: `pptkit/skin.py`)
- Python CLI → Reference library: ingests references (evidence: `bin/pptkit.py`)
- Python CLI → Skin validation: validates skin (evidence: `bin/pptkit.py`)
- Python CLI → HTML assembler: assembles deck (evidence: `bin/pptkit.py`)
- HTML assembler → Page archetypes: validates content (evidence: `pptkit/assemble.py`)
- HTML assembler → Page templates: renders templates (evidence: `pptkit/assemble.py`)
- HTML assembler → Token resolver: resolves CSS (evidence: `pptkit/assemble.py`)
- HTML assembler → Image slots: resolves slots (evidence: `pptkit/assemble.py`)
- HTML assembler → Canvas dimensions: sets dimensions (evidence: `pptkit/assemble.py`)
- Deck plan → HTML assembler: supplies slides (evidence: `README.md`)
- Skin validation → HTML assembler: supplies style (evidence: `README.md`)
- Python CLI → PDF renderer: renders PDF (evidence: `bin/pptkit.py`)
- PDF renderer → Canvas dimensions: checks dimensions (evidence: `pptkit/render.py`)
- HTML assembler → PDF renderer: provides HTML (evidence: `README.md`)
- PDF renderer → HTML and PDF output: produces PDF (evidence: `README.md`)
- HTML assembler → HTML and PDF output: produces HTML (evidence: `README.md`)
