← 返回 Skills 市场
zhangyuangao

magic-text2video

作者 zhangyuangao · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
305
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install magic-text2video
功能描述
Create a text-to-video job from user-provided copy. Submits to the remote video service via one API key.
使用说明 (SKILL.md)

Text to Video Skill

Create a video generation task from text. The job is submitted immediately; Polling to obtain task status and video URL.

When to Use

USE this skill when:

  • "把这段文字生成视频"
  • "帮我把这段文案做成视频"
  • "用这段文字生成一个视频"
  • User provides a script or paragraph and asks to turn it into video

When NOT to Use

DON'T use this skill when:

  • User asks for video editing, trimming, or effects → use video-editing tools
  • User asks for screen recording or capture → use recording tools
  • User asks only for video status of an existing job → explain where to find files instead

Prerequisites

export MAGIC_API_KEY="your-key"

MAGIC_API_KEY is required by the remote video service client.


Overall Flow (Agent Guidance)

  1. Extract the full text from the user's message, denoted as TEXT (i.e., the script to be used for video generation).
  2. Use the video-create subcommand to create a task, read the JSON from stdout, and extract the task_id.
  3. Explicitly inform the user of the task_id in the chat (optionally include the original JSON output for debugging).
  4. Use the video-wait subcommand with the task_id as --task-id, polling until successful.
  5. video-wait 的 stdout 中提取 video_url.
  6. Explicitly inform the user of the final video_url in the chat (you may also include the original output).

Python Client (Step-by-step with Chat Output)

Step 1: Create a video task and print the task_id to the chat

  1. Extract the text the user wants to generate a video from and assign it to TEXT.

    • If the text contains double quotes ", properly escape them before constructing the command (for example, by replacing " with \") to avoid shell parsing errors.
  2. Run the following command (executed by the agent/tool; {baseDir} will be replaced with the Skill directory):

python3 {baseDir}/scripts/media_gen_client.py video-create \
  --text  "TEXT"
  1. Read the stdout from this command. The expected output will be JSON, for example:
   {
    "biz_code": 10000,
    "msg": "Success",
    "data": {
        "task_id": "2032443088023777280"
    },
    "trace_id": "664c6e22-1edd-11f1-bf4c-8262dce7d13f"
  }
  1. Parse the task_id from stdout (e.g., "abc-123"), and inform the user in the chat: "A text-to-video task has been created, task_id: abc-123. I will keep polling for the task status, and send you the video URL once it is ready."

Step 2: Poll the task until success and output video_url in the chat

  1. Use the task_id obtained in the previous step and refer to it as task_id.

  2. Run the following command to poll the task status (check every 10 seconds and wait up to 600 seconds); if it times out, wait a while and retry:

python3 {baseDir}/scripts/media_gen_client.py video-wait --task-id YOUR_TASK_ID --poll 10 --timeout 600
  1. Read the stdout from this command. When the task succeeds, the script should output information including the video_url, for example:
   {
    "biz_code": 10000,
    "msg": "Success",
    "data": {
        "task_id": "1234567890",
        "task_status": 2,
        "video_url": "https://www.magiclight.com/examplevideo.mp4"
    },
    "trace_id": "c89aeca8-1edd-11f1-bf4c-8262dce7d13f"
}
  1. Parse the key fields from stdout:
  • status (e.g., 2)
  • video_url (e.g., "https://example.com/path/to/video.mp4")
  1. In the chat, respond to the user as follows:
  • Optionally (but recommended for debugging), first display the full JSON output inside a code block.
  • Then summarize the key information in natural language, for example:

    "Task completed ✅ task_id: abc-123 Video URL: https://example.com/path/to/video.mp4"

  1. If the stdout indicates that the task failed or timed out (for example, if the status is "failed" or there is no video_url):
  • Explain the reason for failure in the chat (include any error message, if available).
  • Inform the user that they can retry later, or check their input, quota, etc.

Expected Script Output Contract

  • The agent must always:
    • Parse the stdout JSON.
    • Clearly communicate the task_id and video_url to the user in the chat.
    • If necessary, optionally display the raw JSON output in a code block.
安全使用建议
This skill appears to be what it says (text→video) and only needs MAGIC_API_KEY, but the included Python client disables TLS certificate verification and calls an unfamiliar host (https://open-test.magiclight.ai). That means your API key and request/response data could be exposed to a man-in-the-middle if an attacker controls network traffic or the host. Before installing: (1) prefer an official, documented API endpoint and confirm the service identity; (2) review or request a version of the client that does not disable certificate verification; (3) only provide a scoped/replaceable API key (not a long-lived high-privilege key) and rotate it after testing; (4) consider running the skill in an isolated environment until you trust the endpoint. If you cannot validate the endpoint and the TLS behavior, treat this skill as risky.
功能分析
Type: OpenClaw Skill Name: magic-text2video Version: 1.0.2 The skill bundle provides a client for a text-to-video service, but it contains a significant security vulnerability: the script `scripts/media_gen_client.py` explicitly disables SSL certificate verification (`ssl.CERT_NONE`). This allows for potential Man-in-the-Middle (MITM) attacks that could compromise the `MAGIC_API_KEY` or user data. While the behavior aligns with the stated purpose of interacting with the `https://open-test.magiclight.ai` endpoint, the inclusion of insecure network practices warrants a suspicious classification.
能力评估
Purpose & Capability
Name, description, required binary (python), and the single required env var (MAGIC_API_KEY) align with a text-to-video client that submits jobs to a remote service.
Instruction Scope
The SKILL.md instructs the agent to run the included Python client and to print raw JSON output to the chat (which may include internal trace info). The client makes network calls to an external service and the instructions require no additional system data — that's expected — but the script itself disables TLS verification (ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE), which makes the network communication susceptible to MITM and potential API key exfiltration.
Install Mechanism
No install spec or remote downloads; this is an instruction-only skill with one bundled Python script. Nothing is written to disk beyond the included file.
Credentials
Only MAGIC_API_KEY is required and is appropriate for an API-backed video-generation service. No unrelated credentials or config paths are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated persistence or modify other skills or system settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install magic-text2video
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /magic-text2video 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Changed references from job_id to task_id throughout the documentation for consistency with actual API responses. - Updated JSON examples in the README to match the latest script output format, including fields like biz_code, msg, data, and trace_id. - Clarified the structure for parsing responses and communicating task_id and video_url to the user. - No changes to core logic or user-visible commands.
v1.0.1
magic-text2video 1.0.1 - Added _meta.json file for metadata support. - Updated scripts/media_gen_client.py (details not specified). - No user-facing changes to usage or interface.
v1.0.0
Initial release of the magic-text2video skill. - Allows users to generate a video from user-provided text by submitting a job to a remote video service. - Requires a MAGIC_API_KEY environment variable for authentication. - Clearly communicates job_id when the task is created, and provides the final video URL when completed. - Provides guidance on error handling, expected outputs, and when (or not) to use this skill. - Includes detailed step-by-step instructions for both creating video jobs and polling their status.
元数据
Slug magic-text2video
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

magic-text2video 是什么?

Create a text-to-video job from user-provided copy. Submits to the remote video service via one API key. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 305 次。

如何安装 magic-text2video?

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

magic-text2video 是免费的吗?

是的,magic-text2video 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

magic-text2video 支持哪些平台?

magic-text2video 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 magic-text2video?

由 zhangyuangao(@zhangyuangao)开发并维护,当前版本 v1.0.2。

💬 留言讨论