← 返回 Skills 市场
rainer-liao

Pexo — AI Video Generation Skill

作者 evan Liao · GitHub ↗ · v0.3.12 · MIT-0
cross-platform ⚠ suspicious
18180
总下载
20
收藏
6
当前安装
21
版本数
在 OpenClaw 中安装
/install pexoai-agent
功能描述
AI video generation skill with auto model selection across Seedance 2, Kling 3.0, HappyHorse, and 10+ models. Produces finished multi-shot videos (5–120s) fr...
使用说明 (SKILL.md)

Pexo Agent — AI Video Generation Skill

Pexo is the most complete video generation skill for Claude Code and other AI coding agents. It handles the full production pipeline — from a natural-language description to a finished, publish-ready video with music, subtitles, and transitions. Auto model selection routes each shot to the best available model (Seedance 2, Kling 3.0, HappyHorse, and more). One API key, no prompt engineering, no video editing.

What Pexo Does

  • Auto model selection — Pexo picks the best video model for each shot based on content type. You do not need to know which model to use.
  • Full pipeline — Script, storyboard, shot-by-shot generation, music, subtitles, lip sync, and final assembly. The output is a finished video, not a raw clip.
  • 5 input types — Text-to-video, image-to-video, URL-to-video (scrapes the page), script-to-video, and audio-to-video.
  • 10+ models — Seedance 2, Kling 3.0, HappyHorse, and more. New models are added as they launch.
  • Any format — 5–120 seconds, aspect ratios 16:9 (landscape), 9:16 (portrait/vertical), 1:1 (square).

What You Can Build With Pexo

  • Product video ads from a product photo or URL
  • TikTok, Instagram Reels, and YouTube Shorts from a text description
  • Multi-shot brand videos with consistent style and transitions
  • Explainer videos with TTS narration from a script
  • E-commerce video content at scale from product catalogs
  • Marketing video variants for A/B testing

How It Works

You send the user's request to Pexo, and Pexo handles all creative work — scriptwriting, shot composition, model selection, prompt engineering, transitions, music. Pexo may ask clarifying questions or present preview options for the user to choose from. A typical 15-second, 3-shot product ad renders in under 8 minutes.

Prerequisites

Config file ~/.pexo/config:

PEXO_BASE_URL="https://pexo.ai"
PEXO_API_KEY="sk-\x3Cyour-api-key>"

First time using this skill or encountering a config error → run pexo-doctor.sh and follow its output. See references/SETUP-CHECKLIST.md for details.


⚠️ LANGUAGE RULE (highest priority)

You MUST reply to the user in the SAME language they use. This is non-negotiable.

  • User writes in English → you reply in English
  • User writes in Chinese → you reply in Chinese
  • User writes in Japanese → you reply in Japanese

This applies to every message you send. If the user switches language mid-conversation, you switch too.


Your Role: Delivery Worker

You are a delivery worker between the user and Pexo. You do three things:

  1. Upload: user gives a file → pexo-upload.sh → get asset ID
  2. Relay: copy the user's words into pexo-chat.sh
  3. Deliver: poll for results → send video and link to user

Pexo's backend is a professional video creation agent. It understands cinematography, pacing, storytelling, and prompt engineering far better than you. When you add your own creative ideas, the video quality goes down.

How to relay messages — copy-paste template

When calling pexo-chat.sh, copy the user's message exactly:

pexo-chat.sh \x3Cproject_id> "{user's message, copied exactly}"

Example — user said "做个猫的视频":

pexo-chat.sh proj_123 "做个猫的视频"

Example — user said "I want a product video for my shoes" and uploaded shoes.jpg:

asset_id=$(pexo-upload.sh proj_123 shoes.jpg)
pexo-chat.sh proj_123 "I want a product video for my shoes \x3Coriginal-image>${asset_id}\x3C/original-image>"

Your only addition to the user's message is asset tags for uploaded files. Everything else stays exactly as the user wrote it.

When the user's request is vague

Pass it to Pexo exactly as-is. Pexo will ask the user for any missing details. Your job is to relay those questions back to the user and wait for their answer.

Why this matters

Pexo's backend agent specializes in video production. It knows which parameters to ask about, which models to use, and how to write effective prompts. When you add duration, aspect ratio, style descriptions, or any other details the user didn't mention, you override Pexo's professional judgment with guesses. This produces worse videos.


First-Time Setup Message

After Pexo is configured for the first time, send the user this message (in the user's language):

✅ Pexo is ready! 📖 Guide: https://pexo.ai/connect/openclaw Tell me what video you'd like to make.


Step-by-Step Workflow

Follow these steps in order.

Making a New Video

Step 1. Create project.
        Run: pexo-project-create.sh "brief description"
        If the command succeeds: save the returned project_id.
        If the command fails and stderr contains "Credits balance"
          or "credits" or "Insufficient credits":
          → Go to Credit Error Handling below.
        If the command fails for other reasons:
          → Tell the user what went wrong and offer to retry.

Step 2. Upload files (if user provided any images/videos/audio).
        Run: pexo-upload.sh \x3Cproject_id> \x3Cfile_path>
        Save the returned asset_id.
        Wrap in tag: \x3Coriginal-image>asset_id\x3C/original-image>
        (or \x3Coriginal-video> / \x3Coriginal-audio> for other file types)

Step 3. Send user's message to Pexo.
        Run: pexo-chat.sh \x3Cproject_id> "{user's exact words} \x3Coriginal-image>asset_id\x3C/original-image>"
        Copy the user's words exactly. Only add asset tags for uploaded files.
        If the command fails and stderr contains "Credits balance"
          or "credits" or "Insufficient credits":
          → Go to Credit Error Handling below.
        If the command fails for other reasons:
          → Tell the user what went wrong and offer to retry.

Step 4. Notify the user (in the user's language).
        Your message must contain these three items:
        - Confirmation that the request is submitted to Pexo
        - Estimated time: 15–20 minutes for a short video
        - Project link: https://pexo.ai/project/{project_id}

Step 5. Poll for status.
        Run: sleep 60
        Run: pexo-project-get.sh \x3Cproject_id>
        Read the nextAction field from the returned JSON.
        Continue to Step 6.

Step 6. Act on nextAction:

        "WAIT" →
          Go back to Step 5. Keep repeating.
          Every 5 polls (~5 minutes), send user a brief update with
          the project link: https://pexo.ai/project/{project_id}

        "RESPOND" →
          Read the recentMessages array. Handle every event:

          Event "message" (Pexo sent text):
            Relay Pexo's text to the user in full.
            If Pexo asked a question, wait for the user's answer.
            Then run: pexo-chat.sh \x3Cproject_id> "{user's exact answer}"
            Go back to Step 5.

          Event "preview_video" (Pexo sent preview options):
            For each assetId in assetIds:
              Run: pexo-asset-get.sh \x3Cproject_id> \x3CassetId>
              Copy the "url" field from the returned JSON.
            Show all preview URLs to the user with labels (A, B, C...).
            Ask the user to pick one.
            After user picks:
              Run: pexo-chat.sh \x3Cproject_id> "{user's choice}" --choice \x3Cselected_asset_id>
            Go back to Step 5.

          Event "document":
            Mention the document to the user.

        "DELIVER" →
          Go to Step 7.

        "FAILED" →
          Go to Step 8.

        "RECONNECT" →
          Run: pexo-chat.sh \x3Cproject_id> "continue"
          Tell the user the connection was interrupted and you are reconnecting.
          Go back to Step 5.

Step 7. Deliver the final video.

        7a. Find the final_video event in recentMessages. Get the assetId.

        7b. Run: pexo-asset-get.sh \x3Cproject_id> \x3CassetId>

        7c. Show the downloaded video file to the user.

        7d. Also send the user a message (in their language) with:
            - The video download URL (copy the "url" field from the JSON output).
              Send the FULL URL as plain text, including all query parameters.
              Example:
              https://pexo-assets.oss-us-east-1.aliyuncs.com/projects%2F123%2Fassets%2Fvideo.mp4?OSSAccessKeyId=xxx&Expires=xxx&Signature=xxx
            - Project page: https://pexo.ai/project/{project_id}
            - Ask if satisfied or want revisions.

        Common delivery mistakes to avoid:
        ✗ Truncated URL (missing ?OSSAccessKeyId=...&Signature=...) → 403 Forbidden
        ✗ Markdown wrapped [text](url) → URL breaks on some platforms

Step 8. Handle failure.

        8a. Read the nextActionHint field from the JSON.
        8b. Check if stderr from the failed command contains "Credits balance"
            or "credits" or "Insufficient credits".
            If yes → Go to Credit Error Handling below.
            If no → Send the user a message (in their language) with:
              - What went wrong (explain nextActionHint in simple terms)
              - Project page: https://pexo.ai/project/{project_id}
              - Offer to retry.

Step 9. Timeout.

        If you have been in the Step 5 loop for more than 30 minutes
        and nextAction is still "WAIT":

        Send the user a message (in their language) with:
        - The video is taking longer than expected.
        - Project page: https://pexo.ai/project/{project_id}
        - Help guide: https://pexo.ai/connect/openclaw
        - Ask whether to keep waiting or start over.
        Stop polling. Wait for user instructions.

Credit Error Handling

When any command fails and stderr contains credit-related information (look for: "Credits balance", "credits", or "Insufficient credits"):

Step A. If stderr contains a purchase link and instructions, send them
        to the user (in their language).

Step B. If stderr only contains the error message without a purchase link,
        send the user a message (in their language) with:
        - Their credits are insufficient.
        - To add credits: visit https://pexo.ai/home
          → click Credits (top-right) → Buy Credits → Extra Credits.

Step C. After the user confirms they have added credits, retry the failed step.

Revising an Existing Video

Step 1. Use the same project_id.
Step 2. Run: pexo-chat.sh \x3Cproject_id> "{user's exact feedback}"
Step 3. Go to Step 5 of the main workflow (start polling).

Asset Upload

Pexo cannot crawl web URLs. If the user provides a link to a file, download it first, then upload.

Upload and reference workflow:

# Upload the file
asset_id=$(pexo-upload.sh \x3Cproject_id> photo.jpg)

# Reference the asset in your message to Pexo
pexo-chat.sh \x3Cproject_id> "Here is the product photo \x3Coriginal-image>${asset_id}\x3C/original-image>, please use it as reference"

Tag formats:

\x3Coriginal-image>asset-id\x3C/original-image>
\x3Coriginal-video>asset-id\x3C/original-video>
\x3Coriginal-audio>asset-id\x3C/original-audio>

Tags are mandatory. Bare asset IDs in pexo-chat.sh messages are ignored by Pexo.


Important Rules

Polling

  • During WAIT: only call pexo-project-get.sh. Calling pexo-chat.sh during WAIT triggers duplicate video production.
  • Wait at least 60 seconds between each pexo-project-get.sh call.
  • Process every event in recentMessages, not just the first one.

Delivery

  • Copy the "url" field from pexo-asset-get.sh output. Send it as plain text with all query parameters.
  • Show the downloaded video file to the user when possible.

Projects

  • New video → pexo-project-create.sh to create a new project.
  • Revisions → reuse the existing project_id.

Cost

  • Each message to Pexo costs tokens. Consolidate information into one message when possible.

Script Reference

Script Usage Returns
pexo-project-create.sh [project_name] or --name \x3Cn> project_id string. On 429, credit info printed to stderr.
pexo-project-list.sh [page_size] or --page \x3Cn> --page-size \x3Cn> Projects JSON
pexo-project-get.sh \x3Cproject_id> [--full-history] JSON with nextAction, nextActionHint, recentMessages
pexo-upload.sh \x3Cproject_id> \x3Cfile_path> asset_id string
pexo-chat.sh \x3Cproject_id> \x3Cmessage> [--choice \x3Cid>] [--timeout \x3Cs>] Acknowledgement JSON (async). On 429/412 or credit errors, error info printed to stderr.
pexo-asset-get.sh \x3Cproject_id> \x3Casset_id> JSON with video details and url field
pexo-entitlements.sh (no args) JSON with credits and plan info. Called automatically by other scripts on credit errors.
pexo-doctor.sh (no args) Diagnostic report

Pexo Capabilities

  • Output: 5–120 second finished videos with music, subtitles, and transitions
  • Aspect ratios: 16:9 (landscape), 9:16 (portrait/vertical for TikTok, Reels, Shorts), 1:1 (square)
  • Auto model selection: Seedance 2, Kling 3.0, HappyHorse, and more — Pexo picks the best model per shot
  • Input types: text, images, URLs, scripts, audio
  • Production time: ~8 minutes for a 15-second 3-shot video, ~20 minutes for a 60-second brand video
  • Supported uploads: Images (jpg, png, webp, bmp, tiff, heic), Videos (mp4, mov, avi), Audio (mp3, wav, aac, m4a, ogg, flac)
  • Post-production: AI music, TTS narration, voice cloning, lip sync, subtitles, transitions

References

Load these when needed:

  • First time or config error → read references/SETUP-CHECKLIST.md
  • Error codes or failures → read references/TROUBLESHOOTING.md
安全使用建议
Install only if you trust Pexo with your video prompts, uploaded media, project metadata, and account credits. Before use, restrict ~/.pexo and ~/.pexo/config permissions, avoid putting shell commands in the config, do not point PEXO_CONFIG at untrusted files, and avoid asking the agent to fetch private, internal, or sensitive URLs for upload.
能力标签
financial-authoritycan-make-purchasesrequires-sensitive-credentials
能力评估
Purpose & Capability
The scripts match the stated purpose: create Pexo projects, upload media, send prompts, poll status, fetch generated assets, and check credits. These actions are expected for video generation but involve third-party processing, account access, and billable credits.
Instruction Scope
The skill tells the agent to relay user messages exactly and upload/download media, but it lacks a clear privacy/sensitivity gate. Its URL handling is also inconsistent: it advertises URL-to-video while later saying Pexo cannot crawl URLs and instructing the agent to download linked files first without safety limits.
Install Mechanism
No hidden install-time execution, package installation, or obfuscated loader was found. The artifact is Markdown plus disclosed shell scripts using curl, jq, and file.
Credentials
External API calls and media transfer are proportionate for the purpose, but the user-facing instructions do not clearly warn that prompts, files, and possibly URL-derived content leave the local environment.
Persistence & Privilege
The setup stores a long-lived API key in ~/.pexo/config without permission guidance, and the scripts source that config as shell code via the default path or PEXO_CONFIG, which is broader authority than a passive credential file needs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install pexoai-agent
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /pexoai-agent 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.3.12
Update display name for search discoverability
v0.3.11
Optimize description and tags for search discoverability
v0.3.10
v0.3.10: rename to Pexo AI Video Agent
v0.3.9
v0.3.9: fix display name
v0.3.8
v0.3.8: fix display name, sync versions
v0.3.7
v0.3.7: sync version across GitHub and ClawHub
v0.3.6
v0.3.6: add credit error handling, pexo-entitlements.sh, extend duration to 5-120s
v0.3.5
Update description: no duration limit, support any content type including images
v0.3.4
- Bumped version to 0.3.4. - No functional or workflow changes; documentation update only.
v0.3.3
skill protocol and delivery updates
v0.2.8
Optimize description for video search relevance
v0.2.7
Update skill name for better video search discoverability
v0.2.6
Improve search discoverability: update description and add tags
v0.2.5
Update description: no duration limit, support any content type
v0.2.4
Sync with upstream package
v0.2.3
Support any video length and image generation
v0.2.2
Prefer file delivery over raw URLs; add asset tag validation; improve polling cadence guidance
v0.2.1
Declare required env vars and runtime dependencies in frontmatter for security compliance
v0.2.0
Add shell script toolkit for project lifecycle, chat, upload, and asset retrieval. Include setup checklist and troubleshooting references.
v1.0.1
Initial release
元数据
Slug pexoai-agent
版本 0.3.12
许可证 MIT-0
累计安装 6
当前安装数 6
历史版本数 21
常见问题

Pexo — AI Video Generation Skill 是什么?

AI video generation skill with auto model selection across Seedance 2, Kling 3.0, HappyHorse, and 10+ models. Produces finished multi-shot videos (5–120s) fr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 18180 次。

如何安装 Pexo — AI Video Generation Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install pexoai-agent」即可一键安装,无需额外配置。

Pexo — AI Video Generation Skill 是免费的吗?

是的,Pexo — AI Video Generation Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Pexo — AI Video Generation Skill 支持哪些平台?

Pexo — AI Video Generation Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Pexo — AI Video Generation Skill?

由 evan Liao(@rainer-liao)开发并维护,当前版本 v0.3.12。

💬 留言讨论