技能版本 1.0.0

environment-setup

Automatically detects and configures the Remotion video generation environment. Use when user requests video creation and dependencies (Node.js, FFmpeg, Remotion packages) need verification or installation. Checks system requirements, installs missing tools, initializes Remotion project structure, and validates the setup is ready for video generation.

价格

免费

  • 安装:免费

在组织开通时一次性收取;再次读取清单或下载不重复收费。

以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。

如何使用

  1. 为组织安装

    开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。

  2. 创建凭证

    客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:

    Authorization: Bearer $ZGI_MARKET_KEY

  3. 读取清单与安装包

    清单列出版本、文件和校验值;安装包是一个 zip 文件。

    读取清单
    curl "https://market-api.zgi.im/v1/market/skills/environment-setup/manifest" \
      -H "Authorization: Bearer $ZGI_MARKET_KEY"
    下载安装包
    curl "https://market-api.zgi.im/v1/market/skills/environment-setup/package" \
      -H "Authorization: Bearer $ZGI_MARKET_KEY" \
      -o environment-setup.zip

    读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。

技能说明

名称
environment-setup
说明
Automatically detects and configures the Remotion video generation environment. Use when user requests video creation and dependencies (Node.js, FFmpeg, Remotion packages) need verification or installation. Checks system requirements, installs missing tools, initializes Remotion project structure, and validates the setup is ready for video generation.
仅指令

技能包内没有脚本文件:这个技能是供模型阅读的文本。

SKILL.md 节选

# Remotion Environment Setup

You are responsible for ensuring the user's system has all required dependencies to generate videos with Remotion. This skill automatically detects, installs, and validates the complete environment.

## When This Skill Activates

This skill should activate automatically when:
- The video-generator skill detects a video creation request
- The user explicitly mentions environment setup or dependencies
- Any Remotion command fails due to missing dependencies

## System Requirements

### Required Software

1. **Node.js** (v16 or higher)
   - Check: `node --version`
   - Required for running Remotion and React

2. **FFmpeg** (any recent version)
   - Check: `ffmpeg -version`
   - Required for video encoding and frame stitching

3. **npm** or **yarn** or **pnpm**
   - Comes with Node.js installation
   - Package manager for installing dependencies

4. **Chromium/Chrome**
   - Remotion downloads its own bundled Chromium
   - No manual installation needed
   - Used for rendering React components to frames

### Recommended (Optional)

- **Git**: For version control of video projects
- **Visual Studio Code**: For editing Remotion code
- **2-4GB free RAM**: For rendering process
- **500MB free disk space**: For project and output files

## Environment Detection Process

### Step 1: Check Node.js

Run this command:
```bash
node --version
```

**Expected output**: v16.x.x or higher (e.g., `v18.17.0`, `v20.5.1`)

**If missing**:
- Detect platform (macOS, Linux, Windows)
- Provide platform-specific installation instructions
- Do NOT attempt auto-install (Node.js requires user consent)

**Installation Instructions by Platform**:

**macOS**:
```bash
# Using Homebrew (recommended)
brew install node

# Or download from nodejs.org
```

**Linux (Ubuntu/Debian)**:
```bash
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
```

**Windows**:
Download installer from https://nodejs.org/ and run it.

---

### Step 2: Check FFmpeg

Run this command:
```bash
ffmpeg -version
```

**Expected output**: FFmpeg version information (any recent version is fine)

**If missing**:

**macOS**:
```bash
brew install ffmpeg
```

**Linux (Ubuntu/Debian)**:
```bash
sudo apt-get update
sudo apt-get install ffmpeg
```

**Windows**:
1. Download from https://ffmpeg.org/download.html
2. Extract to C:\ffmpeg
3. Add to PATH environment variable

**Automatic Installation Decision**:
- On macOS/Linux: Ask user permission, then run install command
- On Windows: Provide manual instructions (auto-install not reliable)

---

### Step 3: Verify Package Manager

Run this command:
```bash
npm --version
```

**Expected output**: Version number (e.g., `9.8.1`)

**If npm is missing**: This indicates Node.js wasn't installed correctly. Return to Step 1.

**Alternative package managers**:
- yarn: `yarn --version`
- pnpm: `pnpm --version`

Use whichever is available (prefer npm as default).

---

## Project Initialization

### Step 4: Determine Project Directory

The Remotion project directory (referred to as `PROJECT_DIR` below) is selected using the following priority:

1. **User-specified path**: If the user explicitly provides a path, use that
2. **Environment variable**: If `REMOTION_PROJECT_DIR` is set, use its value
3. **Current working directory** (recommended): `./remotion-videos/` — keeps the project co-located with the user's workspace
4. **Home directory fallback**: `~/remotion-videos/` — only if the current directory is not writable or not suitable

**Determine and create the directory**:
```bash
# Use environment variable if set, otherwise default to ./remotion-videos
PROJECT_DIR="${REMOTION_PROJECT_DIR:-./remotion-videos}"
mkdir -p "$PROJECT_DIR"
cd "$PROJECT_DIR"
```

**Why this strategy**:
- Works in sandboxed environments where `~` may not be predictable
- Keeps video projects close to the user's working context
- Can be overridden externally via environment variable
- Falls back gracefully to home directory if needed

SKILL.md 不止这些内容,安装后可阅读全文。

技能包内容

共 1 个文件,合计 14.0 KiB

  • SKILL.md14.0 KiB

来源与审核

审核状态
尚未审核,内容来自上游来源
许可证
未说明

审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。