LibTV Video

Seedance 2.0 video generation via LibTV Gateway - AI text-to-video, image-to-video, video continuation, style transfer using Seedance 2.0 model. Also supports Kling 3.0, Wan 2.6, Midjourney. Trigger phrases: "seedance", "generate video", "make a video", "libtv", "liblib".

2,280 stars

Best use case

LibTV Video is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Seedance 2.0 video generation via LibTV Gateway - AI text-to-video, image-to-video, video continuation, style transfer using Seedance 2.0 model. Also supports Kling 3.0, Wan 2.6, Midjourney. Trigger phrases: "seedance", "generate video", "make a video", "libtv", "liblib".

Teams using LibTV Video should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/libtv-video/SKILL.md --create-dirs "https://raw.githubusercontent.com/nexu-io/nexu/main/apps/desktop/static/bundled-skills/libtv-video/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/libtv-video/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How LibTV Video Compares

Feature / AgentLibTV VideoStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Seedance 2.0 video generation via LibTV Gateway - AI text-to-video, image-to-video, video continuation, style transfer using Seedance 2.0 model. Also supports Kling 3.0, Wan 2.6, Midjourney. Trigger phrases: "seedance", "generate video", "make a video", "libtv", "liblib".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# LibTV Video / Image Generation

Generate AI videos and images via LibTV Gateway. Supports text-to-video, image-to-video, video continuation, style transfer, short drama generation, and more.

The backend agent automatically selects the best model. **When sending prompts, always append "use Seedance 2.0 model" to the message unless the user explicitly requests a different model.** Available models: Seedance 2.0, Kling 3.0/O3, Wan 2.6, Midjourney, Seedream 5.0.

## Requirements

- Python 3.8+
- `apiKey` configured in `~/.nexu/libtv.json`

## First-Time Setup

If the user has not configured an API Key, guide them to:
1. Contact the admin to obtain an API Key starting with `mgk_`
2. Run: `python3 scripts/libtv_video.py setup --api-key mgk_yourkey`
3. Run: `python3 scripts/libtv_video.py check` to confirm the configuration is correct

## Pre-Generation Check (must run before each generation)

1. Run `python3 scripts/libtv_video.py check`
2. Interpret the output:
   - "API Key not configured" → guide the user to contact the admin for a key, then run setup
   - "Key valid, N uses remaining" → inform the user of remaining quota, proceed with generation
   - "Key expired / exhausted" → guide the user to contact the admin, run update-key
   - "Cannot connect to gateway" → suggest checking network connectivity
3. Only proceed with generation after check passes

## Core Principle: Relay, Don't Create

You are a **messenger**, not a creator. The backend agent handles model selection, prompt engineering, and workflow orchestration. Your job is three things only:

1. **Upload**: User provides a local file → `upload` to get OSS URL
2. **Relay**: Pass the user's original description + OSS URL verbatim to `create-session`
3. **Collect**: Poll for results → download → present to user

**Never do these:**
- Don't rewrite, expand, translate, or embellish the user's prompt
- Don't break tasks into multiple sessions (e.g. don't split "generate 9 storyboards" into 9 calls)
- Don't add your own prompt engineering (e.g. "ultra-realistic, cinematic lighting, 8K")
- Don't arrange shots, plan storylines, or analyze styles yourself

## Video / Image Generation (async, non-blocking)

### Text-Only Generation

```bash
python3 scripts/libtv_video.py create-session "user's video description"
```

The script automatically appends "please use Seedance 2.0" unless the user specifies another model.

### Image+Text Generation (image-to-video)

```bash
# 1. Upload the image first
python3 scripts/libtv_video.py upload --file /path/to/image.png
# Output: url=https://libtv-res.liblib.art/...

# 2. Create session with the image URL in the message
python3 scripts/libtv_video.py create-session "user's description reference: {oss_url}"
```

### Continue in Existing Session

```bash
python3 scripts/libtv_video.py create-session "new description" --session-id SESSION_ID
```

### After Submission

1. `create-session` returns immediately without blocking
2. **Reply to the user immediately**: "Your video is being generated. It typically takes 1-3 minutes and will be sent to you automatically when ready."
3. **Do not wait** — resume normal conversation
4. A sub-agent will automatically wait in the background and deliver the results

## When the User Asks "Is my video ready?"

1. Run `python3 scripts/libtv_video.py query-session SESSION_ID`
   - If you don't remember the session_id, run `python3 scripts/libtv_video.py recover` to see all sessions
2. Reply based on the output:
   - Result URLs found → send the video/image links directly to the user
   - No results yet → "Your video is still being generated, please wait a moment"
   - Error or timeout → relay the error message and suggest retrying

## Session Recovery (after memory loss / agent restart)

If you don't remember whether a video was previously generated:
1. Run `python3 scripts/libtv_video.py recover`
2. It reads historical sessions from the local persistence file and queries the gateway for latest status
3. Completed sessions → send the result URLs to the user directly
4. Still in progress → inform the user it's still generating

## Presenting Results

When generation completes, show both:
- **Result links** (video/image URLs)
- **Project canvas link** (projectUrl)

Do NOT show the project canvas link while generation is in progress.

### URL Rules

The only valid result URL prefix is `https://libtv-res.liblib.art/sd-gen-save-img/`. Any other domain (e.g. `medeo-res.liblib.art`) is a gateway proxy URL and must be ignored.

**Always present the URL exactly as extracted by the script.** Do not:
- Rewrite or transform URLs
- Use proxy/cache domain URLs as results
- Fabricate URLs by guessing paths

The `extract_result_urls()` function in the script extracts only `libtv-res.liblib.art/sd-gen-save-img/` URLs. Trust its output.

## Multi-Session Discipline (CRITICAL)

When running multiple video generations concurrently, you MUST follow these rules strictly:

### 1. Track Every Session Separately

Maintain a clear mapping for each generation request:
- **User request** (what the user asked for, e.g. "scene 1: palace", "scene 2: garden")
- **Session ID** (returned by `create-session`)
- **Project UUID** (returned by `create-session`)

### 2. Never Mix Sessions

Before presenting results, always verify:
- The result URLs came from the correct session ID for that specific request
- Do NOT copy-paste URLs from one session's output into another session's reply

### 3. Label Results Clearly

When presenting results from multiple concurrent sessions, always label which result belongs to which request:
```
Scene 1 (palace): [video URL from session A]
Scene 2 (garden): [video URL from session B]
```

### 4. Handle Partial Completion

If some sessions complete before others:
- Present completed results immediately, clearly labeled
- Note which sessions are still in progress
- Do NOT hold all results until every session finishes

## Error Handling

When any command returns an error:
1. Read the message after "❌" in the output and **relay it to the user as-is**
2. Do not fabricate or translate error messages
3. Provide action suggestions based on the error type:

| Error keyword seen | Suggested action |
|---|---|
| "Invalid API Key" | Run `check`, contact admin to confirm key |
| "Free trial uses exhausted" | Contact admin for a new key |
| "Key expired" | Contact admin for a new key, run `update-key` |
| "Service temporarily unavailable" | Wait a few minutes and retry |
| "File too large" | Suggest the user send a smaller file (max 200MB) |
| "Unsupported file type" | Only image and video files are supported |
| "Cannot connect to gateway" | Check network connectivity |

## Command Reference

| Scenario | Command | Blocking? |
|---|---|---|
| First-time setup | `setup --api-key mgk_xxx` | No |
| Check status | `check` | No |
| Update key | `update-key --api-key mgk_xxx` | No |
| Remove key | `remove-key` | No |
| Upload file | `upload --file /path/to/file` | No |
| **Create session / send message** | **`create-session "description"`** | **No** |
| Query session | `query-session SESSION_ID` | No |
| Download results | `download-results SESSION_ID` | No |
| Wait and deliver | `wait-and-deliver --session-id ID --project-id UUID` | Yes |
| List all tasks | `tasks` | No |
| Recover sessions | `recover` | No |
| Change project | `change-project` | No |

Script path for all commands: `scripts/libtv_video.py`

Related Skills

Medeo Video

2280
from nexu-io/nexu

AI video generation via Medeo Gateway - generate short videos (15-20 seconds). Supports text-only and image+text generation. Trigger phrases: "generate video", "make a video", "medeo".

static-deploy

2280
from nexu-io/nexu

Deploy static pages to nexu.space. Use when user says deploy, publish, ship, or go live with a static site/page. Uploads files from workspace to <project-slug>.nexu.space via Wrangler + Cloudflare Pages. Supports first deploy and redeploy.

nano-banana

2280
from nexu-io/nexu

Generate or edit images via Nano Banana image models. Triggers on "generate image", "image generation", "nano banana", "edit image", "nano banana pro", "nano banana 2"

feedback

2280
from nexu-io/nexu

Send feedback to the Nexu team. Use when the user says /feedback followed by their message.

sync-specs

2280
from nexu-io/nexu

Use when code changes may have made documentation outdated, when reviewing docs for consistency, or when the user asks to sync or audit documentation.

nexu-e2e-test

2280
from nexu-io/nexu

Use when verifying OpenClaw gateway fixes end-to-end, testing skill loading after restart, or running integration tests against the local Nexu+OpenClaw stack. Triggers on "e2e test", "verify fix", "test gateway", "test skills loading".

datadog

2280
from nexu-io/nexu

Use when the user says "check Datadog", "查 Datadog", "查日志", "check logs", "crash logs", "查 crash", "gateway crash", "查告警", "check alerts", "check metrics", or needs to investigate production issues via Datadog Logs API.

feishu-update-doc

2280
from nexu-io/nexu

更新飞书云文档。支持 7 种更新模式:追加、覆盖、定位替换、全文替换、前/后插入、删除。

feishu-troubleshoot

2280
from nexu-io/nexu

飞书插件问题排查工具。包含常见问题 FAQ 和深度诊断命令(/feishu_doctor)。 常见问题可随时查阅。诊断命令用于排查复杂问题(多次授权仍失败、自动授权无法解决等), 会检查账户配置、API 连通性、应用权限、用户授权状态,并生成详细的诊断报告和解决方案。

feishu-task

2280
from nexu-io/nexu

飞书任务管理工具,用于创建、查询、更新任务和清单。 **当以下情况时使用此 Skill**: (1) 需要创建、查询、更新、删除任务 (2) 需要创建、管理任务清单 (3) 需要查看任务列表或清单内的任务 (4) 用户提到"任务"、"待办"、"to-do"、"清单"、"task" (5) 需要设置任务负责人、关注人、截止时间

feishu-im-read

2280
from nexu-io/nexu

飞书 IM 消息读取工具使用指南,覆盖会话消息获取、话题回复读取、跨会话消息搜索、图片/文件资源下载。 **当以下情况时使用此 Skill**: (1) 需要获取群聊或单聊的历史消息 (2) 需要读取话题(thread)内的回复消息 (3) 需要跨会话搜索消息(按关键词、发送者、时间等条件) (4) 消息中包含图片、文件、音频、视频,需要下载 (5) 用户提到"聊天记录"、"消息"、"群里说了什么"、"话题回复"、"搜索消息"、"图片"、"文件下载" (6) 需要按时间范围过滤消息、分页获取更多消息

feishu-fetch-doc

2280
from nexu-io/nexu

获取飞书云文档内容。返回文档的 Markdown 内容,支持处理文档中的图片、文件和画板(需配合 feishu_doc_media 工具)。