Files
market/skills/minimax-video-gen/SKILL.md
xyx 0cb3758669 fix: 补全 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验 (#4)
## 变更说明

修复 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验、补全英文翻译,并连带修复其他 stale
skill 的 source_hash 漂移问题。

### dashscope-image-gen / xiaomi-tts(PR 主线)
- `name` 字段从中文改为目录名(CI rule-1 要求 lowercase ASCII + hyphens)。
- 补全 `metadata.i18n` 块:`locales`、`zh-CN` (含 body 指向
SKILL.zh-CN.md)、`en-US`(含 description / body=./SKILL.md)。
- 新增 `SKILL.zh-CN.md`(zh-CN body 文件)。
- **root SKILL.md 改写为英文 body**(与 SKILL.zh-CN.md 内容对应),由本 PR
手工翻译;`default_locale=en-US`、`source_locale=zh-CN`,与 docs/I18N.md
约定一致:root SKILL.md = default_locale body (en-US)、SKILL.zh-CN.md =
source_locale body (zh-CN)。
- 两 locale 锁为 `translated_by: human` + 正确 `source_hash`。
- 内容质量修复:流程标题 "严格按此两步执行" 改为 "严格按此三步执行";强制规则 2 措辞精确化(/tmp
仅作中转);xiaomi-tts 用户意图映射表中 `response_format` 改为 `audio.format`
与请求体参数表一致;zh-CN.description 改为纯中文。
- locale header 由 shell 转义残留 `<\!--` 修正为标准 `<!-- locale: zh-CN -->`。

### 连带:6 个 main 上已 stale 的 skill(避免 translate workflow 失败)
- `manage-skills` / `minimax-music-gen` / `minimax-video-gen` /
`skill-creator` / `web-access`:`en-US.source_hash` 重新计算为当前 zh-CN source
实际 hash;`translated_by` 由 `ai:claude-opus-4-7` 改为 `human`
以锁定现有翻译不被自动重译覆盖。
- `markdown`:补正 `en-US.source_hash`(之前是占位 `sha256:0000000000000000`)。
- 这些 skill 的 `en-US` 翻译内容保持不变,仅修正元数据。

### scripts/i18n/translate.py 容错增强
- 413 Payload Too Large 时不再 retry(payload 不会变小,retry 浪费时间)。
- 主循环 catch RuntimeError,把单个 skill 的失败写入 `plan["errors"]` 后继续处理下一个
skill,避免一个大文件 fail 整个 workflow。
- `--check` 模式下 plans 含 errors 也 exit 1(之前仅看 needs_translation,broad
except 会把异常吃掉导致误报通过)。

## Test plan

- [x] `i18n-validate` 通过
- [x] `i18n-translate --check` 显示所有 skill `up-to-date` 或 `human-locked,
skipping`
- [x] CI 上 `validate` / `translate` / `wait-for-copilot-review` 全绿
- [ ] Copilot 评审 conversation 全部 resolve
- [ ] Squash merge

---------

Co-authored-by: yi-ge <a@wyr.me>
2026-05-13 12:57:25 +08:00

8.7 KiB
Raw Blame History

name, description, license, version, type, risk_level, status, disable-model-invocation, provider, tags, requires, metadata, market
name description license version type risk_level status disable-model-invocation provider tags requires metadata market
minimax-video-gen Use this skill when the user wants to generate videos using MiniMax's Hailuo model. Supports text-to-video, image-to-video, and subject reference. The API is asynchronous — submit a task, poll for status, then download. Use when 用户提到 生成视频、文生视频、AI 视频、创建视频、视频生成、 动画生成、MiniMax 视频、海螺、Hailuo、图片变视频、图生视频。 Complete terms in LICENSE.txt 1.2.2 procedural low enabled true minimax
media
video
generation
minimax
hailuo
tools
Bash
author updated_at i18n
desirecore 2026-04-25
default_locale source_locale locales zh-CN en-US
en-US zh-CN
zh-CN
en-US
name short_desc description body source_hash translated_by
MiniMax 文生视频 基于 MiniMax Hailuo 的文本/图片生成视频技能 Use this skill when the user wants to generate videos using MiniMax's Hailuo model. Supports text-to-video, image-to-video, and subject reference. The API is asynchronous — submit a task, poll for status, then download. Use when 用户提到 生成视频、文生视频、AI 视频、创建视频、视频生成、 动画生成、MiniMax 视频、海螺、Hailuo、图片变视频、图生视频。 ./SKILL.zh-CN.md sha256:57314c8d07d63585 human
name short_desc description body source_hash translated_by
MiniMax Video Generation Text/image-to-video skill powered by MiniMax Hailuo Use this skill when the user wants to generate videos using MiniMax's Hailuo model. Supports text-to-video, image-to-video, and subject reference. The API is asynchronous — submit a task, poll for status, then download. Use when the user mentions generating videos, text-to-video, AI video, creating videos, video generation, animation generation, MiniMax video, Hailuo, image-to-video. ./SKILL.md sha256:3b2855b9ff2d0ef1 human
icon category maintainer channel listed
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><rect x="3" y="3" width="18" height="18" rx="3" stroke="#AF52DE" stroke-width="1.5" fill="#AF52DE" fill-opacity="0.1"/><polygon points="10,7 18,12 10,17" fill="#AF52DE" fill-opacity="0.6" stroke="#AF52DE" stroke-width="1.2" stroke-linejoin="round"/></svg> media
name verified
DesireCore Official true
latest false

minimax-video-gen Skill

Mandatory Rules (violation will cause failure)

  1. Must use HTTPS to access agent-servicehttps://127.0.0.1:${PORT} with -k to skip certificate verification
  2. Use Bash curl throughout — do not use the HttpRequest tool or Python
  3. Polling interval is 10 seconds — use sleep 10 to wait

Full Execution Flow

Prerequisites

  • The user has already configured and enabled a MiniMax Provider (regular API or Token Plan) in Resource Manager → Compute and entered the API Key
  • agent-service is running

Core Concept: Three-Step Asynchronous Flow

MiniMax video generation uses an asynchronous task model:

  1. Submit task: POST to create a video generation task and receive a task_id
  2. Poll status: query the task status with task_id until status is "Success" or "Fail"
  3. Download video: use file_id to obtain the download URL

Model Selection and Fallback Strategy

Model Supported Modes Characteristics Use Case
MiniMax-Hailuo-2.3 Text-to-video + image-to-video Highest quality, default first choice Default when the user doesn't specify
MiniMax-Hailuo-2.3-fast Image-to-video only Fast, 50% lower cost Fallback when quota is insufficient in image-to-video scenarios

Fallback rules (mandatory):

  1. Use MiniMax-Hailuo-2.3 by default
  2. When text-to-video (T2V) quota is insufficient: MiniMax-Hailuo-2.3-fast does not support text-to-video and cannot be used as a fallback. Inform the user directly that the quota is insufficient and suggest waiting for the quota to reset or switching to another video generation service (such as Kling)
  3. When image-to-video (I2V) quota is insufficient: fall back to MiniMax-Hailuo-2.3-fast and inform the user "switched to the fast model for generation"
  4. If the user is doing image-to-video and explicitly requests fast generation, use MiniMax-Hailuo-2.3-fast directly

Step 1: Submit a Text-to-Video Task

PORT=$(cat ~/.desirecore/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "minimax",
    "serviceType": "video_gen",
    "endpoint": "/video_generation",
    "body": {
      "model": "MiniMax-Hailuo-2.3",
      "prompt": "Video content described by the user"
    },
    "responseType": "json"
  }'

Optional parameters (add to the body):

  • "duration": video length in seconds (6 or 10)
  • "resolution": "768P" or "1080P"

Extract data.task_id from the JSON response.

Step 1 (alternative): Image-to-Video

PORT=$(cat ~/.desirecore/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "minimax",
    "serviceType": "video_gen",
    "endpoint": "/video_generation",
    "body": {
      "model": "MiniMax-Hailuo-2.3",
      "prompt": "Describe the dynamic changes of the scene in the image",
      "first_frame_image": "https://image-URL"
    },
    "responseType": "json"
  }'

Step 2: Poll the Task Status

Call once every 10 seconds until status is "Success" or "Fail". Replace TASK_ID with the task_id returned in Step 1.

PORT=$(cat ~/.desirecore/agent-service.port)
TASK_ID="task_id returned from step 1"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
  -H "Content-Type: application/json" \
  -d "{
    \"provider\": \"minimax\",
    \"serviceType\": \"video_gen\",
    \"endpoint\": \"/query/video_generation?task_id=${TASK_ID}\",
    \"method\": \"GET\",
    \"responseType\": \"json\"
  }"

Polling response (in progress):

{
  "success": true,
  "data": {
    "task_id": "task_xxx",
    "status": "Processing",
    "file_id": ""
  }
}

Polling response (completed):

{
  "success": true,
  "data": {
    "task_id": "task_xxx",
    "status": "Success",
    "file_id": "file_xxx"
  }
}

Step 3: Get the Video Download URL

Replace FILE_ID with the file_id from the completed response in Step 2.

PORT=$(cat ~/.desirecore/agent-service.port)
FILE_ID="file_id returned from step 2"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
  -H "Content-Type: application/json" \
  -d "{
    \"provider\": \"minimax\",
    \"serviceType\": \"video_gen\",
    \"endpoint\": \"/files/retrieve?file_id=${FILE_ID}\",
    \"method\": \"GET\",
    \"responseType\": \"json\"
  }"

Extract data.file.download_url from the response.

Step 4: Download and Upload to media-store

The download URL is valid for 24 hours; you must download immediately and save it to the local media-store.

PORT=$(cat ~/.desirecore/agent-service.port)
VIDEO_URL="download_url obtained in step 3"
curl -sL "$VIDEO_URL" -o /tmp/minimax-video.mp4 && \
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \
  -F "file=@/tmp/minimax-video.mp4;type=video/mp4"

Extract the mediaId field from the JSON response.

Step 5: Display the Video Using the dc-media Protocol

Write Markdown image syntax directly in your reply (the frontend will automatically recognize the video extension and render a player):

![Video description](dc-media://replace-with-mediaId)

Error Handling

  • status: "Fail": video generation failed; explain to the user
  • success: false + error: "No matching provider found": No enabled MiniMax provider with video_gen service found
  • success: false + error: "API Key not configured": API Key has not been entered
  • Insufficient quota (errors related to statusCode: 429, insufficient_quota, balance): text-to-video cannot fall back (the Fast model does not support T2V); inform the user of insufficient quota; image-to-video can switch to MiniMax-Hailuo-2.3-fast and retry from Step 1
  • Polling exceeds 10 minutes without completion: inform the user that the task may have timed out

Notes

  • MiniMax video generation is asynchronous and typically takes 210 minutes
  • A polling interval of 10 seconds is recommended
  • The download URL is valid for 24 hours
  • If the user does not explicitly request otherwise, by default do not pass duration or resolution (use API defaults)