Brand Logo

How I Built an OpenClaw Skill for Miraflow (And What It Can Do)

26
Clap
Copy link
Katie Min

Written by

Katie Min

How I Built an OpenClaw Skill for Miraflow (And What It Can Do)

Learn how to build an OpenClaw skill for Miraflow to automate AI video and image creation. This guide explains how it works, key features, and how to generate content using simple natural language prompts instead of complex APIs.

How I Built an OpenClaw Skill for Miraflow (And What It Can Do)

AI tools are getting more powerful, but they often still require technical steps like API calls or command-line requests. If you’ve ever tried generating AI videos through an API, you know the process can feel slow and repetitive.

Recently, I built a Miraflow skill for OpenClaw that removes most of that friction. Instead of writing API commands, you can simply ask an AI agent to create videos or images for you.

In this post, I’ll explain what the skill does, how it works, and how it can help automate AI video creation with Miraflow.




What Is Miraflow?

Miraflow is an AI media platform that lets users create avatar videos, AI images, and other visual content just using simple prompts or scripts. Creators commonly use it for:

  • AI spokesperson videos
  • social media content
  • educational videos
  • marketing and product demos

The platform also provides a developer API, which allows developers to automate video and image generation.

However, APIs usually require manual requests, authentication, and reading documentation. That’s where the skill comes in.




What Is OpenClaw?

OpenClaw is a personal AI agent that runs locally on your computer. It can connect to apps like messaging platforms and perform tasks such as:

  • browsing the web
  • running code
  • managing files
  • calling APIs

One of its most useful features is skills.

Skills are small plugin packages that teach the AI agent how to perform new tasks. Once installed, the agent can understand requests and automatically run the correct workflow.

For example, a skill might allow the agent to:

  • generate videos
  • summarize documents
  • interact with an external API

My project adds Miraflow support as a skill, so the agent can create videos and images directly.




Why I Built a Miraflow Skill

Before building the skill, generating a Miraflow video meant doing something like:

  • opening the API documentation
  • writing a curl request
  • inserting an API key
  • sending the request manually

This works, but it’s not very natural.

I wanted something simpler, like telling an AI assistant:

“Create a video with the Aerin avatar saying welcome to my channel.”

With the skill installed, the AI agent can understand that request, call the Miraflow API, and generate the video automatically.




How the Skill Works

The Miraflow skill is mainly built around a file called SKILL.md.

This file acts as the instruction manual for the AI agent. Instead of traditional code, it explains when the skill should activate and what steps to follow.

The file includes three key sections.

1. Trigger Conditions

The skill activates when the user asks the agent to do things like:

  • generate an avatar video
  • list available avatars or voices
  • check video status
  • generate or edit an image

These descriptions help the AI agent recognize when to use the Miraflow workflows.




2. Rules and Guardrails

Because AI agents try to be helpful, they sometimes repeat actions automatically. That can cause problems when an API action costs credits.

To prevent this, the skill includes strict rules such as:

  • Never retry video creation automatically
  • Always confirm before creating a video
  • Only call certain endpoints once

These guardrails make the automation safer and more predictable.




3. Workflow Instructions

Each feature includes a step-by-step workflow.

For example, when a user asks the agent to generate a video, the agent:

  1. Reads the skill instructions
  2. Checks whether an avatar and voice were provided
  3. Lists available options if information is missing
  4. Confirms the final request with the user
  5. Calls the Miraflow API to create the video

Once the request is submitted, the API returns a job ID, which the agent can later use to check the rendering status.




Features of the Miraflow Skill

After installing the skill, OpenClaw can interact with several Miraflow features.

Avatar Video Generation

The agent can:

  • list available avatars
  • list available voices
  • create avatar videos with a script
  • support full-body animation (im2vid_full) for photo avatars
  • generate videos using either synthesized voice or uploaded audio

This makes it easy to create spokesperson-style AI videos with simple prompts.




Video Status and Downloads

Rendering AI videos usually takes time. The skill helps manage this process by allowing the agent to:

  • check the status of a rendering job
  • translate API responses into human-readable messages
  • retrieve the final video download link

The generated video can then be downloaded as an MP4 file directly to your computer.




AI Image Generation and Editing

The skill also supports Miraflow’s image tools.

The agent can:

  • generate images from text prompts
  • adjust image aspect ratios
  • edit existing images with new prompts
  • use inpainting to replace specific areas in an image

This makes the skill useful not just for video, but also for visual content creation.




Media Uploads

Some workflows require uploading files like audio or reference images.

Miraflow uses a three-step signed upload process:

  1. initialize upload
  2. upload the file to storage
  3. finalize the upload

The skill guides the AI agent through this process automatically.




Real Example Workflow

Here’s what happens when a user says:

“Create a video with the Aerin avatar saying hello world.”

The AI agent will:

  1. detect that the request involves Miraflow video generation
  2. open the Create Avatar Video workflow in the skill
  3. check for missing information (voice, avatar, script)
  4. ask the user for confirmation
  5. send the request to the Miraflow API

Once the request is submitted, the agent stores the job ID so it can later check the status or retrieve the video.




What I Learned Building the Skill

One of the most interesting things about building this skill is that it’s not traditional programming.

Instead of writing logic in a programming language, you’re writing instructions for an AI model.

The challenge is finding the right balance:

  • too vague → the agent might make mistakes
  • too strict → the agent can’t handle unexpected situations

Writing clear rules and workflows is what makes the system reliable.




Final Thoughts

AI video platforms like Miraflow are powerful, but APIs can still be difficult for everyday users.

By connecting Miraflow to an AI agent through an OpenClaw skill, it becomes possible to generate videos and images using simple natural language commands.

Instead of writing API requests, you can just ask your AI assistant to create content.

If you’re experimenting with AI video generation, automation, or AI agents, building skills like this can open up a lot of possibilities.