# xiaoyecodes/code-animation-prompts architecture

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

- Interactive diagram: https://gitdiagram.com/xiaoyecodes/code-animation-prompts
- Repository: https://github.com/xiaoyecodes/code-animation-prompts

## Overview

Code Animation Prompts is an offline style library and installable Claude Code/Codex skill, not an animation application: an author selects or searches a style, reads its prompt, then asks an agent to plan and produce HTML animation; the optional local renderer exports compatible HTML to MP4. README documents the picker, 341-style library, reference examples and audio-capable rendering. Edges are limited to relationships stated in the README or visible in the sampled scripts; unsampled skill orchestration is represented without speculative links.

Main entry points: [`skills/code-animation-prompts/scripts/render_video.py`](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/render_video.py) (Video renderer), [`skills/code-animation-prompts/assets/library/风格挑选.html`](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/assets/library/%E9%A3%8E%E6%A0%BC%E6%8C%91%E9%80%89.html) (Offline style picker), [`skills/code-animation-prompts/scripts/styles.py`](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/styles.py) (Style search), [`docs/STYLES.md`](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/docs/STYLES.md) (Style index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Style discovery"]
  node_picker["Offline style picker<br/>[风格挑选.html]"]
  node_styleindex["Style index<br/>[STYLES.md]"]
  node_search["Style search<br/>[styles.py]"]
  node_catalog[("Style catalog<br/>[catalog.json]")]
end

subgraph group_skill["Agent skill"]
  node_skillentry["Skill instructions<br/>[SKILL.md]"]
  node_examples["Animation examples"]
end

subgraph group_production["Animation production"]
  node_starter["Timed HTML starter"]
  node_render["Video renderer<br/>[render_video.py]"]
  node_playwright["Playwright / Chromium"]
  node_ffmpeg["FFmpeg"]
  node_mp4["MP4 output"]
end

subgraph group_library["Prompt library"]
  node_prompts["Style prompts"]
  node_stills["Reference stills"]
end

node_creator(("Creator"))
node_agent(("Claude Code / Codex"))

node_creator -->|"browses styles"| node_picker
node_creator -->|"searches styles"| node_search
node_picker -->|"exports selection"| node_creator
node_search -->|"reads"| node_catalog
node_styleindex -->|"lists styles"| node_creator
node_creator -->|"requests animation"| node_agent
node_agent -->|"follows workflow"| node_skillentry
node_agent -->|"reads style prompt"| node_prompts
node_agent -->|"consults examples"| node_examples
node_agent -->|"consults references"| node_stills
node_agent -->|"adapts example"| node_starter
node_creator -->|"runs renderer"| node_render
node_render -->|"drives browser"| node_playwright
node_render -->|"streams frames"| node_ffmpeg
node_render -->|"writes video"| node_mp4
node_render -.->|"adds optional audio"| node_mp4

click node_picker "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/assets/library/%E9%A3%8E%E6%A0%BC%E6%8C%91%E9%80%89.html"
click node_styleindex "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/docs/STYLES.md"
click node_search "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/styles.py"
click node_catalog "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/references/catalog.json"
click node_skillentry "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/SKILL.md"
click node_examples "https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library/%E7%A4%BA%E4%BE%8B"
click node_prompts "https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library/%E9%A3%8E%E6%A0%BC%E6%8F%90%E7%A4%BA%E8%AF%8D"
click node_stills "https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library"
click node_starter "https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/starter"
click node_render "https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/render_video.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_picker,node_styleindex,node_search,node_catalog toneBlue
class node_skillentry,node_examples toneAmber
class node_starter,node_render,node_playwright,node_ffmpeg,node_mp4 toneMint
class node_prompts,node_stills toneRose
class node_creator,node_agent toneIndigo
```

## Components

### Style discovery

- [Offline style picker](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/assets/library/%E9%A3%8E%E6%A0%BC%E6%8C%91%E9%80%89.html): `skills/code-animation-prompts/assets/library/风格挑选.html`
- [Style index](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/docs/STYLES.md): `docs/STYLES.md`
- [Style search](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/styles.py): `skills/code-animation-prompts/scripts/styles.py`
- [Style catalog](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/references/catalog.json): `skills/code-animation-prompts/references/catalog.json`

### Agent skill

- [Skill instructions](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/SKILL.md): `skills/code-animation-prompts/SKILL.md`
- [Animation examples](https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library/%E7%A4%BA%E4%BE%8B): `skills/code-animation-prompts/assets/library/示例`

### Animation production

- [Timed HTML starter](https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/starter): `skills/code-animation-prompts/assets/starter`
- [Video renderer](https://github.com/xiaoyecodes/code-animation-prompts/blob/main/skills/code-animation-prompts/scripts/render_video.py): `skills/code-animation-prompts/scripts/render_video.py`
- **Playwright / Chromium**
- **FFmpeg**
- **MP4 output**

### Prompt library

- [Style prompts](https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library/%E9%A3%8E%E6%A0%BC%E6%8F%90%E7%A4%BA%E8%AF%8D): `skills/code-animation-prompts/assets/library/风格提示词`
- [Reference stills](https://github.com/xiaoyecodes/code-animation-prompts/tree/main/skills/code-animation-prompts/assets/library): `skills/code-animation-prompts/assets/library`

### Other components

- **Creator**
- **Claude Code / Codex**

## Connections

- Creator → Offline style picker: browses styles (evidence: `README.md`)
- Creator → Style search: searches styles (evidence: `README.md`)
- Offline style picker → Creator: exports selection (evidence: `README.md`)
- Style search → Style catalog: reads (evidence: `skills/code-animation-prompts/scripts/styles.py`)
- Style index → Creator: lists styles (evidence: `README.md`)
- Creator → Claude Code / Codex: requests animation (evidence: `README.md`)
- Claude Code / Codex → Skill instructions: follows workflow (evidence: `README.md`)
- Claude Code / Codex → Style prompts: reads style prompt (evidence: `README.md`)
- Claude Code / Codex → Animation examples: consults examples (evidence: `README.md`)
- Claude Code / Codex → Reference stills: consults references (evidence: `README.md`)
- Claude Code / Codex → Timed HTML starter: adapts example (evidence: `README.md`)
- Creator → Video renderer: runs renderer (evidence: `README.md`)
- Video renderer → Playwright / Chromium: drives browser (evidence: `skills/code-animation-prompts/scripts/render_video.py`)
- Video renderer → FFmpeg: streams frames (evidence: `skills/code-animation-prompts/scripts/render_video.py`)
- Video renderer → MP4 output: writes video (evidence: `skills/code-animation-prompts/scripts/render_video.py`)
- Video renderer → MP4 output: adds optional audio (evidence: `skills/code-animation-prompts/scripts/render_video.py`)
