← Back to Skills Marketplace
zhangyuangao

magic-text2video

by zhangyuangao · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
305
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install magic-text2video
Description
Create a text-to-video job from user-provided copy. Submits to the remote video service via one API key.
README (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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install magic-text2video
  3. After installation, invoke the skill by name or use /magic-text2video
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug magic-text2video
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is magic-text2video?

Create a text-to-video job from user-provided copy. Submits to the remote video service via one API key. It is an AI Agent Skill for Claude Code / OpenClaw, with 305 downloads so far.

How do I install magic-text2video?

Run "/install magic-text2video" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is magic-text2video free?

Yes, magic-text2video is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does magic-text2video support?

magic-text2video is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created magic-text2video?

It is built and maintained by zhangyuangao (@zhangyuangao); the current version is v1.0.2.

💬 Comments