Creates virtual try-on agents supporting image and video (catwalk animation) try-ons on Google Cloud (Gemini image models and Veo on Gemini Enterprise Agent Platform). Handles resource setup, user photo uploading, image/video generation pipelines, local testing, and evaluation.
61
73%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/retail/virtual-tryon/SKILL.mdCreates virtual try-on (VTO) agents on Google Cloud supporting image and video (catwalk animation) try-on modes.
Check your operating mode first — there are two distinct modes:
If the system context tells you that setup is complete (e.g. it says "You are a DEPLOYED try-on agent", or the conversation history shows setup has already been completed) — skip Q-MODE entirely. Respond directly to the user's try-on query. Do NOT output the Q-MODE block. Do NOT mention setup.
If there is no such context (fresh invocation, no prior setup) — your VERY FIRST response MUST be the Q-MODE block below. Nothing else.
Do NOT ask about products, industry, GCP project, or anything else first. Do NOT propose a plan. Do NOT explain what you will do.
Your first message to the user must be EXACTLY this (copy-paste, no changes):
[skill: retail-virtual-tryon] active.
Q-MODE: Pick a setup mode? [default: 1]
1. Quick start -- Local testing sandbox, interactive 6-question config, ~90s. Best for demos.
2. Export Web App & GCS Catalog Sync -- Generate standalone containerized codebase, GCS catalog sync, and Cloud Run config, ~3 min.Then STOP and wait for the user's answer.
Accept: 1, quick, empty/Enter (= Quick Start), 2, export, sync or webapp (= Export Web App & GCS Catalog Sync).
setup_tryon.py, export_app.py, deploy_cloudrun.sh) upon receiving a general request like "I want to create/deploy a VTO app on GCP". You MUST first present the Q-MODE setup menu choice and wait for the user to select Mode 1, 2, or 3.Q: <question text>? [default: <value>]
Pressing Enter = use the default. NEVER ask multiple questions in one turn../design-spec.md (in the workspace) as you collect them.
After the interview, run .venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.md
(see the Workspace Setup section to resolve $SKILL_DIR).Before Quick Start has launched setup, the user can say "export", "webapp", or "deploy" to switch to Mode 2 (Export Web App & GCS Catalog Sync). Carry over answers already given for project, mode, and region; ask only the remaining Mode-2 questions (GCS catalog bucket, export directory). After setup.py has already started buckets/APIs, the workflow is committed -- to run Mode 2 instead, start a fresh workspace.
The skill has two locations:
By the end of this section the workspace must have .venv/ (with the skill
installed editable + [adk] extras), design-spec.md, and SKILL_DIR
exported in the shell.
Run this as ONE shell command -- splitting it across tool calls loses state:
SKILL_DIR=$(for d in ~/.claude/skills ~/.agents/skills ~/.gemini/skills ~/.cursor/skills; do
[ -f "$d/retail-virtual-tryon/SKILL.md" ] && echo "$d/retail-virtual-tryon" && break
done)
bash "$SKILL_DIR/scripts/bootstrap.sh"bootstrap.sh finds a Python 3.10+ interpreter (with absolute-path fallback
for sandboxed shells), creates .venv, installs the skill editable with the
[adk] extras, and copies design-spec.md into the workspace.
All scripts run from the install dir against the workspace config. Use
.venv/bin/python, not bare python -- bare python may resolve to a
Python without the skill's editable install on sys.path.
.venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.mdEdit ./design-spec.md and set gcp_project_id (the agent will do this based on the user's answers in Q-MODE).
| Q | Question | Default | Source |
|---|---|---|---|
| Q-A | GCP project ID? | $GOOGLE_CLOUD_PROJECT or gcloud config get-value project | env / gcloud |
| Q-B | Try-on mode? | 2 (both Image + Veo Video) | prompt |
| Q-C | GCP Region? | us-west1 | prompt |
| Q-D | Catalog Path? | demo (type 'demo' to use bundled catalog, or specify local folder, or gs:// URI) | prompt |
| Q-E | Upload local catalog to GCS? (Only asked if Q-D is a custom local folder) | 1 (Yes) | prompt |
Q-B: Try-on mode? Format to print:
Q: Try-on mode? [default: 2]
1. image_only (Faster, static images only)
2. image_and_video (Catwalk video animations via Veo)Accept: 1 (= image_only), 2 (= image_and_video), image_only, image_and_video.
Q-D: Catalog Path?
Accept: demo (uses bundled catalog), local directory path, or GCS URI starting with gs://.
Q-E: Upload local catalog to GCS? Format to print:
Q: Upload local catalog to GCS? [default: 1]
1. Yes (Sync and host catalog in GCS)
2. No (Run locally using local folder assets)Accept: 1 (= Yes), 2 (= No), Yes, No.
After collecting these answers, do this automatically:
./design-spec.md (in the workspace), filling in:
gcp_project_idtryon_modetryon_model (always use flash)tryon_output_bucket (default: {project_id}-tryon-output)tryon_upload_bucket (default: {project_id}-tryon-uploads)gcp_regiontryon_catalog_pathtryon_catalog_upload (set to true by default, set to false only if Q-E is answered as No).venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.md.venv/bin/python "$SKILL_DIR/scripts/start_sandbox.py" --config ./design-spec.md| Q | Question | Default | Source |
|---|---|---|---|
| Q2-A | GCP project ID? | $GOOGLE_CLOUD_PROJECT or gcloud config get-value project | env / gcloud |
| Q2-B | Try-on mode? | 2 (both Image + Veo Video) | prompt |
| Q2-C | GCS Catalog Bucket name? | {project_id}-tryon-catalog | prompt |
| Q2-D | Target Directory to export code? | ./vto-retail-app | prompt |
Q: Try-on mode? [default: 2]
1. image_only (Faster, static images only)
2. image_and_video (Catwalk video animations via Veo)1 (= image_only), 2 (= image_and_video), image_only, image_and_video.After collecting these answers, do this automatically:
./design-spec.md (in the workspace), filling in:
gcp_project_idtryon_modegcs_catalog_bucket (starts with gs://...)export_directorygcp_region (default: us-west1)tryon_model (always use gemini-2.5-flash-image).venv/bin/python "$SKILL_DIR/scripts/export_app.py" --config ./design-spec.md --skill-dir "$SKILL_DIR".venv/bin/python "$SKILL_DIR/scripts/setup_tryon.py" --config ./design-spec.mdgcloud run deploy vto-retail-app --source ./vto-retail-app/ --region us-west1 --project {gcp_project_id} --allow-unauthenticatedgcloud run services describe vto-retail-app --region us-west1 --project {gcp_project_id} --format="value(status.url)"gsutil -m rsync -r ./my_clothes/ gs://{gcs_catalog_bucket}/
# Then force index refresh:
curl -X GET "https://{cloud_run_url}/api/catalog?force=true"<!-- Place this iframe widget on your product details page -->
<iframe src="https://{cloud_run_url}" width="100%" height="800px" style="border:none; border-radius:12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);"></iframe>Do NOT use for furniture/home styling (use room placement tools), or complex 3D avatar creation.
Set the parameters in ./design-spec.md (in the workspace), then run:
.venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.mdOn success, local sample catalog images will be generated under ./catalog_images/ (unless a GCS bucket or custom catalog path was specified, in which case bucket access will be verified).
Set the required environment variables in the shell that runs the agent:
export GOOGLE_CLOUD_PROJECT="<your-project-id>"
export TRYON_OUTPUT_BUCKET="<your-project-id>-tryon-output"
export TRYON_UPLOAD_BUCKET="<your-project-id>-tryon-uploads"
export GEMINI_IMAGE_MODEL="flash" # or pro / gemini-2.5-flash-image / gemini-2.5-pro-imageadk webLaunch the interactive web UI. Use .venv/bin/adk, not bare adk -- bare
adk may resolve to a global Python (pyenv, brew, etc.) whose ADK can't find
the skill and reports an empty app list (UI loads, but /list-apps returns
[] and queries time out).
.venv/bin/adk web .You can start a chat session and test VTO by providing:
shirt_001 or sunglasses_001catalog_images/sample_user.jpg or any photo of yourself.Run a quick test script without the UI:
# Test image try-on
.venv/bin/python -c "
from scripts.tryon_agent import try_on_product_image
res = try_on_product_image('shirt_001', 'catalog_images/sample_user.jpg', 'catalog_images/shirt_001.jpg', 'clothing', 'red shirt')
print(res)
"
# Test video try-on (Veo)
.venv/bin/python -c "
from scripts.tryon_agent import try_on_product_video
res = try_on_product_video('sunglasses_001', 'catalog_images/sample_user.jpg', 'catalog_images/sunglasses_001.jpg', 'eyewear', 'sunglasses')
print(res)
"Verify outputs using the local evaluation YAML. Ensure image consistency, correct garment placement, and no visual distortions.
To test the VTO skill interactively with your own catalog of product images, launch the Sandbox Dashboard:
.venv/bin/python "$SKILL_DIR/scripts/start_sandbox.py" --config ./design-spec.mdflash (recommended) or pro for general try-on.setup_tryon.py).| Error pattern | Likely cause | Fix |
|---|---|---|
BILLING_DISABLED | GCP project has no billing | Link billing account in Cloud Console |
API has not been used / disabled | Required API disabled | Run: gcloud services enable aiplatform.googleapis.com storage.googleapis.com |
PermissionDenied on GCS | Service Account lack rights | Grant roles/storage.admin |
MethodNotImplemented: 501 / Model not found | Selected model is unavailable in region | Check your GCP project region availability |
17f314a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.