Meitu Cutout logo

Meitu Cutout

Organization
meitu
meitu-cutout

使用 meitu-cli 为人物、宠物、商品、图标或印章抠图,分离前景主体并生成透明背景 PNG。当用户针对上述五类主体提到抠图、去背景、透明背景、背景移除、cutout、remove background、提取主体时触发;白底隔离和其他主体类型不支持。

Overview

Publishermeitu
Repositorymeitu-skills
Skill namemeitu-cutout
Stars
36
Forks
3
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by meitu on GitHub. Read the source before you install it.

Installation

Install the Meitu Cutout AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/meitu/meitu-skills/tree/main/skills/meitu-cutout
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/meitu/meitu-skills.git /tmp/meitu-skills
mkdir -p .claude/skills
cp -r /tmp/meitu-skills/skills/meitu-cutout .claude/skills/meitu-cutout
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Meitu Cutout in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Meitu Cutout on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Meitu Cutout is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Meitu Cutout

Overview

调用 meitu image-cutout 从图片中分离前景主体,输出透明背景 PNG。仅支持人物、宠物、商品、图标、印章五类主体;可选人像、商品、图形三种模型,也可省略模型参数自动检测。

Dependencies

  • meitu-cli: npm install -g meitu-cli@latest
  • 凭证: 首选 env vars MEITU_OPENAPI_ACCESS_KEY / MEITU_OPENAPI_SECRET_KEY,或预置 ~/.meitu/credentials.json;仅在用户明确要求写入本地凭证时,再执行 meitu config set-ak --value "..." / meitu config set-sk --value "..."

路径别名: 下文中 $VISUAL = {OPENCLAW_HOME}/workspace/visual/

Core Workflow

Preflight → [Context: 跳过(工具型抠图,无创意自由度)] → Execute → Deliver

Preflight

  1. meitu --version → 未安装则提示 npm install -g meitu-cli@latest
  2. meitu auth verify --json → 凭证无效则引导配置
  3. Detect mode: cwd has openclaw.yaml → project mode; else → one-off 检查 $VISUAL 目录 → 确定 capabilities
  4. output_dir 解析(Preflight 内 MUST 完成): Resolve output_dir: openclaw.yaml → ./output/ | else → $VISUAL/output/meitu-cutout/ mkdir -p {output_dir}

Execute

输入解析

用户提供图片,支持两种形式:

  • 本地文件路径(如 ./photo.jpg)
  • 图片 URL(如 https://example.com/photo.jpg)

如果用户只说"帮我抠图"但没给图片 → 问:"请提供需要抠图的图片(本地路径或 URL)"。

模型选择

图片主体model_type输出
人像、证件照、半身照0透明底 PNG,保留发丝细节
商品、产品、电商图1透明底 PNG,优化产品边缘
设计素材、图标、印章2透明底 PNG
宠物或类型不确定省略服务端自动选择模型,输出透明底 PNG

model_type 仅允许 0、1、2。建筑、植物、车辆、食物、家具等非五类主体以及白底隔离不受支持,不得通过 prompt 或替代 API 绕过限制;需要生成白底时改用 image-edit。

工具调用

单张抠图:

bash
meitu image-cutout --image_url {image_url_or_path} --json --download-dir {output_dir} --skill_name skill_meitu-cutout

明确指定模型时追加 --model_type 0、--model_type 1 或 --model_type 2;省略时自动选型。

批量处理

批量处理整个目录:

bash
meitu batch image-cutout --input-dir {input_dir} --output-dir {output_dir} --skill_name skill_meitu-cutout

整个批次共用固定模型时追加 --model-type 0、--model-type 1 或 --model-type 2。逐条指定时使用 JSON/YAML 配置,条目字段 modelType(兼容 model_type)映射到单次命令的 model_type。批处理默认并发数为 3,输出 .png。

注意:单次命令不支持 --image_list;输入参数只接 --image_url(别名 --image)。

结果检查

解析 --json 输出:

  • ok: true → 成功,downloaded_files[0].saved_path 为本地已下载的结果 PNG(透明背景);若未使用 --download-dir,则取 media_urls[0]
  • ok: false → 检查 code 和 hint

错误降级

级别动作说明
L1调整模型选择自动检测不准时,根据主体改用 --model_type 0、1 或 2
L2检查图片格式/大小确保图片可访问且非损坏
L3停止并报错2 次连续失败后,输出 code + hint

非五类主体或白底隔离直接返回不支持,不调用、不重试。

特殊错误:

  • ORDER_REQUIRED → 提示用户充值,展示 action_url
  • CREDENTIALS_MISSING → 提示配置 AK/SK

Deliver

直接使用 Preflight 解析的 output_dir。

mv {file} {output_dir}/{date}_{name}_cutout.png

Output

  • 格式: PNG(透明背景)
  • 命名: {YYYY-MM-DD}_{descriptive-name}_cutout.png
    • 例: 2026-03-23_product-photo_cutout.png
  • 位置: 由 Deliver 步骤决定(项目 → ./output/,一次性 → $VISUAL/output/meitu-cutout/)

Frequently asked questions

What does the Meitu Cutout AI skill do?

使用 meitu-cli 为人物、宠物、商品、图标或印章抠图,分离前景主体并生成透明背景 PNG。当用户针对上述五类主体提到抠图、去背景、透明背景、背景移除、cutout、remove background、提取主体时触发;白底隔离和其他主体类型不支持。

Why use Meitu Cutout on TypingMind?

Because you install it once and use it with any model. Meitu Cutout is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Meitu Cutout in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/meitu/meitu-skills/tree/main/skills/meitu-cutout. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Meitu Cutout?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Meitu Cutout?

As many as you like. As long as a model supports skills, you can use Meitu Cutout with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Meitu Cutout AI skill free?

Yes. It is published on GitHub by meitu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇