# gavinzbf/video_6_codex_fx architecture

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

- Interactive diagram: https://gitdiagram.com/gavinzbf/video_6_codex_fx
- Repository: https://github.com/gavinzbf/video_6_codex_fx

## Overview

This repository is a Claude Code skill for recreating a product video from a reference video and product image. Its documented workflow analyzes and segments the reference, prepares visual and prompt materials, archives them for review in Lark, then generates and returns the video. The README documents these stages and integrations; source excerpts were not provided, so the graph does not assert implementation-level calls beyond that documented flow.

Main entry points: [`.agents/skills/product-video-replication/scripts/run_video_breakdown.py`](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/run_video_breakdown.py) (Video analysis), [`.agents/skills/product-video-replication/scripts/segment_router.py`](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/segment_router.py) (Segment routing), [`.agents/skills/product-video-replication/prompts/hot-video-replication/storyboard-grid-v1.md`](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/storyboard-grid-v1.md) (Storyboard grid), [`.agents/skills/product-video-replication/SKILL.md`](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/SKILL.md) (Claude skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow control"]
  node_skill["Claude skill<br/>[SKILL.md]"]
  node_analysis["Video analysis"]
  node_segmentation["Segment routing<br/>[segment_router.py]"]
end

subgraph group_creative["Video preparation"]
  node_anchors["Scene anchors<br/>[scene-anchor-v1.md]"]
  node_storyboard["Storyboard grid"]
  node_imagegen["Image generation"]
  node_seedance["Seedance prompts"]
end

subgraph group_archive["Review and archive"]
  node_larkarchive["Lark archive"]
  node_approval["User approval<br/>[workflow-gates.md]"]
  node_tables[("Lark tables")]
  node_delivery["Lark video writeback"]
end

subgraph group_providers["External generation"]
  node_dreamina["Dreamina generation"]
  node_yunwu["Yunwu AI"]
  node_kie["Kie fallback"]
end

node_user(("User"))
node_reference["Reference video"]
node_product["Product image"]

node_user -->|"requests replication"| node_skill
node_reference -->|"input video"| node_analysis
node_product -->|"provides product image"| node_skill
node_skill -->|"starts analysis"| node_analysis
node_analysis -->|"routes segments"| node_segmentation
node_segmentation -->|"multi-part only"| node_anchors
node_segmentation -->|"prepares visuals"| node_storyboard
node_storyboard -->|"generates grid"| node_imagegen
node_imagegen -->|"calls image API"| node_yunwu
node_analysis -->|"uses Gemini"| node_yunwu
node_analysis -.->|"fallback analysis"| node_kie
node_storyboard -->|"informs prompts"| node_seedance
node_seedance -->|"archives package"| node_larkarchive
node_analysis -->|"archives breakdown"| node_larkarchive
node_larkarchive -->|"writes records"| node_tables
node_user -->|"reviews archive"| node_approval
node_approval -->|"permits generation"| node_dreamina
node_dreamina -->|"returns video"| node_delivery
node_delivery -->|"writes video"| node_tables

click node_skill "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/SKILL.md"
click node_analysis "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/run_video_breakdown.py"
click node_segmentation "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/segment_router.py"
click node_anchors "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/scene-anchor-v1.md"
click node_storyboard "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/storyboard-grid-v1.md"
click node_imagegen "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/yunwu_image_generate.py"
click node_seedance "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/adapted-replication-plan-v1.md"
click node_larkarchive "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/push_replication_to_lark.py"
click node_approval "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/references/workflow-gates.md"
click node_dreamina "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/dreamina_generate.py"
click node_delivery "https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/lark_upload_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_skill,node_analysis,node_segmentation,node_user toneBlue
class node_anchors,node_storyboard,node_imagegen,node_seedance toneAmber
class node_larkarchive,node_approval,node_tables,node_delivery toneMint
class node_dreamina,node_yunwu,node_kie toneRose
class node_reference,node_product toneIndigo
```

## Components

### Workflow control

- [Claude skill](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/SKILL.md): `.agents/skills/product-video-replication/SKILL.md`
- [Video analysis](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/run_video_breakdown.py): `.agents/skills/product-video-replication/scripts/run_video_breakdown.py`
- [Segment routing](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/segment_router.py): `.agents/skills/product-video-replication/scripts/segment_router.py`

### Video preparation

- [Scene anchors](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/scene-anchor-v1.md): `.agents/skills/product-video-replication/prompts/hot-video-replication/scene-anchor-v1.md`
- [Storyboard grid](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/storyboard-grid-v1.md): `.agents/skills/product-video-replication/prompts/hot-video-replication/storyboard-grid-v1.md`
- [Image generation](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/yunwu_image_generate.py): `.agents/skills/product-video-replication/scripts/yunwu_image_generate.py`
- [Seedance prompts](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/prompts/hot-video-replication/adapted-replication-plan-v1.md): `.agents/skills/product-video-replication/prompts/hot-video-replication/adapted-replication-plan-v1.md`

### Review and archive

- [Lark archive](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/push_replication_to_lark.py): `.agents/skills/product-video-replication/scripts/push_replication_to_lark.py`
- [User approval](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/references/workflow-gates.md): `.agents/skills/product-video-replication/references/workflow-gates.md`
- **Lark tables**
- [Lark video writeback](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/lark_upload_video.py): `.agents/skills/product-video-replication/scripts/lark_upload_video.py`

### External generation

- [Dreamina generation](https://github.com/gavinzbf/video_6_codex_fx/blob/main/.agents/skills/product-video-replication/scripts/dreamina_generate.py): `.agents/skills/product-video-replication/scripts/dreamina_generate.py`
- **Yunwu AI**
- **Kie fallback**

### Other components

- **User**
- **Reference video**
- **Product image**

## Connections

- User → Claude skill: requests replication (evidence: `README.md`)
- Reference video → Video analysis: input video (evidence: `README.md`)
- Product image → Claude skill: provides product image (evidence: `README.md`)
- Claude skill → Video analysis: starts analysis (evidence: `README.md`)
- Video analysis → Segment routing: routes segments (evidence: `README.md`)
- Segment routing → Scene anchors: multi-part only (evidence: `README.md`)
- Segment routing → Storyboard grid: prepares visuals (evidence: `README.md`)
- Storyboard grid → Image generation: generates grid (evidence: `README.md`)
- Image generation → Yunwu AI: calls image API (evidence: `README.md`)
- Video analysis → Yunwu AI: uses Gemini (evidence: `README.md`)
- Video analysis → Kie fallback: fallback analysis (evidence: `README.md`)
- Storyboard grid → Seedance prompts: informs prompts (evidence: `README.md`)
- Seedance prompts → Lark archive: archives package (evidence: `README.md`)
- Video analysis → Lark archive: archives breakdown (evidence: `README.md`)
- Lark archive → Lark tables: writes records (evidence: `README.md`)
- User → User approval: reviews archive (evidence: `README.md`)
- User approval → Dreamina generation: permits generation (evidence: `README.md`)
- Dreamina generation → Lark video writeback: returns video (evidence: `README.md`)
- Lark video writeback → Lark tables: writes video (evidence: `README.md`)
