← Back to Skills Marketplace
zhangyuangao

magic-image2video

by zhangyuangao · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
254
Downloads
2
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install magic-image2video
Description
Generate a video task based on user-provided text and images (supports image URLs and local file paths), and submit it to a remote video service using an API...
README (SKILL.md)

Text and Image to Video Skill

Create a video generation task based on provided text content and images. The task is submitted immediately; the system will automatically poll the task status and retrieve the video link.

Usage Scenarios

Recommended for these situations:

  • "Turn this image into a video as I describe"
  • "Please help me make a video from this image according to my requirements"
  • "Use this image to generate a video as requested"
  • "Generate a video based on text and an image"

Not for These Scenarios

Do not use for the following cases:

  • The user asks for video editing, trimming, or adding special effects → Please use a video editing tool
  • The user requests screen recording or capture → Please use a screen recording tool
  • The user only wants to check the progress of an existing video task → Please guide them to check in the related file or system

Prerequisites

export MAGIC_API_KEY="your-key"

MAGIC_API_KEY is the required environment variable for the remote video service client.


Overall Workflow (Agent Guide)

  1. Extract the full text (TEXT) and image address or path (IMAGE) from the user's message.
  2. Use the video-create subcommand to create the task, read the stdout JSON output, and extract the task_id.
  3. Clearly inform the user of the task_id in the chat by outputting "Video generation task has been created, task ID: task_id. I will keep checking the task status and inform you when the video link is ready."
  4. Use the video-wait subcommand with --task-id to poll the task until completion. Task status equal to 2 means success.
  5. Extract the video_url from the video-wait command's stdout.
  6. Clearly inform the user of the final video link video_url in the chat. If timeout occurs, report it as well.

Python Client (Step-by-Step Example & Chat Output)

Step 1: Create the Video Task and Show the task_id in Chat

  1. Obtain the desired video text from the user and store it in TEXT; get the image address and store it in IMAGE.

    • If the text contains double quotes ", be sure to escape them (e.g., replace " with \") to prevent command parsing errors.
  2. Run the following command (invoked by the agent tool; {baseDir} will be replaced with the skill directory):

python3 {baseDir}/scripts/media_gen_client.py video-create \
  --text  "TEXT" --image "IMAGE"
  1. Read the command's standard output (stdout), which is 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 the JSON (e.g. "abc-123"), and inform the user in the chat:
  • Output: "Video generation task has been created, task ID: task_id. I will keep checking the task status and inform you when the video link is ready."

Step 2: Poll Task Status and Output the Final video_url in Chat

  1. Use the task_id obtained in the previous step.

  2. Execute this command (poll every 10 seconds, wait up to 600 seconds; if timeout, please try again later):

python3 {baseDir}/scripts/media_gen_client.py video-wait --task-id YOUR_TASK_ID --poll 10 --timeout 600
  1. Read the standard output. On success, the JSON output looks like:
   {
    "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 the output:
  • Task status (e.g., task_status: 2), where status 2 means success
  • Video link (e.g., video_url: "https://example.com/path/to/video.mp4")
  1. Recommended chat reply flow:
  1. If the result shows task failure or timeout (e.g., success is false, video_url is empty, or error is timeout):
  • Explain the failure reason (include error info if possible), and inform the user they can retry later or check possible issues like input or quota.

Script Output Requirements

  • The agent must always:
    • Parse stdout JSON.
    • Clearly inform the user of both the task ID and video link in the chat.
Usage Guidance
This skill appears to be what it says: it will use your MAGIC_API_KEY and the bundled Python script to submit text and images to https://open-test.magiclight.ai, upload any local image files you provide, and poll for the resulting video link. Before installing or invoking it: - Only provide images you are comfortable having uploaded to a third-party service (local files will be transmitted). - Confirm you trust the endpoint (open-test.magiclight.ai) and that your MAGIC_API_KEY is intended for use with that service; treat the key like a password and rotate it if you later suspect misuse. - Provide only public image URLs; avoid giving internal or localhost URLs (the client will fetch them), to reduce SSRF/exfiltration risk. - Ensure the Python runtime has required packages (certifi is imported) or run in an isolated/test environment first. - If you do not trust the skill source or endpoint, do not supply sensitive images or credentials; consider running the script manually in a controlled environment to observe behavior.
Capability Analysis
Type: OpenClaw Skill Name: magic-image2video Version: 1.0.1 The skill is a functional integration for a video generation service (magiclight.ai). It provides a Python client that allows an AI agent to submit text and images (either via URL or local file path) to a remote API. The code uses standard libraries (urllib) and follows a logical workflow for file uploads and task polling. The instructions in SKILL.md specifically advise the agent to escape quotes to prevent command parsing errors, which indicates a focus on reliability rather than exploitation. No evidence of malicious intent, data exfiltration, or unauthorized access was found.
Capability Assessment
Purpose & Capability
Name/description ask for text+image→video submission; the included Python script calls a remote API (BASE_URL https://open-test.magiclight.ai) to create tasks, upload local images, and poll for results. Required binary (python) and env var (MAGIC_API_KEY) are appropriate for this functionality.
Instruction Scope
SKILL.md instructs the agent to extract TEXT and IMAGE from the user, run the provided script's video-create/video-wait commands, parse JSON stdout, and report task_id/video_url. This stays within the stated purpose. Important note: the skill explicitly supports local file paths and will upload local image files to the remote service — that means local files may be transmitted off-host, which is expected behavior but privacy-relevant.
Install Mechanism
There is no install spec (instruction-only with a bundled script). No remote downloads or archive extraction occur. One minor inconsistency: the script imports 'certifi' (a Python package) but the skill does not declare Python package dependencies; ensure the runtime environment has certifi (or install it) before running.
Credentials
The only required environment variable is MAGIC_API_KEY, which the client uses in an Authorization header to contact the remote service — this is proportionate. No unrelated credentials or extra environment access are requested. Reminder: providing the API key grants the skill ability to act on behalf of that key at the configured BASE_URL.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system config, and is user-invocable. It does network I/O and file uploads, but no elevated or persistent platform privileges are requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install magic-image2video
  3. After installation, invoke the skill by name or use /magic-image2video
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Added English-language documentation and usage instructions, replacing the original Chinese content. - Clarified workflow steps and required agent outputs for task creation and video retrieval. - Updated examples and reply templates to English for consistency. - No code logic changes; the update is documentation-focused.
v1.0.0
- Initial release: create videos from user-supplied text and images via a remote video service. - Supports both image URLs and local image paths. - Guides agents to extract input, create a video task, inform the user of the task ID, and poll for completion. - Outputs the resulting video link and clearly communicates task progress and final results to users. - Requires a MAGIC_API_KEY environment variable for authentication.
Metadata
Slug magic-image2video
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is magic-image2video?

Generate a video task based on user-provided text and images (supports image URLs and local file paths), and submit it to a remote video service using an API... It is an AI Agent Skill for Claude Code / OpenClaw, with 254 downloads so far.

How do I install magic-image2video?

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

Is magic-image2video free?

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

Which platforms does magic-image2video support?

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

Who created magic-image2video?

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

💬 Comments