npx skills add ...
npx skills add starchild-ai-agent/official-skills --skill image-tryon
Virtual try-on: clothing, accessories, hairstyles, makeup, glasses, hats, shoes, watches.
npx skills add starchild-ai-agent/official-skills --skill image-tryon
Use this skill for all virtual try-on requests on Starchild.
Covers: clothing try-on, accessory try-on, hairstyle preview, makeup preview, glasses try-on, hat try-on, shoes try-on, watch try-on.
Core principle: call the provided script. Do not re-implement proxy/billing plumbing.
Key difference from image-edit: try-on always requires two images — a person photo and a garment/item photo.
⚠️ Execution context — read this first. The code blocks below are Python, not shell commands. Starchild's
bashtool runs/bin/bash -c, which cannot parseexec(open(...))— pasting them directly into a bash command will fail withsyntax error near unexpected token 'open'. Also,exec(open(...))insidepython3 -cfails withNameError: __file__because the script uses__file__for path resolution.Use
python3 - <<'EOF'withfrom exports importwhen calling via the bash tool:The heredoc (
<<'EOF') preserves all quotes and newlines — no escaping needed.
The script reads both local files, base64-encodes them, and sends them to fal.ai as data URIs — no manual URL publishing needed.
Never hand the user the raw fal.media URL. fal serves files with restrictive CSP headers. The only reliable delivery path is the already-downloaded local file:
local_path (e.g. output/images/xxx.png) — the script always downloads on success.output/images/ and viewable in the workspace file panel.send_to_telegram(file_path="output/images/...", message_type="image") or send_to_wechat(file_path="output/images/...", message_type="image").| Parameter | Required | Default | Description |
|---|---|---|---|
person_path | yes* | — | Local workspace file path to the person's photo |
person_url | yes* | — | Public HTTPS URL of the person's photo |
garment_path | yes* | — | Local workspace file path to the garment/item photo |
garment_url | yes* | — | Public HTTPS URL of the garment/item photo |
category | no | "clothing" | Try-on category key (see §5) |
prompt | no | None | Custom prompt — overrides category default when set |
model | no | "nanopro" | Model: "nanopro" (fast ~25s) or "gpt" (best quality ~150s) |
aspect_ratio | no | "3:4" | Output ratio: 1:1, 3:4, 4:3, 9:16, 16:9 |
Image input rules:
person_path OR person_url (one is required).garment_path OR garment_url (one is required).Prompt priority: prompt (full override) > category default prompt.
| User says | Category | Key |
|---|---|---|
| "try on this dress/shirt/jacket/outfit" | Clothing | clothing |
| "put this necklace/scarf/bag on me" | Accessory | accessory |
| "show me with this hairstyle/hair color" | Hairstyle | hairstyle |
| "apply this makeup/lipstick look" | Makeup | makeup |
| "try on these glasses/sunglasses" | Glasses | glasses |
| "put this hat/cap/beanie on me" | Hat | hat |
| "try on these shoes/sneakers/boots" | Shoes | shoes |
| "put this watch on my wrist" | Watch | watch |
| Category | Key | Best for | Photo requirements |
|---|---|---|---|
| Clothing | clothing | Shirts, dresses, jackets, pants, coats, full outfits | Full body or upper body person photo |
| Accessory | accessory | Scarves, bags, belts, jewelry, necklaces, earrings | Relevant body area visible |
| Hairstyle | hairstyle | Haircuts, hair colors, styling changes | Clear face/head photo |
| Makeup | makeup | Lipstick, eyeshadow, foundation, blush, full looks | Clear face close-up |
| Glasses | glasses | Prescription glasses, sunglasses, reading glasses | Clear face photo, front-facing |
| Hat | hat | Caps, beanies, fedoras, sun hats, helmets | Head and shoulders visible |
| Shoes | shoes | Sneakers, heels, boots, sandals, loafers | Full body or lower body photo |
| Watch | watch | Analog, smartwatches, luxury watches | Wrist/arm visible |
| Model | Key | Speed | Quality | Best for |
|---|---|---|---|---|
| NanoPro | nanopro | ~25s | Good | Default for all requests. Fast iteration. |
| GPT Image 2 | gpt | ~150s | Best | When user explicitly asks for "highest quality" or "best quality". |
Decision rules:
nanopro unless the user explicitly requests higher quality.gpt when: user says "highest quality", "best quality", "premium", or the result needs to be photorealistic for professional use.nanopro when: user wants fast results, is trying multiple items, or iterating on looks.| Category | Recommended photo type | Tips |
|---|---|---|
| Clothing | Full body, front-facing | Arms slightly away from body, neutral pose |
| Accessory | Relevant body area visible | Good lighting on the area where accessory goes |
| Hairstyle | Clear head/face, front or 3/4 view | Hair pulled back or current style clearly visible |
| Makeup | Face close-up, front-facing | Clean face, good even lighting, no heavy makeup |
| Glasses | Face front-facing, eyes visible | No existing glasses, clear eye area |
| Hat | Head and shoulders, front-facing | No existing hat, hair visible |
| Shoes | Full body or legs/feet visible | Standing pose, current shoes visible |
| Watch | Wrist/forearm visible | Bare wrist or current watch visible |
When the default category prompt doesn't produce the desired result, use a custom prompt. Follow these guidelines:
Formal outfit:
Casual street style:
Jewelry combination:
| Error | Cause | Solution |
|---|---|---|
| "Person image error: Either person_path or person_url must be provided" | Missing person photo | Ask user for their photo |
| "Garment/item image error: Either garment_path or garment_url must be provided" | Missing item photo | Ask user for the item photo |
| "File not found" | Invalid file path | Check the file path and try again |
| "Unsupported image format" | Non-image file | Use JPG, PNG, or WebP |
| "Image too large" | File > 10 MB | Resize or compress the image |
| "Unknown category" | Invalid category key | Use one of the 8 valid categories |
| Low quality result | Poor input photos | Use higher resolution, well-lit photos |
| Wrong item placement | Unclear body positioning | Use front-facing photos with target area visible |
image-edit skillimage-portrait skillimage-create skillimage-create skill