# yangagent/whiteboard-animation-skill architecture

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

- Interactive diagram: https://gitdiagram.com/yangagent/whiteboard-animation-skill
- Repository: https://github.com/yangagent/whiteboard-animation-skill

## Overview

1. **Repository purpose**
   This is not an application runtime; it is a **Python-based skill/tooling repo** for generating whiteboard-style animation assets and videos. The top-level `README.md` says it contains two reusable Agent Skills under `skills/`.

2. **Two independent skill boundaries**
   The architecture is split into two mostly separate modules:
   - `skills/whiteboard-animation`: generate whiteboard hand-drawn animation videos from one or more images.
   - `skills/whiteboard-video-workflow`: run an end-to-end pipeline from SRT subtitles to storyboard, images, video segments, and final assembly.
   Each skill has its own `SKILL.md`, which is the natural contract layer for an agent or operator.

3. **Whiteboard animation subsystem**
   `skills/whiteboard-animation/scripts/` contains the operational entry points:
   - `setup_env.py` for local environment setup
   - `generate_whiteboard.py` for single-job generation
   - `batch_generate.py` for multi-image or bulk processing
   This skill is centered on converting prepared image inputs into a whiteboard-style animation output, with `assets/` likely holding sample or supporting media.

4. **Workflow subsystem for video generation**
   `skills/whiteboard-video-workflow/scripts/` breaks the larger pipeline into stages:
   - `generate-storyboard.py` to transform an SRT subtitle file into a structured storyboard
   - `generate-image.py` to create images for storyboard scenes
   - `workflow_helper.py` for shared orchestration logic
   - `check_env.py` to verify required configuration
   This skill is the higher-level orchestration layer for producing a complete video sequence.

5. **Data flow in the workflow skill**
   The main pipeline appears to be:
   **SRT subtitle input → storyboard parsing → scene/image generation → video clip generation → final merge**.
   The visible scripts cover the first two stages directly and provide helpers for the rest; the README indicates the skill’s intended end state is a fully assembled video.

6. **Prompting and model-specific logic**
   `banana_prompt_template.py` suggests the workflow skill uses a templated prompt layer for an external AI/image-generation backend. This file likely separates prompt construction from execution so the workflow can adapt to a specific generator without changing the orchestration scripts.

7. **Reference docs as architecture support**
   `skills/whiteboard-video-workflow/references/` contains:
   - `storyboard-parser.md`
   - `image-generator.md`
   These act as design/reference boundaries for how subtitles are parsed and how generated imagery should be requested, which keeps the scripts thin and the workflow behavior explainable.

8. **Environment and external dependencies**
   The presence of `.env.example` and `check_env.py` shows that the workflow depends on external configuration, likely API keys, endpoints, or model parameters. `setup_env.py` plays the same role for the animation skill. This repository therefore has a clear boundary between **local orchestration code** and **external AI/service dependencies**.

9. **Artifacts and local resources**
   The repo includes `assets/` only under `whiteboard-animation`, implying that skill may rely on bundled local examples, templates, or media inputs. The workflow skill is more reference-driven and configuration-driven, with fewer bundled assets.

10. **What the architecture diagram should emphasize**
   A good diagram would show:
   - the repo as two skill modules under `skills/`
   - each skill’s `SKILL.md` as the instruction/interface layer
   - Python scripts as execution/orchestration
   - reference docs and env files as support/configuration layers
   - external AI/image-generation services as off-repo dependencies
   - generated media/video outputs as the terminal artifacts of each pipeline

Main entry points: [`skills/whiteboard-video-workflow/scripts`](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-video-workflow/scripts) (Scripts), [`skills/whiteboard-animation/scripts`](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-animation/scripts) (Scripts), [`skills/whiteboard-video-workflow/scripts/generate-image.py`](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-image.py) (Image gen), [`skills/whiteboard-video-workflow/scripts/generate-storyboard.py`](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-storyboard.py) (Storyboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root["Repository"]
  node_readme["README<br/>docs<br/>[README.md]"]
end

subgraph group_animation["Whiteboard animation"]
  node_anim_skill["Skill contract<br/>[SKILL.md]"]
  node_anim_scripts["Scripts<br/>orchestration"]
  node_anim_setup["Env setup<br/>[setup_env.py]"]
  node_anim_generate["Generate board<br/>generator"]
  node_anim_batch["Batch generate<br/>batch job<br/>[batch_generate.py]"]
  node_anim_assets["Assets<br/>media"]
end

subgraph group_workflow["Whiteboard video workflow"]
  node_wf_skill["Skill contract<br/>[SKILL.md]"]
  node_wf_env["Env example<br/>config<br/>[.env.example]"]
  node_wf_scripts["Scripts<br/>orchestration"]
  node_wf_check["Check env<br/>validation<br/>[check_env.py]"]
  node_wf_storyboard["Storyboard<br/>parser"]
  node_wf_image["Image gen<br/>generator<br/>[generate-image.py]"]
  node_wf_helper["Workflow helper<br/>orchestration<br/>[workflow_helper.py]"]
  node_wf_prompt["Prompt template<br/>prompting"]
  node_wf_refs["References<br/>docs"]
  node_wf_output(("Video output<br/>artifact"))
  node_external_ai{{"External AI"}}
end

node_readme -->|"documents"| node_anim_skill
node_readme -->|"documents"| node_wf_skill
node_anim_skill -->|"uses"| node_anim_scripts
node_anim_scripts -->|"includes"| node_anim_setup
node_anim_scripts -->|"includes"| node_anim_generate
node_anim_scripts -->|"includes"| node_anim_batch
node_anim_scripts -->|"reads"| node_anim_assets
node_anim_generate -->|"produces"| node_wf_output
node_anim_batch -->|"produces"| node_wf_output
node_wf_skill -->|"configured by"| node_wf_env
node_wf_skill -->|"uses"| node_wf_scripts
node_wf_scripts -->|"includes"| node_wf_check
node_wf_scripts -->|"includes"| node_wf_storyboard
node_wf_scripts -->|"includes"| node_wf_image
node_wf_scripts -->|"includes"| node_wf_helper
node_wf_scripts -->|"includes"| node_wf_prompt
node_wf_scripts -->|"supported by"| node_wf_refs
node_wf_check -->|"validates"| node_wf_env
node_wf_storyboard -->|"coordinates with"| node_wf_helper
node_wf_storyboard -->|"feeds"| node_wf_output
node_wf_image -->|"builds"| node_wf_prompt
node_wf_image -->|"calls"| node_external_ai
node_wf_image -->|"produces"| node_wf_output
node_wf_refs -->|"describes"| node_wf_storyboard
node_wf_refs -->|"describes"| node_wf_image
node_external_ai -->|"contributes"| node_wf_output

click node_readme "https://github.com/yangagent/whiteboard-animation-skill/blob/main/README.md"
click node_anim_skill "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/SKILL.md"
click node_anim_scripts "https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-animation/scripts"
click node_anim_setup "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/setup_env.py"
click node_anim_generate "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/generate_whiteboard.py"
click node_anim_batch "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/batch_generate.py"
click node_anim_assets "https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-animation/assets"
click node_wf_skill "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/SKILL.md"
click node_wf_env "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/.env.example"
click node_wf_scripts "https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-video-workflow/scripts"
click node_wf_check "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/check_env.py"
click node_wf_storyboard "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-storyboard.py"
click node_wf_image "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-image.py"
click node_wf_helper "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/workflow_helper.py"
click node_wf_prompt "https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/banana_prompt_template.py"
click node_wf_refs "https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-video-workflow/references"

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_readme toneBlue
class node_anim_skill,node_anim_scripts,node_anim_setup,node_anim_generate,node_anim_batch,node_anim_assets toneAmber
class node_wf_skill,node_wf_env,node_wf_scripts,node_wf_check,node_wf_storyboard,node_wf_image,node_wf_helper,node_wf_prompt,node_wf_refs,node_wf_output,node_external_ai toneMint
```

## Components

### Repository

Top-level docs and two reusable skills under skills/

- [README](https://github.com/yangagent/whiteboard-animation-skill/blob/main/README.md): docs · Repo overview and skill entrypoint · `README.md`

### Whiteboard animation

Standalone image-to-animation skill

- [Skill contract](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/SKILL.md): contract · Agent-facing instructions for the animation skill · `skills/whiteboard-animation/SKILL.md`
- [Scripts](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-animation/scripts): orchestration · Local setup and batch/single-job generation entrypoints · `skills/whiteboard-animation/scripts`
- [Env setup](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/setup_env.py): setup · Prepare local runtime for animation generation · `skills/whiteboard-animation/scripts/setup_env.py`
- [Generate board](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/generate_whiteboard.py): generator · Create a whiteboard-style animation from prepared images · `skills/whiteboard-animation/scripts/generate_whiteboard.py`
- [Batch generate](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-animation/scripts/batch_generate.py): batch job · Process multiple images or bulk jobs · `skills/whiteboard-animation/scripts/batch_generate.py`
- [Assets](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-animation/assets): media · Bundled examples or supporting media for the animation skill · `skills/whiteboard-animation/assets`

### Whiteboard video workflow

End-to-end subtitle-to-video orchestration skill

- [Skill contract](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/SKILL.md): contract · Agent-facing instructions for the workflow skill · `skills/whiteboard-video-workflow/SKILL.md`
- [Env example](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/.env.example): config · Template for required workflow configuration · `skills/whiteboard-video-workflow/.env.example`
- [Scripts](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-video-workflow/scripts): orchestration · Pipeline entrypoints and shared helpers · `skills/whiteboard-video-workflow/scripts`
- [Check env](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/check_env.py): validation · Verify required configuration before running the workflow · `skills/whiteboard-video-workflow/scripts/check_env.py`
- [Storyboard](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-storyboard.py): parser · Transform SRT subtitles into a structured storyboard · `skills/whiteboard-video-workflow/scripts/generate-storyboard.py`
- [Image gen](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/generate-image.py): generator · Create scene images from storyboard content · `skills/whiteboard-video-workflow/scripts/generate-image.py`
- [Workflow helper](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/workflow_helper.py): orchestration · Shared coordination logic for the pipeline stages · `skills/whiteboard-video-workflow/scripts/workflow_helper.py`
- [Prompt template](https://github.com/yangagent/whiteboard-animation-skill/blob/main/skills/whiteboard-video-workflow/scripts/banana_prompt_template.py): prompting · Model-specific prompt construction for image generation · `skills/whiteboard-video-workflow/scripts/banana_prompt_template.py`
- [References](https://github.com/yangagent/whiteboard-animation-skill/tree/main/skills/whiteboard-video-workflow/references): docs · Design notes for parsing and image generation behavior · `skills/whiteboard-video-workflow/references`
- **Video output**: artifact · Final assembled video and intermediate media artifacts
- **External AI**: service · Off-repo model or image-generation backend

## Connections

- README → Skill contract: documents · README introduces the animation skill
- README → Skill contract: documents · README introduces the workflow skill
- Skill contract → Scripts: uses · Skill contract is executed through scripts
- Scripts → Env setup: includes · Environment bootstrap entrypoint
- Scripts → Generate board: includes · Single-job generation entrypoint
- Scripts → Batch generate: includes · Bulk generation entrypoint
- Scripts → Assets: reads · Scripts may use bundled media or examples
- Generate board → Video output: produces · Creates whiteboard-style animation output
- Batch generate → Video output: produces · Creates multiple animation outputs
- Skill contract → Env example: configured by · Workflow relies on external configuration
- Skill contract → Scripts: uses · Skill contract is executed through pipeline scripts
- Scripts → Check env: includes · Validates environment before execution
- Scripts → Storyboard: includes · Subtitle-to-storyboard stage
- Scripts → Image gen: includes · Storyboard-to-image stage
- Scripts → Workflow helper: includes · Shared orchestration logic
- Scripts → Prompt template: includes · Prompt construction for the image backend
- Scripts → References: supported by · Reference docs define expected behavior
- Check env → Env example: validates · Checks required environment settings
- Storyboard → Workflow helper: coordinates with · Uses shared workflow orchestration
- Storyboard → Video output: feeds · Storyboard becomes downstream video assets
- Image gen → Prompt template: builds · Uses templated prompt construction
- Image gen → External AI: calls · Sends image generation requests to off-repo service
- Image gen → Video output: produces · Creates scene images used in final assembly
- References → Storyboard: describes · Storyboard parser behavior reference
- References → Image gen: describes · Image generation behavior reference
- External AI → Video output: contributes · External generation results are assembled into final media
