react-video
Generate professional knowledge videos or custom React videos using Playwright and ffmpeg
Install
npx skills add https://github.com/AIPMAndy/Andy-Video-Skill/tree/main/03-code-to-video/react-video
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install aipmandy-andy-video-skill@llmmart
git clone https://github.com/AIPMAndy/Andy-Video-Skill.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole aipmandy/andy-video-skill collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
React Video Renderer Skill
This skill helps you generate MP4 videos from React code. It supports two modes:
- Knowledge Video Generator - Create professional educational videos from structured config (Apple-style design)
- Custom React Code - Render any React component as video
Usage
/react-video [options]
Options
--width <number>- Output video width (default: 2400)--height <number>- Output video height (default: 3200)--duration <seconds>- Video duration in seconds (auto-detected if not specified)--output <path>- Output file path (default: ./output/video/react-video.mp4)--audio <path>- Optional audio file to merge with video--code <file>- React component file to render (default: App.jsx)--config <file>- Knowledge video config file (JSON)--template <name>- Use built-in template: "knowledge" (default: custom)
Mode 1: Knowledge Video Generator (NEW!)
Create professional educational videos with Apple-style design. Perfect for:
- Tech project introductions
- Tutorial videos
- Product demos
- Course content
Quick Start
/react-video --template knowledge --config my-config.json
Config Structure
{
"themeColor": "indigo",
"project": {
"name": "Project Name",
"stars": "162k+",
"courseNumber": "第 340 课",
"category": "AI 基础设施"
},
"steps": [
{
"type": "cover",
"title": "Main Title",
"subtitle": "Subtitle",
"script": "Narration text..."
},
{
"type": "pain_point",
"title": "Problem Statement",
"visualizer": { ... }
},
{
"type": "feature",
"title": "Solution",
"visualizer": { ... }
},
{
"type": "golden_sentence",
"quote": "Inspirational quote"
},
{
"type": "summary",
"points": [ ... ]
}
]
}
Step Types
- cover - Opening slide with project info
- pain_point - Highlight problems/challenges
- feature - Showcase solutions/features
- golden_sentence - Philosophical insight
- summary - Recap key points
Examples
See knowledge-video-config.example.json and knowledge-video-config-firecrawl.example.json for complete examples.
Mode 2: Custom React Code
Render any React component as video (original functionality).
/react-video --code MyComponent.jsx --width 1920 --height 1080
How it works
- Creates a temporary Vite project with your React code
- Starts a dev server
- Uses Playwright to record the browser rendering
- Transcodes the recording to MP4 with ffmpeg
- Optionally merges audio track
Requirements
- Node.js and npm
- ffmpeg installed on system
- Playwright will be installed automatically
Interactive Mode
Just run /react-video and the skill will guide you through:
- Choosing between knowledge video or custom code
- Providing necessary configuration
- Generating the video
Files (andy-video-skill)
-
scripts
-
build_timed_audio.py 13.6 KB
Loading… -
generate_edge_voiceover.py 4.6 KB
Loading… -
render_knowledge_video.py 13.8 KB
Loading…
-
-
template
-
scripts
-
create-config.mjs 6 KB · in bundle
-
render-video.mjs 5.3 KB · in bundle
-
-
src
-
index.css 407 B · in bundle
-
knowledge-video-generator-clean.jsx 12.7 KB · in bundle
-
knowledge-video-generator.jsx 25.9 KB · in bundle
-
knowledge-video-generator.jsx.backup 25.9 KB · in bundle
-
main.jsx 229 B · in bundle
-
social-video-layout.jsx 3.1 KB · in bundle
-
video-runtime.js 482 B
Loading…
-
-
index.html 307 B · in bundle
-
knowledge-video-config-firecrawl.example.json 5.5 KB
Loading… -
knowledge-video-config.example.json 5.4 KB
Loading… -
package-lock.json 66.7 KB
Loading… -
package.json 536 B
Loading… -
postcss.config.js 80 B
Loading… -
tailwind.config.js 138 B
Loading… -
vite.config.js 133 B
Loading…
-
-
KNOWLEDGE_VIDEO_GUIDE.md 6.1 KB
Loading… -
OPTIMIZATION_SUMMARY.md 7.3 KB
Loading… -
prompt.md 3.6 KB
Loading… -
README_KNOWLEDGE_VIDEO.md 4.2 KB
Loading… -
skill.md 3.1 KB
--- name: react-video description: Generate professional knowledge videos or custom React videos using Playwright and ffmpeg trigger: When user wants to create educational videos, tech tutorials, or render React components as video --- # React Video Renderer Skill This skill helps you generate MP4 videos from React code. It supports two modes: 1. **Knowledge Video Generator** - Create professional educational videos from structured config (Apple-style design) 2. **Custom React Code** - Render any React component as video ## Usage ``` /react-video [options] ``` ## Options - `--width <number>` - Output video width (default: 2400) - `--height <number>` - Output video height (default: 3200) - `--duration <seconds>` - Video duration in seconds (auto-detected if not specified) - `--output <path>` - Output file path (default: ./output/video/react-video.mp4) - `--audio <path>` - Optional audio file to merge with video - `--code <file>` - React component file to render (default: App.jsx) - `--config <file>` - Knowledge video config file (JSON) - `--template <name>` - Use built-in template: "knowledge" (default: custom) ## Mode 1: Knowledge Video Generator (NEW!) Create professional educational videos with Apple-style design. Perfect for: - Tech project introductions - Tutorial videos - Product demos - Course content ### Quick Start ```bash /react-video --template knowledge --config my-config.json ``` ### Config Structure ```json { "themeColor": "indigo", "project": { "name": "Project Name", "stars": "162k+", "courseNumber": "第 340 课", "category": "AI 基础设施" }, "steps": [ { "type": "cover", "title": "Main Title", "subtitle": "Subtitle", "script": "Narration text..." }, { "type": "pain_point", "title": "Problem Statement", "visualizer": { ... } }, { "type": "feature", "title": "Solution", "visualizer": { ... } }, { "type": "golden_sentence", "quote": "Inspirational quote" }, { "type": "summary", "points": [ ... ] } ] } ``` ### Step Types - **cover** - Opening slide with project info - **pain_point** - Highlight problems/challenges - **feature** - Showcase solutions/features - **golden_sentence** - Philosophical insight - **summary** - Recap key points ### Examples See `knowledge-video-config.example.json` and `knowledge-video-config-firecrawl.example.json` for complete examples. ## Mode 2: Custom React Code Render any React component as video (original functionality). ```bash /react-video --code MyComponent.jsx --width 1920 --height 1080 ``` ## How it works 1. Creates a temporary Vite project with your React code 2. Starts a dev server 3. Uses Playwright to record the browser rendering 4. Transcodes the recording to MP4 with ffmpeg 5. Optionally merges audio track ## Requirements - Node.js and npm - ffmpeg installed on system - Playwright will be installed automatically ## Interactive Mode Just run `/react-video` and the skill will guide you through: 1. Choosing between knowledge video or custom code 2. Providing necessary configuration 3. Generating the video
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.