/tensorslab-skills:tl-videofrom tensorslab-skills
Generates videos from text descriptions or images via TensorsLab's AI models (seedancev2, seedancev15pro, seedancev1profast). Handles prompt enhancement, progress tracking, and local file saving. Needs browser-based auth before first use.
Ships in tensorslab-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill enables AI-powered video generation through TensorsLab's API, supporting both text-to-video and image-to-video workflows. Video generation is a time-intensive process - tasks typically take several minutes to complete.
The Python scripts for this skill are located in the scripts/ subdirectory relative to this SKILL.md file. Always use the absolute path when executing scripts. Determine the absolute path based on where this skill is installed.
For example, if this SKILL.md is at /path/to/skills/tl-video/SKILL.md, then:
python "/path/to/skills/tl-video/scripts/tensorslab_auth.py"python "/path/to/skills/tl-video/scripts/tensorslab_video.py"When executing, construct the command using the resolved absolute path:
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" <args>
BEFORE any video generation, you must ensure you are authorized with TensorsLab.
The authorization script will automatically check if an API key already exists in the TENSORSLAB_API_KEY environment variable or in ~/.tensorslab/.env before proceeding.
(Note: When you need to verify the environment variable, ONLY check if it exists. NEVER display or print the actual API key value.)
Run:
python "<absolute_path_to_skill_dir>/scripts/tensorslab_auth.py"
On Windows/macOS: This will open a browser for authorization. Wait for "Authorization Successful!" before proceeding.
On Linux: Browser auth is automatically skipped. The script will print instructions to get your API key manually from TensorsLab Console. Set it via:
export TENSORSLAB_API_KEY=your_api_key_here
After authorization, the API key is stored in ~/.tensorslab/.env and you don't need to re-authorize unless the key expires.
When the API key is provided via export TENSORSLAB_API_KEY=xxx or --api-key argument and a generation task succeeds, the key is automatically saved to ~/.tensorslab/.env. Future sessions will pick it up without needing to export again.
| Model | Description | Best For | Max Duration |
|---|---|---|---|
| seedancev2 | Highest quality, much slower generation | Cinematic content where quality is priority | 15s |
| seedancev15pro | Pro quality | High-end productions | 10s |
| seedancev1profast | Fast generation with solid quality | Default model, quick previews | 10s |
Default model: seedancev1profast (recommended for most requests)
Notes:
seedancev2 has the best visual quality but is significantly slower than 1.x models.User request: "做一段 10 秒钟横屏的宇宙飞船穿梭星际的视频"
Constraints:
sourceImage or imageUrl for text-to-video generation.Agent processing:
duration=10, ratio="16:9"./tensorslab_output/Example enhanced prompt:
Cinematic wide shot of a spaceship rapidly flying through space, passing glowing
nebulae and distant stars, lens flares, dramatic camera movement, epic scale,
movie-quality visual effects, smooth 24fps motion
User request: "让这张人物合影 family.jpg 动起来" or "让风景照动起来"
Agent processing:
Parameters for image-to-video:
sourceImage: Array of image files (1-2 images max)imageUrl: Comma-separated URLs of source images (Must be standard HTTP/HTTPS URLs. Do NOT use local paths like /tmp/xxx.png here)prompt: Description of desired motion/animationModel limitation:
seedancev2 does not support human-face source images for image-to-video.seedancev1profast (default) or seedancev15pro instead.Aspect ratios:
9:16 - Vertical (TikTok, Reels, Shorts) - default16:9 - Horizontal (YouTube, standard video)Resolutions:
480p - SD quality, faster generation720p - HD quality - default1080p - Full HD1440p - 2K quality (seedancev2 only)Longer videos take proportionally more time to generate. seedancev2 is notably slower even at the same duration/resolution.
| Feature | Parameter | Description |
|---|---|---|
| Audio Generation | generate_audio=1 | Generate soundtrack with video |
| Last Frame | return_last_frame=1 | Also return final frame as image |
Video generation takes several minutes. Keep users informed:
⏳ Waiting for video generation to complete...
(This may take several minutes - please be patient)
🔄 Status: Processing (elapsed: 45s)
🚀 正在渲染电影级大片,已耗时 60 秒,请稍安勿躁...
🚀 正在渲染电影级大片,已耗时 120 秒,请稍安勿躁...
✅ Task completed!
Heartbeat interval: Print encouraging message every 60 seconds.
依赖:脚本需要
requests和pyyaml库,首次使用前执行:pip install requests pyyaml
重要:提示词必须用引号包裹。 传给脚本的 prompt 参数必须用双引号 " 包裹,避免 shell 解析问题:
# 正确
python "scripts/tensorslab_video.py" "a spaceship flying through space"
python "scripts/tensorslab_video.py" "让照片中的人物动起来" --source portrait.jpg
# 错误 - 提示词没有引号
python "scripts/tensorslab_video.py" a spaceship flying through space
Execute the Python script directly:
# Text-to-video (default 5s, vertical 9:16)
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "a spaceship flying through space"
# 10 second horizontal video
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "sunset over ocean waves" --duration 10 --ratio 16:9
# Image-to-video with local file
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "make this photo come alive" --source portrait.jpg
# Image-to-video with URL
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "make this photo come alive" --image-url https://example.com/portrait.jpg
# Fast preview
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "abstract flowing colors" --model seedancev1profast
# High quality with audio
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "epic mountain timelapse" --resolution 1440p --duration 10 --audio
# Custom output directory
python "<absolute_path_to_skill_dir>/scripts/tensorslab_video.py" "a sunset timelapse" --output-dir ./my_videos
| Status | Code | Meaning |
|---|---|---|
| Pending | 1 | Task waiting in queue |
| Processing | 2 | Currently generating |
| Completed | 3 | Done, video ready |
| Failed | 4 | Error occurred |
| Uploading | 5 | Uploading generated video |
Translate API errors to user-friendly messages:
| Error Code | Meaning | User Message |
|---|---|---|
| 9000 | Insufficient credits | "亲,积分用完啦,请前往 https://tensorai.tensorslab.com/ 充值" |
| 9999 | General error | Show the specific error message |
All videos are saved to output directory with naming pattern:
./tensorslab_output/ (current working directory)--output-dir or -o to specify a different path{task_id}_{index}.mp4 - e.g., abcd_1234567890_0.mp4URL mapping: The script also saves file-to-URL mappings in ./tensorslab_output/urls.yaml. This file tracks the original URLs for each downloaded file and accumulates entries across multiple runs. When you need the original URL of a generated video, read this file.
# Example urls.yaml content
abcd_1234567890_0.mp4: https://tensorai.tensorslab.com/videos/abcd_1234567890_0.mp4
After completion, the script outputs both the local file path and the remote URL. Inform user with both:
🎉 您的视频处理完毕!
- File: ./tensorslab_output/{filename}
- URL: {remote_url}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/ali-videoGenerate videos using Aliyun Bailian's HappyHorse AI video generation models via DashScope API. Supports text-to-video (T2V), image-to-video (I2V with first frame), and reference-to-video (R2V with multiple reference images). Supports batch generation with concurrent task execution. Requires DASHSCOPE_API_KEY. Video generation typically takes 1-5 minutes. MUST use this skill whenever generating videos with Aliyun/HappyHorse/DashScope, including batch video generation, animating images, or creating videos from text descriptions./image-edit对图像进行编辑操作。支持四种功能:变宽高比(aspect)、擦除对象(erase)、去除背景(rmbg)、通用编辑(edit)。基于 tl-image 的 quickedit 模型实现快速图像编辑。当用户需要修改图片宽高比、移除图片中的对象、去除背景或进行自定义编辑时使用此技能。/tl-imageGenerate and edit images using TensorsLab's AI models. Supports text-to-image, image-to-image generation, plus advanced editing: avatar generation, watermark removal, object erasure, face replacement, and general image editing. Features automatic prompt enhancement, progress tracking, and local file saving. Requires browser-based authorization before first use.Generated from the plugin's indexed repository (tensorslab/skills) — no native marketplace selected
npx claudepluginhub p/tensorslab-tensorslab-skillsOther plugins' skills for the same job