Body Swap · Open Skill 공개 스킬
Body Swap
Body Swap은 Digen의 공개 Open Skill입니다. 열어 보면 이 워크플로가 무엇을 만드는지 알 수 있습니다.
Custom
4 0 2
https://d7qlwi7tl2u27.cloudfront.net/skill-covers/prod/4284862/2026-10-16/75kk2meq.jpg
# Body Swap
Recreates the "Body Swap" app: the user brings one original image (plus, optionally, an entered character), and this skill returns one image in which the character inside the original picture has been swapped while the pose is left untouched. There is no structured project state — everything needed is the image(s) already in the conversation, plus the visual rules in `references/style-and-prompt.md`.
## When to use
- The user uploads an image and wants an image back (the core trigger).
- The user wants the person/character in their own picture replaced ("body swap", "face swap", "swap the person", "put this character in the original image").
- The user enters a character — by name, by text description, or with a second reference image — and wants that character placed into the original image.
- Pose preservation is the point: the result must keep the original pose, so a body swap is requested rather than a fresh illustration.
## Steps
1. **Collect the input.** Use the image the user just uploaded/attached: take its `asset_id` or its `s3://` uri from the conversation and never invent, guess, or re-host a URL. If the user provided a second image as the character reference, keep it separate from the original picture. If no image is available at all, ask once for the original picture; if the user explicitly wants text-only generation, fall back to `model='t2i.hd.gpt'` with no `input_urls`.
2. **Read the visual rules first.** Before generating, call `read_skill_file(name='body-swap', path='references/style-and-prompt.md')` and follow it. Do not skip this step — it holds the Style / Content / Layout / Must keep / Must avoid rules and the copy-paste English prompt template. Do not paraphrase the original app beyond what that file states.
3. **Build one English prompt** using that file's template:
- Name the target character explicitly (from the user's character description, or from the second reference image): face, hair, build, and costume.
- Then restate what is preserved: same pose, same body posture and gesture, same camera angle, same framing and crop, same background, same lighting direction.
- Keep the whole frame in the single unified look described in the reference file — one theme, one color grade.
- Do not invent elements the original picture does not contain.
4. **Generate — one call:**
`generate_image(prompt=<English prompt>, input_urls=[<original image asset_id or uri>, <character reference, optional>], model='i2i.hd.gpt', orientation=<same as the original image>, name='Body Swap', entity_type='body_swaps')`
- `model='i2i.hd.gpt'` is the fixed channel for this skill's image-to-image path (reference image in, swapped image out). The text-only fallback in step 1 uses `model='t2i.hd.gpt'`. Never pass a physical model name.
- `input_urls`: the original picture first (it carries the pose and the scene), the character reference second when the user supplied one.
- `orientation`: match the source picture — `portrait` for vertical phone photos, `landscape` for wide ones, `square` for square crops; when unsure use `portrait`.
- `resolution`: leave it unset (720P default) unless the user asks for higher quality, then use `1080P`.
- One image per call; never batch, never re-submit the same task while it is running.
5. **Reply** in one or two natural-language sentences about what was swapped and what was kept. Task complete: output the final text; if a next step is worth offering, call `set_guidance` in the same turn and call nothing else.
## Notes
- Keep exactly what the app keeps: pose, silhouette, camera angle, framing, background, and lighting direction. The identity markers of the entered character (face, hair, costume) are what changes.
- Output is a single image. If the user says it is wrong, adjust the prompt (stronger pose/camera preservation wording, clearer character description) and offer one retry — do not silently change the scene or the framing.
- `success=false`