Skip to main content Skills Marktplatz Entdecken und erkunden Sie KI-Skills, die von der Community erstellt wurden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Prompt kopierenPrompt-Details anzeigen Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
npx skills add https://github.com/meitu/meitu-skills --skill meitu-image-fixDer Befehl bleibt in einer Zeile. Scrollen Sie horizontal, um ihn vor dem Kopieren vollständig zu prüfen.
Sie bevorzugen eine lokale Kopie? Laden Sie die Dateien herunter, die SkillsMP derzeit vorliegen.
ZIP herunterladen Herunterladen... Mehr aus diesem Repository
name meitu-image-fix description 自动诊断单张已有图片的画质、人像和内容问题,并按最优顺序串联 image-superres-enhance/image-edit/image-cutout 做综合修复。仅当用户明确要对同一张图做一键综合修复、说不清该用哪个单项工具,或同时提出两个及以上修复诉求时触发;单一明确诉求如仅去水印、仅去背景、仅美颜、仅超清不单独触发。 version 1.0.0 metadata {"openclaw":{"requires":{"bins":"[Truncated]","env":"[Truncated]","paths":"[Truncated]"},"primaryEnv":"MEITU_OPENAPI_ACCESS_KEY","security":{"dataFlow":"Inputs, selected local context, and generated prompts may be sent to Meitu OpenAPI when used by the workflow.","credentials":"Credentials are used only for CLI authentication and must not be disclosed.","persistence":"Record workflows may access declared project and visual memory/rules files."}}} security {"credential_use":"Uses Meitu OpenAPI credentials from env or ~/.meitu/credentials.json for CLI calls; credentials must not be echoed, logged, or embedded in prompts.","remote_processing":"Input images, repair instructions, intermediate URLs, and generated prompts may be sent to Meitu OpenAPI.","persistence":"Project mode may write output files and may update project or visual-memory files according to the Record workflow."} requirements {"credentials":[{"name":"MEITU_OPENAPI_ACCESS_KEY","source":"env | ~/.meitu/credentials.json"},{"name":"MEITU_OPENAPI_SECRET_KEY","source":"env | ~/.meitu/credentials.json"}],"permissions":[{"type":"file_read","paths":"[Truncated]"},{"type":"file_write","paths":"[Truncated]"},{"type":"exec","commands":"[Truncated]"}]}
Meitu Image Fix
Overview
接收一张有问题的图片,自动诊断画质/人像/内容三类问题,规划最优修复管线,按顺序调用 meitu-cli 工具链完成修复。核心价值是诊断+串联 ——用户不需要知道该用哪个工具,只需要说"帮我修一下"。
Dependencies
meitu-cli (>=2.0.6): npm install -g meitu-cli@latest
凭证 : 首选 env MEITU_OPENAPI_ACCESS_KEY / MEITU_OPENAPI_SECRET_KEY,或预置 ~/.meitu/credentials.json;仅在用户明确要求写入本地凭证时,再执行 meitu config set-ak / meitu config set-sk
路径别名: 下文中 $VISUAL = {OPENCLAW_HOME}/workspace/visual/
Core Workflow
Preflight → [Context: 跳过] → Execute (诊断 → 规划 → 逐步执行) → Deliver
↑ 工具型 skill,无创意上下文需求,始终跳过 Context
Preflight
meitu --version → 未安装则提示 npm install -g meitu-cli@latest
meitu auth verify --json → 凭证无效则引导配置
Detect mode: cwd has openclaw.yaml → project mode; else → one-off
can_record = cwd 有 openclaw.yaml AND $VISUAL 存在(两者缺一即 false)
Resolve output_dir: openclaw.yaml → ./output/ | else → $VISUAL/output/meitu-image-fix/
mkdir -p {output_dir}
Context
工具型 skill,无创意上下文需求,始终跳过 Context,直接到 Execute。
Execute
诊断:看图 + 听用户
从两个信息源判断问题:
视觉分析 (用 Read 工具读取图片,多模态识别问题):
观察到的现象 标记 分辨率低 / 明显模糊 / 压缩锯齿 / 噪点多 quality:blur可见水印 / 半透明文字叠印 content:watermark画面中有不属于主体的路人/杂物 content:unwanted-object文字内容有错别字 content:text-error背景有瑕疵(杂乱/破损/穿帮) content:bg-flaw人脸可见 + 肤质粗糙/暗沉/痘印明显 portrait:skin人脸可见 + 五官可优化 portrait:feature
(用户说的话直接映射到标签):
用户意图解析
用户表述 标记 "变清晰""超清""高清""模糊""画质差""老照片" quality:blur"去水印""水印" content:watermark"去掉路人""去杂物""消除 XX" content:unwanted-object"改文字""改错字""把 X 改成 Y" content:text-error"背景修干净""背景杂乱" content:bg-flaw"磨皮""美颜""祛痘""提亮""皮肤" portrait:skin"变精致""五官调整" portrait:feature"去背景""抠图""透明背景" cutout"修一下""帮我处理一下"(模糊指令) 完全依赖视觉分析
Phase 1: image-superres-enhance 先提升画质,后续操作在清晰图上效果更好
Phase 2: image-edit / cutout 内容修复在高清底图上精度更高
Phase 3: image-edit(gummy_pro) 人像精修放最后,避免被前面步骤的重编码破坏
问题标签 Phase 工具 命令 quality:blur1 image-superres-enhance meitu image-superres-enhancecontent:watermark2 image-edit meitu image-edit --model praline_procontent:unwanted-object2 image-edit meitu image-edit --model praline_procontent:text-error2 image-edit meitu image-edit --model praline_procontent:bg-flaw2 image-edit meitu image-edit --model praline_procutout2 image-cutout meitu image-cutoutportrait:skin3 portrait-retouch meitu image-edit --model gummy_proportrait:feature3 portrait-retouch meitu image-edit --model gummy_pro
Phase 2 内有多个 edit 操作时,逐条串行执行(每条用上一步输出的 URL)。
cutout 与其他 Phase 2 操作共存时:先 edit 再 cutout(去背景应在内容修好之后)。
诊断结果:图片模糊 + 有水印 + 人脸肤质粗糙
修复计划:① 超清 → ② 去水印 → ③ 自然美颜
确认开始?
用户只提了单一问题且诊断无歧义 → 跳过确认,直接执行。
链式调用机制:
每步加 --json,解析返回 JSON 的 media_urls[0] 作为下一步的 --image_list 输入。仅最后一步加 --download-dir {output_dir} 保存到本地。加了 --download-dir 后,JSON 输出会多一个 downloaded_files 数组,直接取 downloaded_files[0].saved_path 获取下载文件的完整路径,Deliver 阶段再 rename。
URL 传递 fallback :如果下一步用 media_urls[0] 作为 --image_list 输入失败(UPLOAD_ERROR),先下载到系统临时目录再用本地路径重试:
curl -sL -o /tmp/meitu-fix-step{N}.{ext} {url}
meitu <command > --image_list /tmp/meitu-fix-step{N}.{ext} ...
中间文件必须 存放在 /tmp/ 或系统临时目录,禁止 存入 skill 文件夹或源文件所在目录。管线完成后清理:rm -f /tmp/meitu-fix-step*.{ext}。
Phase 1: 超清 — image-superres-enhance
主体类型 --prompt判断依据 人像为主 portrait photo人脸是视觉焦点 商品/物品 e-commerce product image产品、食物、实物特写 图形/截图 text document or UI screenshotUI 截图、文字图、插画、图标 不确定 general image无法判断时的默认描述
meitu image-superres-enhance --image_url {input} --prompt "{content_description}" --json --skill_name skill_meitu-image-fix
解析:ok: true → media_urls[0] 传入下一步。
ok: false → 记录错误,用原图继续 后续步骤(upscale 失败不阻塞管线)。
Phase 2: 内容修复 — image-edit / image-cutout
每个 content 问题对应一条 edit 指令,逐条串行:
问题 --prompt 示例 注意 水印 "去除图片中的水印"水印面积大可能需要 2 轮 路人/杂物 "消除画面中的路人" / "去掉右下角的杂物"描述具体位置效果更好 文字错误 "将文字'XXX'改为'YYY'"指明原文和改后文 背景瑕疵 "修复背景中的破损区域"描述具体区域
meitu image-edit --image_list {prev_url} --prompt "{instruction}" --model praline_pro --json --skill_name skill_meitu-image-fix
meitu image-cutout --image_url {prev_url} --json --skill_name skill_meitu-image-fix
仅人物、宠物、商品、图标、印章可执行该步骤;明确知道主体模型时可追加 --model_type 0、--model_type 1 或 --model_type 2,否则省略并自动选型。
Phase 3: 人像精修 — image-edit(gummy_pro)
meitu image-edit --image_list {prev_url} --prompt "{portrait_retouch_prompt}" --model gummy_pro --json --skill_name skill_meitu-image-fix
用户诉求 portrait_retouch_prompt自然修饰 / 轻微瑕疵 / 日常照 natural portrait retouch, improve skin texture and facial details, keep facial structure unchanged明确要求强效 / 瑕疵严重 / 商业用途 strong but realistic portrait retouch, smoother skin and cleaner facial details, keep facial structure unchanged未明确说明 默认使用自然修饰 prompt
约束 :portrait retouch 仅适用于真实单人肖像 。以下情况跳过此步骤并告知用户:
多人图片
非真实人像(卡通、插画、简笔画、AI 绘图风格)
人脸过小或不清晰
同时有 portrait:skin 和 portrait:feature → 一次 image-edit --model gummy_pro 即可覆盖(不需要调两次)。
最后一步下载: 管线最后一个命令加 --download-dir {output_dir},直接保存结果文件到本地。
L1: 简化 prompt — 移除修饰语,保留核心指令(edit 步骤适用)
L2: 省略可选参数 — 如裁剪掉非必要修饰,让服务端按默认路由处理
L3: 跳过当前步骤 — 用上一步结果继续后续管线
L4: 连续 2 步失败 → 停止管线,将最后一个成功步骤的结果下载到 {output_dir} 交付,并说明哪些步骤未完成
L5: 首步即失败 → 检查凭证/余额,报错含 code + hint
ORDER_REQUIRED → 提示用户充值,提供 action_url
CREDENTIALS_MISSING → 提示配置 AK/SK
Deliver output_dir 已在 Preflight 预解析,Execute 最后一步的 --download-dir 已直接写入该目录,Deliver 仅做 rename。
mv {output_dir}/{task_id_file} {output_dir}/{date}_{effect}.{ext}
Record(项目模式 MUST / 一次性模式跳过) can_record = cwd 有 openclaw.yaml AND $VISUAL 存在(两者缺一即 false)→ false 时跳过。一次性模式下反馈仅当前对话有效。
User approved style →
read $VISUAL/memory/observations/observations.yaml → scan similar key → merge or append → write back. len(projects) >= 2 → propose promotion (non-blocking)
→ 非阻塞提议晋升(在回复末尾提及:"你在 N 个项目中都偏好 X,要保存吗?")→ confirmed → write target + delete observation
User rejected ("不要 XX") →
has openclaw.yaml → ask scope → project: DESIGN.md Constraints / universal: quality.yaml(需用户确认)
no openclaw.yaml → current task only
No feedback → skip entirely(不读 observations.yaml,zero overhead)。
Output
格式 :与输入一致(jpg→jpg, png→png),cutout 输出 png(含透明通道)
命名 :{date}_{修复摘要}.{ext}
单一修复:2026-03-23_upscale.jpg
串联修复:2026-03-23_upscale+remove-watermark+beauty.jpg
位置 :由 Deliver 步骤决定
Boundaries 本 skill 只做修复 ——让一张已有的图变得更好。不做创作类任务:
不做 转交 风格转绘(变漫画/油画/3D) image-style-transfer(或经 meitu-tools 直调)换背景/换场景(创意替换) image-background-replace 或 meitu-visual-me 的背景替换工作流海报排版/加文字布局 meitu-posterAI 写真/人像生成 image-portrait-generate 或 meitu-visual-me
边界判断 :用户意图是"修好这张图的问题" → 本 skill。用户意图是"把这张图变成另一种东西" → 告知用户并建议对应 skill。