{baseDir}placeholder. Every CLI command in this file uses{baseDir}/scripts/.... The host (skill loader) substitutes{baseDir}with this skill's installation directory at load time. If your host does not expand placeholders, replace{baseDir}with the absolute path to this skill folder, or run from inside the skill folder usingscripts/....
Activate whenever the user requests modifications, enhancements, or artistic changes to a photo / image (path, URL, or attachment).
Trigger keywords: "make me look better", "change my clothes", "fix this blurry photo", "make me smile", "enhance my body", "change my hair color / style", "add a filter", "cosplay", "outfit change", "upscale", "virtual try-on".
--task values)#The CLI --task value is always one of the effect KEYs below. Per-key
algorithm params are returned inline by POST /skill/consume.json
( invoke_spec) — never hard-code AIGC paths. If the server returns
Unknown invoke preset, the key is not in the tenant's invoke map; do not
invent params, check config or admin.
All KEYs operate on still images ( .jpg / .jpeg / .png / .webp). The current catalog is image-only; the async / video flow
is reserved — see docs/video-reserved.md.
When: user explicitly asks to enhance, enlarge, or reshape breast or buttocks.
Tier rule: append _strong / _medium / _weak to the base KEY.
Default tier: _medium (e.g. breast_natural_medium).
KEY (base)Descriptionbreast_naturalNatural fullness; subtle lift.breast_teardropTeardrop contour, fuller lower pole.breast_roundRounded, lifted look with upward emphasis.breast_outwardEditorial spread with outward emphasis.butt_peachLift and side volume for a peach shape.butt_o_shapeSmooth, continuous curve, even side profile.
When: new hair color or new hairstyle.
KEYDescriptionhair_blackDeep black shine; natural look.hair_blondeClassic golden blonde.hair_brown_highlightsBrown with highlights for dimension.hair_platinumSoft creamy platinum.hair_silver_platinumCool metallic silver; edgy modern look.hair_teddy_brownWarm soft brown; youthful vibe.hair_glossyExtra shine and sleek fall.hair_high_layerLight layers and airy volume.hair_soft_wavesRomantic large waves.hair_latino_curlsTight curls, maximum volume.
When: user asks to change clothes, try on different styles, or dress up for a specific occasion / cosplay.
Formal / Evening
KEYDescriptiondress_yellow_gownVivid yellow silk evening gown.dress_arctic_allureRhinestone mesh gown with galaxy sparkle.dress_ostrich_featherEthereal feather gown.dress_muse_goddessCouture-heavy beaded goddess gown.suit_tartan_eveSmart, polished British tartan suit.suit_red_carpetClassic sharp black suit.
Vacation / Casual
KEYDescriptionaccessory_bunny_earPlayful bunny ear accessory.dress_butter_moonlightPale yellow slip dress; fresh light look.dress_pink_puffyTiered pink puff dress; sweet portrait style.dress_gold_hoodieUrban casual hoodie dress.dress_lace_corsetFrench-inspired lace corset set.dress_chiffon_cakeTiered chiffon maxi; relaxed vacation mood.dress_sheer_bikiniBikini under sheer cover; resort look.
Cosplay / Fantasy
KEYDescriptioncosplay_carnivalCarnival samba outfit with feather headpiece.cosplay_bunny_copNavy bunny police uniform.cosplay_fox_boyfriendGreen fox print shirt; relaxed vibe.cosplay_deer_girlForest fawn-inspired mini skirt.cosplay_grinchGreen fuzzy Grinch party costume.victoria_angelLingerie set with wings (runway showstopper).dallas_cowboyIconic blue-and-white cheerleader uniform.
Party / Futuristic
KEYDescriptionfloral_camisoleBotanical floral cami.puff_skirtStrapless puff corset dress.one_shoulder_lbdOne-shoulder little black dress.red_latexBold red latex mini skirt.moonlight_dressFull-rhinestone bodycon long gown.y3k_setFuturistic metallic Y3K co-ord.
Sports / Activewear
KEYDescriptionbrazilian_bikiniBrazilian-cut bikini.tennis_setSporty athletic-chic tennis skirt and top.cozy_fitRelaxed hoodie and jogger; urban athleisure.racing_suitBold motorsport racing driver suit.white_yogaMinimal white yoga set.
When: retouch / apply a makeup style, or change the subject's expression.
KEYDescriptionnatural_beautySoft natural enhancement; clear skin.glamour_beautyPolished, charismatic look with full makeup.sweet_beautyYouthful sweet-girl vibe.luminous_beautyRadiant glow; bright complexion.youthful_beautyFresh, energetic style.closed_smileGentle closed-lip smile.open_smileWide toothy grin.cool_expressionSerious, composed, edgy.winkSingle-eye wink.
When: image is blurry / noisy / old / low-resolution, or the user wants a camera vibe / lighting filter.
KEYDescriptionphoto_restoration_v3Denoise, deblur, reduce artifacts; keeps a natural look.ai_ultra_hd_v3Deep-learning upscale + detail recovery for old / small photos.tanning_filterWarm bronzed tan skin filter.ccd_flashVintage CCD-camera flash effect.film_flashFilm grain with flash overlay.fuji_flashFujifilm-style flash; soft grain, warm tones.
Use this table when the user's intent is broad or under-specified. Do not guess a wrong KEY.
SituationActionVague intent ("make this photo look better")Default to natural_beauty if a face is present, else photo_restoration_v3.User asks for retouch / makeup but did not pick a styleOffer 2–3 KEYs from §4 (e.g. natural_beauty, glamour_beauty, sweet_beauty).User says "change my hair / outfit / cosplay" without a styleAsk one question, or offer 2–3 KEYs from §2 / §3.Body reshape, no tier givenDefault to _medium, or briefly confirm before submit.User mentions video / motion / "make a video"No video keys exist today — see docs/video-reserved.md. Stay on still images.Ambiguous or missing attachmentAsk one clarifying question, or pull media from IM per docs/im-attachments.md.
python3 {baseDir}/scripts/beautyplus_ai.py run-task … (or the same
run-task embedded inside spawn-run-task → sessions_spawn for the
reserved video flow).wapi gateway or to
AIGC / invoke endpoints — that skips POST /skill/consume.json (quota and
permission) and breaks the supported pipeline. This skill does not emit
debug curl for API calls.query-task --task-id is for resuming polling on an existing
full task_id only; it does not replace run-task for a new
submission.run-task (including inside a sessions_spawn worker)
triggers server-side quota / credit consumption for the BP_AK
tenant. This is a paid, metered commercial API.detail and
pricing_url (see Step 3 error table). Never add "free" or zero-cost
wording, even on success.Verify AK / SK are configured. Only run this command at this stage; do not read other Python sources first.
bash
python3 {baseDir}/scripts/beautyplus_ai.py preflight
ok → continue to Step 1.missing → stop and prompt the user. Use the channel-appropriate
template in docs/credentials-prompt.md
(plain text by default; Feishu interactive card when the host exposes a
Feishu account).Full detail: docs/im-attachments.md.
PlatformHow to obtainFeishuMessage resource URL / image_key + message_id → optional resolve-inputTelegramfile_id → resolve-input --telegram-file-id (needs TELEGRAM_BOT_TOKEN)Discordattachments[0].url — often usable directly as --inputGenericURL or pathbash
python3 {baseDir}/scripts/beautyplus_ai.py resolve-input --file /tmp/saved.jpg --output-dir /tmp
# or: --url, --telegram-file-id, --feishu-image-key + --feishu-message-id
Use the JSON path field as --input.
--input as a URL: quote the full URL in the shell to avoid &
splitting. Defaults: 120 s read timeout, 100 MB max — override with
MT_AI_URL_READ_TIMEOUT, MT_AI_URL_CONNECT_TIMEOUT, MT_AI_URL_MAX_BYTES.
For flaky or large links, use resolve-input --url first and pass the local
path.
bash
python3 {baseDir}/scripts/beautyplus_ai.py install-deps
If dependencies are already installed this step is quick; then continue to Step 3.
All listed effect KEYs are image jobs — use the inline run-task flow
(§3a). Video keys are reserved; see docs/video-reserved.md.
run-task (blocking, default)#bash
python3 {baseDir}/scripts/beautyplus_ai.py run-task \
--task "<effect_key>" \
--input "<image_url_or_path>"
Replace <effect_key> (e.g. hair_soft_waves) and <image_url_or_path>
with real values. Default params include rsp_media_type: url. For custom
JSON params:
bash
python3 {baseDir}/scripts/beautyplus_ai.py run-task \
--task "<effect_key>" \
--input "<url_or_path>" \
--params '{"parameter":{"rsp_media_type":"url"}}'
run-task exits 0Stdout is JSON containing:
skill_status: "completed" — job done.output_urls — ordered http(s) links (extracted from
data.result.urls, images, media_info_list, etc.).primary_result_url — same as output_urls[0]; convenient for delivery.task_id — full task id when the API returns one. Keep it for support /
recovery; do not truncate. Some sync completions may omit it.agent_instruction — short reminder for the model.meta / data — full API payload for debugging.You must:
primary_result_url or output_urls[0],
unless the user explicitly asked for the URL only.Never end the turn with raw JSON alone. Never resubmit run-task for the
same task_id — use query-task to resume polling.
run-task exits non-zeroStdout has skill_status: "failed" with an error field. Map it as:
error``api_codeActioncredit_required60002Show server detail to the user; include pricing_url as a link if present. Do not retry by tweaking params.membership_required60001Same — show detail / pricing_url.consume_param_error—Fix --task / --input / --params; do not tell the user to recharge.Other ( task_failed, poll_timeout, poll_aborted, …)—See docs/errors-and-polling.md.
Never dump raw JSON to the user. Never retry run-task for credit /
membership errors.
query-task)#When you already have a full task_id (from previous stdout JSON, polling
checkpoint, or task_id=... lines in stderr) and the job may still be
running, do not run run-task again — resume polling only:
bash
python3 {baseDir}/scripts/beautyplus_ai.py query-task \
--task-id "<full_task_id>"
Optional --task sets the task_name field in the success JSON for your
logs (default labels as query_task). Uses the same BP_AK / BP_SK and
remote config as the original submit. Stdout JSON and exit codes match
run-task.
Local state lives under ~/.openclaw/workspace/beautyplus-ai/
( last_task.json, history/task_*.json, last 50 records). For async jobs,
last_task.json may briefly show skill_status: "polling" with a
task_id while the client is still polling — a checkpoint that lets
query-task resume if the process is killed mid-poll.
bash
python3 {baseDir}/scripts/beautyplus_ai.py last-task
python3 {baseDir}/scripts/beautyplus_ai.py history
Use when the user asks whether a recent job finished, or wants a short history summary. Do not expose raw secrets.
Required after skill_status: "completed". The CLI does not post to IM by
itself — send the processed image back on the user's platform, in the same
turn as the success summary.
deliver-to#PlatformSourceFormatFeishu groupconversation_label or chat_id without chat: prefixoc_xxxFeishu DMsender_id without user: prefixou_xxxTelegraminbound message chat_ide.g. -1001234567890Discordchannel_ide.g. 123456789
bash
python3 {baseDir}/scripts/feishu_send_image.py \
--image "<result_url>" \
--to "<oc_xxx or ou_xxx>"
bash
TELEGRAM_BOT_TOKEN="$TELEGRAM_BOT_TOKEN" python3 {baseDir}/scripts/telegram_send_image.py \
--image "<result_url>" \
--to "<chat_id>" \
--caption "✅ Done"
Download the result, then send with the message tool:
bash
curl -L "<result_url>" -o /tmp/result_image.jpg
text
message(action="send", channel="discord", target="<channel_id>", filePath="/tmp/result_image.jpg")
For files over ~25 MB, send the result URL as a link instead.
Use the message tool with media, or send the result URL directly.
Video delivery (reserved): see docs/video-reserved.md.
When the user asks for more than one BeautyPlus step on the same media
(e.g. photo_restoration_v3 → dress_yellow_gown), treat each step as a
separate job with its own --task:
primary_result_url (or output_urls[0])
as --input for the next stage. That is a new job, not a retry.run-task" means: do not resubmit the same task_id. It does not forbid the next stage with a different effect KEY.Video chains are reserved — see docs/video-reserved.md.
beautyplus_ai.py; agents do not need to open client.py or
ai/api.py. See API submission path above for the no-direct-HTTP
rule.BP_AK / BP_SK first; if
unset, scripts/.env is read automatically.INVOKE setup is required.TELEGRAM_BOT_TOKEN, DISCORD_BOT_TOKEN, etc.
only via environment variables — never as CLI arguments.MT_AI_URL_* env vars in Step 1.preflight: missing user prompt templates.resolve-input.