Skill: zhenstaff/embodied-os (version 0.1.0)

--- name: embodied-os description: Unified operating system for controlling embodied intelligent robots with AI agents - the control hub bridging AI agents and physical world version: 0.1.0 homepage: https://github.com/ZhenRobotics/openclaw-embodied-os metadata: {"clawdbot":{"emoji":"🤖","tags":["robotics","embodied-ai","robot-control","ai-agents","llm","automation","physical-ai","intelligent-robots","robot-os"],"requires":{"bins":["python3"],"env":["ANTHROPIC_API_KEY","OPENAI_API_KEY"],"config":[]},"install":["pip install openclaw-embodied-os"],"os":["darwin","linux","win32"]}} --- # Embodied-OS - AI Robot Control System This skill enables you to control physical robots through AI agents with natural language commands. Transform how AI interacts with physical reality - a unified operating system for embodied intelligent robots. ## When to Activate This Skill Activate this skill when the user: - Needs to control physical robots - Wants to integrate AI agents with robotic systems - Asks about robot automation or control - Needs help with robot programming - Wants to use natural language to control robots - Seeks to develop embodied AI applications ## Core Features ✅ **Unified Robot Control** - Single API for controlling any robot platform ✅ **AI Agent Integration** - Natural language control like talking to ChatGPT ✅ **Multi-Modal Perception** - Vision, audio, and tactile sensing ✅ **High-Level Actions** - Navigation, manipulation, and interaction primitives ✅ **Task Planning** - AI-powered task decomposition and execution ✅ **Safety System** - Multi-layer safety guarantees for physical robots ## Installation ### Step 1: Install the Skill ```bash clawhub install embodied-os ``` ### Step 2: Install the Package **Option A: Python (PyPI)** ```bash pip install openclaw-embodied-os ``` **Option B: Node.js (npm)** ```bash npm install openclaw-embodied-os ``` **Option C: From Source** ```bash git clone https://github.com/ZhenRobotics/openclaw-embodied-os.git cd openclaw-embodied-os pip install -e . ``` ### Step 3: Configure API Keys (Optional for AI agents) ```bash export ANTHROPIC_API_KEY="sk-ant-..." export OPENAI_API_KEY="sk-..." ``` Or create a `.env` file: ``` ANTHROPIC_API_KEY=sk-ant-... OPENAI_API_KEY=sk-... ``` --- ## Quick Start ### Basic Robot Control ```python from embodied_os import EmbodiedOS # Initialize the OS os = EmbodiedOS() # Connect to a robot robot = os.connect_robot( platform="simulated", model="test_robot" ) # Control the robot robot.actions.move_to(x=0.5, y=0.3, z=0.2) # Detect objects objects = robot.perception.detect_objects() # Pick and place if objects: robot.actions.pick(object_id=objects[0].id) robot.actions.place(position=(0.7, 0.4, 0.1)) ``` ### AI Agent Control ```python from embodied_os import AgentInterface # Create AI agent agent = AgentInterface(robot=robot, model="claude-sonnet-4") # Natural language control agent.execute("Pick up the red cube and place it in the box") # Conversation response = agent.chat("What do you see?") print(response) ``` --- ## Supported Robot Platforms ### Current Support - **Universal Robots** (UR3e, UR5e, UR10e) - **Franka Emika** Panda - **Boston Dynamics** Spot - **Simulated Robots** (for testing) ### Coming Soon - ABB robots - KUKA robots - Custom robots via plugin system --- ## Use Cases ### 1. Warehouse Automation ```python warehouse_robot = os.connect_robot(platform="mobile_manipulator") agent.execute(""" Go to aisle 5, shelf B. Pick up all items marked with red tags. Transport them to the packing station. Report the quantity and item IDs. """) ``` ### 2. Elderly Care Assistant ```python care_robot = os.connect_robot(platform="service_robot") agent.monitor_and_assist(""" Watch for the person calling for help. If they ask for water, bring them a glass. If they drop something, pick it up. """) ``` ### 3. Research Lab Assistant ```python lab_robot = os.connect_robot(platform="dual_arm_robot") agent.execute(""" Set up the chemistry experiment: 1. Measure 50ml of solution A 2. Heat to 60 degrees 3. Add catalyst 4. Stir for 2 minutes """) ``` --- ## Core Capabilities ### 1. Unified Robot Control Interface - Single API for controlling any robot - Works across different platforms and manufacturers - Plug-and-play integration ### 2. AI Agent Natural Language Control - Control robots like talking to ChatGPT - Supports Claude, GPT, and custom agents - Context-aware task execution ### 3. Multi-Modal Perception - **Vision**: Camera, object detection, depth sensing - **Audio**: Sound capture, speech recognition - **Tactile**: Force sensors, contact detection ### 4. High-Level Action Primitives ```python # Navigation robot.actions.navigate_to(x=2.0, y=1.5, theta=0) # Manipulation robot.actions.pick(object="cup") robot.actions.place(location="table") # Interaction robot.actions.press_button(target="elevator") robot.actions.open_door(handle_position=[1.0, 0.5, 1.0]) ``` ### 5. AI-Powered Task Planning ```python # High-level task task = "Prepare coffee for the user" # Automatic decomposition and execution plan = robot.planner.create_plan(task) robot.planner.execute(plan, monitor=True) ``` ### 6. Multi-Layer Safety System ```python # Define safety constraints robot.safety.set_workspace_bounds( x_min=0, x_max=2.0, y_min=-1.0, y_max=1.0, z_min=0, z_max=1.5 ) # Force limits robot.safety.set_max_force(50.0) # Collision avoidance robot.safety.enable_collision_avoidance() ``` --- ## Architecture ``` ┌─────────────────────────────────────────────────┐ │ AI Agent Layer │ │ (Claude, GPT, Custom Agents) │ └────────────────┬────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────┐ │ Embodied-OS Core │ │ ┌─────────┐ ┌─────────┐ ┌────────────┐ │ │ │ Natural │ │ Task │ │ Safety │ │ │ │Language │ │ Planner │ │ Validator │ │ │ └─────────┘ └─────────┘ └────────────┘ │ │ ┌─────────┐ ┌─────────┐ ┌────────────┐ │ │ │Perception│ │ Action │ │ State │ │ │ │ Module │ │Executor │ │ Manager │ │ │ └─────────┘ └─────────┘ └────────────┘ │ └────────────────┬────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────┐ │ Robot Abstraction Layer (RAL) │ │ Unified interface for all robot types │ └────────────────┬────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────┐ │ Physical Robots │ │ Manipulators | Mobile | Humanoids | Drones │ └─────────────────────────────────────────────────┘ ``` --- ## Configuration Create a `config.yaml` file: ```yaml robot: platform: universal_robot model: UR5e endpoint: 192.168.1.100 perception: cameras: - name: head_camera type: realsense_d435 resolution: [1280, 720] fps: 30 safety: workspace: x: [0, 2.0] y: [-1.0, 1.0] z: [0, 1.5] max_velocity: 0.5 # m/s max_force: 50 # N agent: model: claude-sonnet-4 [REDACTED_SECRET] ``` --- ## API Reference ### Core Classes #### `EmbodiedOS` Main interface to the system. ```python os = EmbodiedOS(config_path="config.yaml") robot = os.connect_robot(platform, model, endpoint) os.disconnect_all() ``` #### `Robot` Represents a connected robot. ```python robot.actions.move_to(x, y, z) robot.perception.get_image() robot.state.get_joint_positions() robot.safety.emergency_stop() ``` #### `AgentInterface` AI agent control interface. ```python agent = AgentInterface(model="claude-4", robot=robot) agent.execute(task_description) agent.chat(message) ``` --- ## Requirements - **Python**: 3.9 or higher - **Dependencies**: numpy>=1.20.0, pyyaml>=6.0 - **Optional**: ROS2 (for ROS integration) - **Optional**: CUDA (for vision processing) - **Optional**: Anthropic API key (for Claude agent) - **Optional**: OpenAI API key (for GPT agent) --- ## Examples See the `examples/` directory: - `basic_control.py` - Basic robot control - `agent_control.py` - AI agent interaction Run examples: ```bash python examples/basic_control.py python examples/agent_control.py ``` --- ## Documentation - **GitHub**: https://github.com/ZhenRobotics/openclaw-embodied-os - **npm**: https://www.npmjs.com/package/openclaw-embodied-os - **PyPI**: https://pypi.org/project/openclaw-embodied-os/ - **README**: Complete documentation and guides - **QUICKSTART**: 5-minute quick start guide --- ## Roadmap ### Phase 1: Core Platform (Current) - [x] Robot abstraction layer - [x] Basic perception system - [x] Action executor - [x] Safety system - [x] Agent interface ### Phase 2: Advanced Features (Q2 2026) - [ ] Multi-robot coordination - [ ] Advanced vision processing - [ ] Learning from demonstration - [ ] Cloud deployment ### Phase 3: Ecosystem (Q3 2026) - [ ] Skill marketplace - [ ] Community plugins - [ ] Simulation environments - [ ] Mobile app control --- ## License MIT License - see LICENSE file for details. --- ## Changelog ### v0.1.0 (2026-03-08) - Initial release - Unified robot control interface across platforms - AI Agent natural language control - Multi-modal perception (vision, audio, tactile) - High-level action primitives - AI-powered task planning - Multi-layer safety system - Support for Universal Robots, Franka Panda, Boston Dynamics Spot - Simulated robot support for testing --- ## Links - **GitHub**: https://github.com/ZhenRobotics/openclaw-embodied-os - **npm**: https://www.npmjs.com/package/openclaw-embodied-os - **PyPI**: https://pypi.org/project/openclaw-embodied-os/ - **Release**: https://github.com/ZhenRobotics/openclaw-embodied-os/releases/tag/v0.1.0 --- **Embodied-OS - Making robots as easy to control as talking to a friend.**

path: SKILL-EN-OLD-VIDEO.md
content: ---
name: video-generator
description: Automated video generation pipeline with OpenAI TTS, Whisper, and Remotion - from text script to professional short videos
tags: [video-generation, remotion, openai, tts, whisper, automation, ai-video, short-video, text-to-video]
---

# 🎬 Video Generator Skill

Automated video generation system that transforms text scripts into professional short videos with AI-powered voiceover, precise timing, and stunning cyber-wireframe visuals.

## 📦 Installation

### Step 1: Install the Skill

```bash
clawhub install video-generator
```

### Step 2: Clone & Setup the Project

**Option A: From GitHub (Recommended)**

```bash
# Clone to standard location
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video

# Install dependencies
npm install

# Set API key
export OPENAI_API_KEY="sk-your-key-here"
```

**Option B: Via npm (Coming Soon)**

```bash
npm install -g openclaw-video
```

### Step 3: Verify Installation

```bash
cd ~/openclaw-video
./agents/video-cli.sh help
```

---

## 🚀 Usage

### When to Use This Skill

**AUTO-TRIGGER** when user's message contains:

- Keywords: `video`, `generate video`, `create video`, `make video`, `生成视频`, `做视频`
- Provides text that looks like a video script (multiple sentences describing a story/concept)
- Asks about video generation, TTS, or Remotion
- Wants to convert text to video format

**TRIGGER EXAMPLES** (always use this skill for these):
- "AI makes development easier. GPT writes code, Whisper transcribes audio, Remotion generates videos." ← This is a VIDEO SCRIPT
- "Generate a video: [any script]"
- "Make a video about AI tools"
- "Create a short video with this content..."

**DO NOT USE** when:
- Only video playback or format conversion (use video-frames skill)
- Video editing or clipping (use other tools)

---

## 🎯 Core Features

Complete video generation pipeline:

- 🎤 **TTS Generation** - OpenAI TTS API with multiple voice options
- ⏱️ **Timestamp Extraction** - OpenAI Whisper API for precise segmentation
- 🎬 **Scene Orchestration** - Intelligent detection of 6 scene types
- 🎨 **Video Rendering** - Remotion with cyber-wireframe aesthetics
- 🤖 **Agent Interface** - Natural language interaction

---

## 💻 Agent Usage Guide

### Important Notes

**CRITICAL**: Use the existing project directory. Do NOT create new projects or run `npx remotion`.

Project location:
- Standard install: `~/openclaw-video/`
- Or detect: Ask user for project location on first use

### Primary Command: Generate Video

When user requests video generation, execute:

```bash
# Method 1: Convenience script (Recommended)
~/openclaw-video/generate-for-openclaw.sh "user's script content"

# Method 2: CLI
cd ~/openclaw-video && ./agents/video-cli.sh generate "script content"

# Method 3: Full Agent (for complex requests)
cd ~/openclaw-video && pnpm exec tsx agents/video-agent.ts "generate video: script content"
```

**Example**:

User says: "Generate video: AI makes development easier"

Execute:
```bash
~/openclaw-video/generate-for-openclaw.sh "AI makes development easier"
```

### Other Operations

**Optimize script**:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "script content"
```

**Get help**:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh help
```

### Output Location

Generated video saved at: `~/openclaw-video/out/generated.mp4`

---

## ⚙️ Configuration Options

### Voice Selection
- `alloy` - Neutral
- `echo` - Clear
- `nova` - Warm (Recommended)
- `shimmer` - Soft

### Speed
- Range: 0.25 - 4.0
- Recommended: 1.15 (fast-paced short videos)
- Default: 1.0

### Video Style
- Fast-paced short video (default)
- Tutorial/explanation
- Product marketing
- Storytelling

---

## 📊 Video Specifications

- **Resolution**: 1080 x 1920 (Portrait, optimized for TikTok/YouTube Shorts)
- **Frame Rate**: 30 fps
- **Format**: MP4 (H.264 + AAC)
- **Style**: Cyber-wireframe with neon colors
- **Duration**: Auto-calculated based on script length

---

## 🎨 Scene Types

System automatically detects and generates 6 scene types:

| Type | Effect | Trigger Condition |
|------|--------|-------------------|
| **title** | Glitch effect + spring scale | First segment |
| **emphasis** | Pop-up zoom | Contains percentages, numbers |
| **pain** | Shake + red warning | Contains problems, pain points |
| **content** | Smooth fade-in | Regular content |
| **circle** | Rotating ring highlight | Listed points |
| **end** | Slide-up fade-out | Last segment |

---

## 💰 Cost Estimation

Per 15-second video: **~$0.003** (less than 1 cent):

- OpenAI TTS: ~$0.001
- OpenAI Whisper: ~$0.0015
- Remotion rendering: Free (local)

---

## 📝 Usage Examples

### Example 1: Quick Generation

User: "Generate a video: Three AI tools boost productivity. GPT writes code, Whisper transcribes audio, Remotion creates videos."

Agent executes:
```bash
~/openclaw-video/generate-for-openclaw.sh "Three AI tools boost productivity. GPT writes code, Whisper transcribes audio, Remotion creates videos."
```

Output: `~/openclaw-video/out/generated.mp4`

### Example 2: With Configuration

User: "Use warm voice and faster speed"

Agent:
1. Confirm script content
2. Execute with parameters:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh generate "script content" --voice nova --speed 1.3
```

### Example 3: Script Optimization

User: "Is this script good for a video: AI changes the world"

Agent:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "AI changes the world"
```

Agent receives analysis and informs user.

---

## 🔧 Troubleshooting

### Issue 1: Project Not Found

**Error**: `bash: ~/openclaw-video/generate-for-openclaw.sh: No such file or directory`

**Solution**:
```bash
# Check if project exists
ls ~/openclaw-video

# If not, install the project
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video && npm install
```

### Issue 2: API Key Error

**Error**: `model_not_found` or TTS access denied

**Solution**:
- Use a paid OpenAI account (minimum $5 balance)
- Verify API key has TTS + Whisper access
- Set environment variable: `export OPENAI_API_KEY="sk-..."`

### Issue 3: Missing Dependencies

**Error**: `command not found: pnpm` or `tsx`

**Solution**:
```bash
cd ~/openclaw-video
npm install
```

---

## 📚 Full Documentation

- **GitHub**: https://github.com/ZhenRobotics/openclaw-video
- **Quick Start**: `~/openclaw-video/QUICKSTART.md`
- **Agent Guide**: `~/openclaw-video/docs/AGENT.md`
- **FAQ**: `~/openclaw-video/docs/FAQ.md`
- **Full README**: `~/openclaw-video/README.md`

---

## 🌟 Features

- ✅ Fully automated video generation pipeline
- ✅ Supports Chinese and English scripts
- ✅ Low cost (< $0.01 per video)
- ✅ Local rendering, no cloud services required
- ✅ Cyberpunk visual style
- ✅ Customizable configurations
- ✅ Agent-friendly interface

---

## ⚠️ Important Notes

1. **Environment Variable**: Valid `OPENAI_API_KEY` required
2. **Project Installation**: Must clone and install project before use
3. **Network Required**: TTS and Whisper APIs need internet connection
4. **Path Assumption**: Default project location is `~/openclaw-video/`, adjust if different

---

## 🎯 Agent Behavior Guidelines

When using this skill, agents should:

**DO**:
- ✅ Check if project is installed on first use
- ✅ Use existing project, don't create new Remotion projects
- ✅ Provide clear feedback (progress, estimated time)
- ✅ Handle errors gracefully with solutions
- ✅ Show output location after generation

**DON'T**:
- ❌ Run `npx remotion` to create new projects
- ❌ Assume project is installed without checking
- ❌ Ignore error messages
- ❌ Use hardcoded absolute paths (except `~` paths)

---

## 📊 Tech Stack

- **Remotion**: React-based video generation framework
- **OpenAI TTS**: Text-to-speech API
- **OpenAI Whisper**: Speech recognition API
- **TypeScript**: Type-safe development
- **React**: UI component framework
- **Node.js**: Runtime environment

---

## 🆕 Version History

### v1.0.1 (2026-03-03)
- ✨ Optimized installation guide with universal paths
- 📝 Improved documentation structure
- 🛠️ Added troubleshooting guide
- 🤖 Added agent behavior guidelines
- 🌍 Full English version

### v1.0.0 (2026-03-03)
- ✨ Initial release
- 🎤 TTS voice generation
- ⏱️ Whisper timestamp extraction
- 🎬 Intelligent scene orchestration
- 🎨 Cyber-wireframe visual style
- 🤖 Agent CLI interface

---

**Project Status**: ✅ Production Ready

**License**: MIT

**Author**: @ZhenStaff

**Support**: https://github.com/ZhenRobotics/openclaw-video/issues

**ClawHub**: https://clawhub.ai/ZhenStaff/video-generator


path: SKILL-OLD-VIDEO.md
content: ---
name: video-generator
description: Automated video generation pipeline with OpenAI TTS, Whisper, and Remotion - from text script to professional short videos
tags: [video-generation, remotion, openai, tts, whisper, automation, ai-video, short-video, text-to-video]
---

# 🎬 Video Generator Skill

Automated video generation system that transforms text scripts into professional short videos with AI-powered voiceover, precise timing, and stunning cyber-wireframe visuals.

## 📦 Installation

### Step 1: Install the Skill

```bash
clawhub install video-generator
```

### Step 2: Clone & Setup the Project

**Option A: Via npm (Recommended)**

```bash
# Install globally
npm install -g openclaw-video

# Clone for full features
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video
npm install

# Configure API key (create .env file)
echo 'OPENAI_API_KEY="sk-your-key-here"' > .env
```

**Option B: From GitHub Only**

```bash
# Clone to standard location
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video

# Install dependencies
npm install

# Configure API key
echo 'OPENAI_API_KEY="sk-your-key-here"' > .env
```

### Step 3: Verify Installation

```bash
cd ~/openclaw-video
./agents/video-cli.sh help
```

---

## 🚀 Usage

### When to Use This Skill

**AUTO-TRIGGER** when user's message contains:

- Keywords: `video`, `generate video`, `create video`, `make video`, `生成视频`, `做视频`
- Provides text that looks like a video script (multiple sentences describing a story/concept)
- Asks about video generation, TTS, or Remotion
- Wants to convert text to video format

**TRIGGER EXAMPLES** (always use this skill for these):
- "AI makes development easier. GPT writes code, Whisper transcribes audio, Remotion generates videos." ← This is a VIDEO SCRIPT
- "Generate a video: [any script]"
- "Make a video about AI tools"
- "Create a short video with this content..."

**DO NOT USE** when:
- Only video playback or format conversion (use video-frames skill)
- Video editing or clipping (use other tools)

---

## 🎯 Core Features

Complete video generation pipeline:

- 🎤 **TTS Generation** - OpenAI TTS API with multiple voice options
- ⏱️ **Timestamp Extraction** - OpenAI Whisper API for precise segmentation
- 🎬 **Scene Orchestration** - Intelligent detection of 6 scene types
- 🎨 **Video Rendering** - Remotion with cyber-wireframe aesthetics
- 🖼️ **Background Video** - Custom background videos with opacity control (v1.2.0+)
- 🤖 **Agent Interface** - Natural language interaction
- 🎨 **Color Customization** - Custom colors for scene titles (v1.1.0+)

---

## 💻 Agent Usage Guide

### Important Notes

**CRITICAL**: Use the existing project directory. Do NOT create new projects or run `npx remotion`.

Project location:
- Standard install: `~/openclaw-video/`
- Or detect: Ask user for project location on first use

### Primary Command: Generate Video

When user requests video generation, execute:

```bash
# Method 1: Convenience script (Recommended)
~/openclaw-video/generate-for-openclaw.sh "user's script content"

# Method 2: CLI
cd ~/openclaw-video && ./agents/video-cli.sh generate "script content"

# Method 3: Full pipeline with background video
cd ~/openclaw-video && ./scripts/script-to-video.sh scripts/script.txt \
  --voice nova --speed 1.15 \
  --bg-video /path/to/background.mp4 \
  --bg-opacity 0.4

# Method 4: Full Agent (for complex requests)
cd ~/openclaw-video && pnpm exec tsx agents/video-agent.ts "generate video: script content"
```

**Example**:

User says: "Generate video: AI makes development easier"

Execute:
```bash
~/openclaw-video/generate-for-openclaw.sh "AI makes development easier"
```

**Example with background video**:

User says: "Generate video with a tech background"

Execute:
```bash
cd ~/openclaw-video && ./scripts/script-to-video.sh scripts/script.txt \
  --bg-video public/tech-bg.mp4 --bg-opacity 0.4
```

### Other Operations

**Optimize script**:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "script content"
```

**Get help**:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh help
```

### Output Location

Generated video saved at: `~/openclaw-video/out/generated.mp4`

---

## ⚙️ Configuration Options

### Voice Selection
- `alloy` - Neutral
- `echo` - Clear
- `nova` - Warm (Recommended)
- `shimmer` - Soft

### Speed
- Range: 0.25 - 4.0
- Recommended: 1.15 (fast-paced short videos)
- Default: 1.0

### Background Video (New in v1.2.0)
- `--bg-video <path>` - Path to background video file
- `--bg-opacity <0-1>` - Background opacity (default: 0.3)
- `--bg-overlay <color>` - Overlay color for text visibility (default: rgba(10, 10, 15, 0.6))

**Recommended opacity values:**
- 0.2-0.3: Text-focused content
- 0.4-0.5: Balanced effect
- 0.6-0.8: Background-focused content

### Video Style
- Fast-paced short video (default)
- Tutorial/explanation
- Product marketing
- Storytelling

---

## 📊 Video Specifications

- **Resolution**: 1080 x 1920 (Portrait, optimized for TikTok/YouTube Shorts)
- **Frame Rate**: 30 fps
- **Format**: MP4 (H.264 + AAC)
- **Style**: Cyber-wireframe with neon colors
- **Duration**: Auto-calculated based on script length

---

## 🎨 Scene Types

System automatically detects and generates 6 scene types:

| Type | Effect | Trigger Condition |
|------|--------|-------------------|
| **title** | Glitch effect + spring scale | First segment |
| **emphasis** | Pop-up zoom | Contains percentages, numbers |
| **pain** | Shake + red warning | Contains problems, pain points |
| **content** | Smooth fade-in | Regular content |
| **circle** | Rotating ring highlight | Listed points |
| **end** | Slide-up fade-out | Last segment |

---

## 💰 Cost Estimation

Per 15-second video: **~$0.003** (less than 1 cent):

- OpenAI TTS: ~$0.001
- OpenAI Whisper: ~$0.0015
- Remotion rendering: Free (local)

---

## 📝 Usage Examples

### Example 1: Quick Generation

User: "Generate a video: Three AI tools boost productivity. GPT writes code, Whisper transcribes audio, Remotion creates videos."

Agent executes:
```bash
~/openclaw-video/generate-for-openclaw.sh "Three AI tools boost productivity. GPT writes code, Whisper transcribes audio, Remotion creates videos."
```

Output: `~/openclaw-video/out/generated.mp4`

### Example 2: With Configuration

User: "Use warm voice and faster speed"

Agent:
1. Confirm script content
2. Execute with parameters:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh generate "script content" --voice nova --speed 1.3
```

### Example 3: Script Optimization

User: "Is this script good for a video: AI changes the world"

Agent:
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "AI changes the world"
```

Agent receives analysis and informs user.

---

## 🔧 Troubleshooting

### Issue 1: Project Not Found

**Error**: `bash: ~/openclaw-video/generate-for-openclaw.sh: No such file or directory`

**Solution**:
```bash
# Check if project exists
ls ~/openclaw-video

# If not, install the project
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video && npm install
```

### Issue 2: API Key Error

**Error**: `model_not_found` or TTS access denied

**Solution**:
- Use a paid OpenAI account (minimum $5 balance)
- Verify API key has TTS + Whisper access
- **Recommended**: Create `.env` file in project root:
  ```bash
  cd ~/openclaw-video
  echo 'OPENAI_API_KEY="sk-your-key-here"' > .env
  ```
- Alternative: Set environment variable: `export OPENAI_API_KEY="sk-..."`

### Issue 3: Missing Dependencies

**Error**: `command not found: pnpm` or `tsx`

**Solution**:
```bash
cd ~/openclaw-video
npm install
```

---

## 📚 Full Documentation

- **GitHub**: https://github.com/ZhenRobotics/openclaw-video
- **Quick Start**: `~/openclaw-video/QUICKSTART.md`
- **Agent Guide**: `~/openclaw-video/docs/AGENT.md`
- **FAQ**: `~/openclaw-video/docs/FAQ.md`
- **Full README**: `~/openclaw-video/README.md`

---

## 🌟 Features

- ✅ Fully automated video generation pipeline
- ✅ Supports Chinese and English scripts
- ✅ Low cost (< $0.01 per video)
- ✅ Local rendering, no cloud services required
- ✅ Cyberpunk visual style
- ✅ Customizable configurations
- ✅ Agent-friendly interface

---

## ⚠️ Important Notes

1. **API Configuration**: Valid `OPENAI_API_KEY` required (use `.env` file for security)
2. **Project Installation**: Must clone and install project before use
3. **Network Required**: TTS and Whisper APIs need internet connection
4. **Path Assumption**: Default project location is `~/openclaw-video/`, adjust if different
5. **npm Package**: Available on npm (`npm install -g openclaw-video`)

---

## 🎯 Agent Behavior Guidelines

When using this skill, agents should:

**DO**:
- ✅ Check if project is installed on first use
- ✅ Use existing project, don't create new Remotion projects
- ✅ Provide clear feedback (progress, estimated time)
- ✅ Handle errors gracefully with solutions
- ✅ Show output location after generation

**DON'T**:
- ❌ Run `npx remotion` to create new projects
- ❌ Assume project is installed without checking
- ❌ Ignore error messages
- ❌ Use hardcoded absolute paths (except `~` paths)

---

## 📊 Tech Stack

- **Remotion**: React-based video generation framework
- **OpenAI TTS**: Text-to-speech API
- **OpenAI Whisper**: Speech recognition API
- **TypeScript**: Type-safe development
- **React**: UI component framework
- **Node.js**: Runtime environment

---

## 🆕 Version History

### v1.2.0 (2026-03-07)
- ✨ **NEW**: Background video support with customizable opacity
- 🎨 **NEW**: Background overlay color customization
- 🔧 **ENHANCED**: Command-line parameters for background video
- 📝 **UPDATED**: Documentation with background video examples
- ✅ **TESTED**: Full pipeline integration with background videos

### v1.1.0 (2026-03-05)
- ✨ **NEW**: Custom color support for scene titles
- 🔐 **SECURITY**: Removed hardcoded API keys, now uses `.env` file
- 📦 **npm**: Published to npm registry (install with `npm install -g openclaw-video`)
- 🛠️ Enhanced script portability with relative paths
- 📚 Added OpenClaw Chat integration guide
- 🎯 Better error messages and validation

### v1.0.2 (2026-03-03)
- ✨ Optimized installation guide with universal paths
- 📝 Improved documentation structure
- 🛠️ Added troubleshooting guide
- 🤖 Added agent behavior guidelines
- 🌍 Full English version

### v1.0.0 (2026-03-03)
- ✨ Initial release
- 🎤 TTS voice generation
- ⏱️ Whisper timestamp extraction
- 🎬 Intelligent scene orchestration
- 🎨 Cyber-wireframe visual style
- 🤖 Agent CLI interface

---

**Project Status**: ✅ Production Ready

**License**: MIT

**Author**: @ZhenStaff

**Support**: https://github.com/ZhenRobotics/openclaw-video/issues

**ClawHub**: https://clawhub.ai/ZhenStaff/video-generator


path: SKILL-ZH-OLD-VIDEO.md
content: ---
name: video-generator
description: Automated video generation pipeline with OpenAI TTS, Whisper, and Remotion - from text script to professional short videos
tags: [video-generation, remotion, openai, tts, whisper, automation, ai-video, short-video, text-to-video]
---

# 🎬 Video Generator Skill

自动化视频生成系统，从文本脚本生成专业短视频。

## 📦 安装

### 步骤 1: 安装 Skill

```bash
clawhub install video-generator
```

### 步骤 2: 安装项目

**选项 A: 通过 GitHub（推荐）**

```bash
# 克隆项目到标准位置
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video

# 安装依赖
npm install

# 设置环境变量
export OPENAI_API_KEY="sk-your-key-here"
```

**选项 B: 通过 npm（即将支持）**

```bash
npm install -g openclaw-video
```

### 步骤 3: 验证安装

```bash
cd ~/openclaw-video
./agents/video-cli.sh help
```

---

## 🚀 使用方式

### When to use this skill

**自动触发条件** - 当用户的消息包含以下任一情况时使用此 skill：

- 关键词：`生成视频`, `做视频`, `创建视频`, `make video`, `generate video`
- 提供了看起来像视频脚本的文本（多个句子描述故事/概念）
- 询问关于视频生成、TTS 或 Remotion
- 想要将文本转换为视频格式

**触发示例**（遇到这些必须使用此 skill）：
- "AI让开发更简单。GPT写代码，Whisper转音频，Remotion做视频。" ← 这是视频脚本
- "帮我生成一个视频：[任何脚本]"
- "做个视频，内容是..."
- "我想要一个关于AI的短视频"

**不要使用的情况**：
- 仅视频播放或格式转换（使用 video-frames skill）
- 视频编辑或剪辑（使用其他工具）

---

## 🎯 核心功能

这个 Skill 提供完整的视频生成流水线：

- 🎤 **TTS 语音生成** - OpenAI TTS API，支持多种声音
- ⏱️ **时间戳提取** - OpenAI Whisper API，精确分段
- 🎬 **场景编排** - 智能检测 6 种场景类型
- 🎨 **视频渲染** - Remotion，赛博线框风格
- 🤖 **Agent 交互** - 自然语言对话

---

## 💻 Agent 使用指南

### 重要提示

**关键**: 使用现有的项目目录，不要创建新项目或运行 `npx remotion`。

项目位置：
- 标准安装：`~/openclaw-video/`
- 或检测：首次使用时询问用户项目位置

### 主命令：生成视频

当用户请求生成视频时，执行以下命令：

```bash
# 方法 1: 使用便捷脚本（推荐）
~/openclaw-video/generate-for-openclaw.sh "用户提供的脚本内容"

# 方法 2: 使用 CLI
cd ~/openclaw-video && ./agents/video-cli.sh generate "脚本内容"

# 方法 3: 完整 Agent（用于复杂需求）
cd ~/openclaw-video && pnpm exec tsx agents/video-agent.ts "帮我生成视频：脚本内容"
```

**示例**：

如果用户说："生成视频：AI让开发更简单"

执行：
```bash
~/openclaw-video/generate-for-openclaw.sh "AI让开发更简单"
```

### 其他操作

**优化脚本**：
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "脚本内容"
```

**获取帮助**：
```bash
cd ~/openclaw-video && ./agents/video-cli.sh help
```

### 输出位置

生成的视频保存在：`~/openclaw-video/out/generated.mp4`

---

## ⚙️ 配置选项

### 声音选择
- `alloy` - 中性
- `echo` - 清晰
- `nova` - 推荐，温暖
- `shimmer` - 柔和

### 语速
- 范围：0.25 - 4.0
- 推荐：1.15（快节奏短视频）
- 默认：1.0

### 视频风格
- 快节奏短视频（默认）
- 教程讲解
- 产品营销
- 故事叙述

---

## 📊 视频规格

- **分辨率**: 1080 x 1920（竖屏，适合抖音/快手/视频号）
- **帧率**: 30 fps
- **格式**: MP4（H.264 + AAC）
- **风格**: 赛博线框 + 霓虹色彩
- **时长**: 自动根据脚本长度计算

---

## 🎨 场景类型

系统自动检测并生成 6 种场景类型：

| 类型 | 效果 | 触发条件 |
|------|------|----------|
| **title** | 故障效果 + 弹簧缩放 | 第一个片段 |
| **emphasis** | 放大弹出 | 包含百分比、数字强调 |
| **pain** | 震动 + 红色警告 | 包含问题、痛点 |
| **content** | 平滑淡入 | 普通内容 |
| **circle** | 旋转圆环高亮 | 列举要点 |
| **end** | 上滑淡出 | 最后一个片段 |

---

## 💰 成本估算

每个 15 秒视频约 **$0.003**（不到 1 美分）：

- OpenAI TTS: ~$0.001
- OpenAI Whisper: ~$0.0015
- Remotion 渲染: 免费（本地）

---

## 📝 使用示例

### 示例 1: 快速生成

用户："生成一个视频：三个AI工具改变开发效率。GPT写代码，Whisper转音频，Remotion做视频。"

Agent 执行：
```bash
~/openclaw-video/generate-for-openclaw.sh "三个AI工具改变开发效率。GPT写代码，Whisper转音频，Remotion做视频。"
```

输出：`~/openclaw-video/out/generated.mp4`

### 示例 2: 带配置

用户："用温暖的声音生成视频，语速快一点"

Agent：
1. 确认脚本内容
2. 执行带参数的命令：
```bash
cd ~/openclaw-video && ./agents/video-cli.sh generate "脚本内容" --voice nova --speed 1.3
```

### 示例 3: 优化脚本

用户："帮我看看这个脚本适合做视频吗：AI改变世界"

Agent：
```bash
cd ~/openclaw-video && ./agents/video-cli.sh optimize "AI改变世界"
```

Agent 会得到分析结果并告知用户。

---

## 🔧 故障排查

### 问题 1: 找不到项目

**错误**: `bash: ~/openclaw-video/generate-for-openclaw.sh: No such file or directory`

**解决**：
```bash
# 检查项目是否已安装
ls ~/openclaw-video

# 如果不存在，安装项目
git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video
cd ~/openclaw-video && npm install
```

### 问题 2: API Key 错误

**错误**: `model_not_found` 或 TTS 访问被拒

**解决**：
- 确保使用付费 OpenAI 账号（充值至少 $5）
- 确认 API Key 有 TTS + Whisper 权限
- 设置环境变量：`export OPENAI_API_KEY="sk-..."`

### 问题 3: 依赖缺失

**错误**: `command not found: pnpm` 或 `tsx`

**解决**：
```bash
cd ~/openclaw-video
npm install
```

---

## 📚 完整文档

- **GitHub**: https://github.com/ZhenRobotics/openclaw-video
- **快速开始**: `~/openclaw-video/QUICKSTART.md`
- **Agent 指南**: `~/openclaw-video/docs/AGENT.md`
- **FAQ**: `~/openclaw-video/docs/FAQ.md`
- **完整 README**: `~/openclaw-video/README.md`

---

## 🌟 特性

- ✅ 完全自动化的视频生成流水线
- ✅ 支持中英文脚本
- ✅ 低成本（每视频 < $0.01）
- ✅ 本地渲染，无需云服务
- ✅ 赛博朋克视觉风格
- ✅ 支持自定义配置
- ✅ Agent 友好的接口

---

## ⚠️ 注意事项

1. **环境变量**: 需要有效的 `OPENAI_API_KEY`
2. **项目安装**: 必须先克隆和安装项目才能使用
3. **网络要求**: TTS 和 Whisper API 需要网络连接
4. **路径假设**: 默认项目在 `~/openclaw-video/`，如在其他位置需调整

---

## 🎯 Agent 行为准则

使用此 skill 时，Agent 应该：

1. ✅ **检查项目是否安装**：首次使用时确认项目存在
2. ✅ **使用现有项目**：不要创建新的 Remotion 项目
3. ✅ **提供清晰反馈**：告诉用户正在生成视频、预计时间
4. ✅ **处理错误**：遇到错误时提供解决方案
5. ✅ **显示结果**：生成后告知视频位置

**不要做**：
- ❌ 运行 `npx remotion` 创建新项目
- ❌ 在没有检查的情况下假设项目已安装
- ❌ 忽略错误信息
- ❌ 使用硬编码的绝对路径（除了 `~` 路径）

---

## 📊 技术栈

- **Remotion**: React-based 视频生成框架
- **OpenAI TTS**: 文字转语音 API
- **OpenAI Whisper**: 语音识别 API
- **TypeScript**: 类型安全开发
- **React**: UI 组件框架
- **Node.js**: 运行环境

---

## 🆕 版本历史

### v1.0.0 (2026-03-03)
- ✨ 初始发布
- 🎤 TTS 语音生成
- ⏱️ Whisper 时间戳提取
- 🎬 场景智能编排
- 🎨 赛博线框视觉风格
- 🤖 Agent CLI 接口

---

**项目状态**: ✅ 生产就绪

**许可证**: MIT

**作者**: @ZhenStaff

**支持**: https://github.com/ZhenRobotics/openclaw-video/issues


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)