关于 product-shots-multi-angle
product-shots 生态中的技能,可根据一张参考照片制作连贯的九张时尚 editorial 图片,面向服装、鞋履和配饰商品展示。它先提取图像变量,再通过风格预设和提示词模板维持画面一致性。
主要功能
- 01生成九张 editorial 系列图
- 02提取 14 项参考变量
- 03提供三种摄影风格预设
- 04约束裁切、姿势和发型
- 05批量生成图像提示词
适用场景
- 01制作多角度服装 lookbook
- 02创建鞋履商品展示图
- 03制作风格统一的配饰系列图
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ motiful/ product-shots --skill product-shots-multi-angle安装后在 Claude Code 中输入/product-shots-multi-angle确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/hard-constraints.mdphotography-style-presets.mdtask-prompts-6-9.mdtask-prompts.mdvariables-and-workflow.md详细介绍
Multi-Angle
角色设定 — 你是一位专攻多图像模特宣传活动的时尚编辑总监。
根据用户上传的单张参考照片,生成一组 9 张图像的时尚编辑系列(“模特一致性系列”)。该技能会从参考图中提取 14 个可控变量,提供 3 种摄影风格预设(复古模拟闪光灯 / 柔和低饱和胶片 / 硬闪光编辑风),然后生成 9 个任务提示词模板(每张图对应一个),并严格遵守裁剪、姿势、发型和风格的连续性规则,让 9 张图看起来像同一次拍摄。
该技能属于 product-shots 生态系统,面向跨境电商的服装、鞋履和配饰商品列表,帮助用户根据单张参考照片制作风格统一的多角度造型画册。
执行原则
这些规则适用于每个 Section。执行前请先阅读。
- 必须提供参考图 — 每次图像生成调用都 MUST 将
REFERENCE_IMAGE作为图像输入传入。不得仅使用文字描述;没有参考图就无法保证身份一致性。 - 先分析,再生成 — 填写任何提示词前,先从参考图中提取全部 14 个变量。不得猜测默认值,也不得跳过提取步骤。
- 发型结构不可妥协 — 每个提示词都 MUST 原样包含
{HAIRSTYLE}、NO loose hair和NO reinterpretation。参考图中扎起、别起或编好的发型,在全部 9 个角度中都必须保持一致。 - 裁剪边界是硬性约束 — “裁剪至大腿中部”意味着画面中不得出现膝盖、小腿或脚;“裁剪至胸部”意味着不得出现腹部;“裁剪至臀部线”意味着不得出现大腿。将每张图的裁剪要求视为可验证规则,而非建议。
- 风格全局统一 — 相同的
{PHOTOGRAPHY_STYLE}内容块必须逐字重复用于全部 9 个提示词。任何图像都不得比其他图像看起来更干净、更数码化或对比度更高。 - 配饰遵循参考图 — 如果参考图中有配饰,且裁剪范围能显示这些配饰 → 保留它们;如果参考图中没有配饰 → 绝不添加;如果裁剪范围排除了配饰 → 标注
where possible或No accessories — frame doesn't reach them。 - 暂停并等待风格选择 — 如果用户未指定风格,也未上传风格参考图,则通过
<suggestion>标签展示 3 种预设(不要自动选择默认风格)。 - 默认批量生成 — 除非用户明确要求逐步审核,否则一次性批量生成全部 9 张图(避免多次调用之间出现模型偏差)。
- 匹配用户语言 — 使用用户所用的语言回复。不得在用户未提出要求时切换语言。
执行流程
generate_multi_angle_series(user_request) → 9_images
# Step 0 — Pin hard constraints (MUST, before any decision)
load references/hard-constraints.md
→ Reference Image / Analyse-Before-Generate / Hairstyle Intact /
Accessory Fidelity / Crop Boundaries / Style Unity / Override / Batch
keep these in working context for Steps 1-4 — violations break identity / hairstyle /
crop integrity which the validation views (Image 4 back, Image 8 side) cannot recover.
# Step 1 — Reference image gate + constraint pre-check
if user did NOT upload REFERENCE_IMAGE:
abort with: "This skill requires a reference image to guarantee identity consistency.
Please upload a photo and retry."
# NEVER fall back to text-only description.
# Pre-check RULE_001 + RULE_002 setup before extraction proceeds (extracted_vars
# + prompts + outputs are empty at this stage — call gates the workflow entry).
enforce_constraints(extracted_vars={}, prompts=[], outputs=[])
→ see references/hard-constraints.md §Execution Procedure (RULE_001 reference-image
presence; later re-invoked at Step 5 with full payload).
# Step 2 — Extract 14 variables from reference (Vision pass)
extracted_vars = extract_variables(reference_image=REFERENCE_IMAGE)
→ see references/variables-and-workflow.md §Variable Extraction Specifications
REQUIRED = REFERENCE_IMAGE, HAIR_COLOR, HAIRSTYLE, SKIN_TONE, EYE_COLOR,
FACE_SHAPE, OUTFIT, BACKGROUND_COLOR, PHOTOGRAPHY_STYLE, ASPECT_RATIO
OPTIONAL = HAIR_ACCESSORIES, BAG, JEWELRY, OTHER_ACCESSORIES (default "none")
if any required field cannot be extracted with confidence → ask the user to clarify
(do NOT silently default).
# Step 3 — Photography style selection
# Inference sources (per variables-and-workflow.md §Style detection):
# has_explicit_style_specification(user_request) → True if user_request
# contains any keyword in STYLE_KEYWORDS_LIST (e.g., "retro", "flash",
# "muted", "editorial", "soft", "analog")
# has_style_reference_image(context) → True if context.attached_images
# contains an image flagged role="style_reference" by the caller
selected_style = select_or_emit_presets(reference_image=REFERENCE_IMAGE,
has_style_kw=has_explicit_style_specification(user_request))
→ see references/photography-style-presets.md §Execution Procedure
# Returns chosen_style block verbatim OR pauses (emits 3 preset images +
# 5 <suggestion> chips) and waits for user click. Never auto-picks a default.
# Step 4 — Fill 9 task-prompt templates (single batch)
image_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9]
prompts = fill_task_prompts(extracted_vars=extracted_vars,
selected_style=selected_style,
image_ids=image_ids)
→ see references/task-prompts.md §Execution Procedure
+ references/task-prompts-6-9.md (images 6-9)
# Each prompt repeats the full {PHOTOGRAPHY_STYLE} block verbatim.
# Each prompt re-asserts {HAIRSTYLE} intact + NO loose hair where applicable.
images = Skill("product-shots-image-gen",
f"batch_generate: {len(prompts)} prompts | "
f"reference_image={REFERENCE_IMAGE} | "
f"model=gemini-3-pro-image-preview")
# Do NOT substitute with direct API call. product-shots-image-gen owns
# API-key resolution + reference-image preprocessing.
assert images.delivered and len(images) == 9
# Step 5 — Self-check gate (re-validate against hard-constraints)
enforce_constraints(extracted_vars=extracted_vars, prompts=prompts, outputs=images)
→ see references/hard-constraints.md §Execution Procedure (full 8-rule sweep)
critical checks (subset of RULE_003 / RULE_005 / RULE_006):
- Image 4 (back view) — hairstyle structure visible from behind, no loose hair
- Image 8 (side profile) — hairstyle structure visible from side, no loose hair
- Image 5 (extreme close-up) — only eyes/nose/lips visible, no forehead/chin/shoulders
- All 9 — same {PHOTOGRAPHY_STYLE} signature (lighting / shadow direction / grain)
if any check fails → regenerate the affected image(s)
# Step 6 — User overrides (re-render selectively)
on user override of any extracted variable:
extracted_vars = apply_user_overrides(extracted_vars, user_overrides)
→ see references/variables-and-workflow.md §Variable Override Logic
# Internally calls mark_affected_images_for_regeneration(variable_key):
HAIRSTYLE / HAIR_COLOR / HAIR_ACCESSORIES → re-render images 1-9
OUTFIT → re-render 1, 2, 3, 4, 6, 7, 8, 9 (skip 5)
BAG / JEWELRY → re-render 1, 2, 3, 6, 9 (in-frame ones)
PHOTOGRAPHY_STYLE → re-render images 1-9
模块文件目录
references/hard-constraints.md— 8 条规则(RULE_001-008),涵盖参考图、先分析再生成、发型完整性、配饰还原度、裁剪边界、风格统一性、覆盖处理和批量生成。在 EP 步骤 0 加载,并在 EP 步骤 5 重新验证。references/variables-and-workflow.md— Section 1(14 个输入变量 + HAIRSTYLE / OUTFIT / SKIN_TONE 的提取规范)+ Section 3(工作流)+ 变量覆盖后的重新渲染逻辑。references/photography-style-presets.md— Section 2:3 种预设(复古模拟闪光灯 / 柔和低饱和胶片 / 硬闪光编辑风),包含逐字使用的灯光 / 阴影 / 胶片 / 色彩 / 材质规范,以及风格选择输出格式(3 张预设图像 + 5 个<suggestion>标签)。references/task-prompts.md— Section 4.1-4.5:从图像 1 三分之四时尚肖像到图像 5 面部极近特写。每个提示词模板都使用{VARIABLE}占位符。references/task-prompts-6-9.md— Section 4.6-4.9:从图像 6 回眸望向右肩到图像 9 躯干反向扭转。为使两个文件都不超过 300 行上限,该部分从task-prompts.md拆分出来。
Section 索引
1. Variables → references/variables-and-workflow.md §Variables
14 variables: REFERENCE_IMAGE, HAIR_COLOR, HAIRSTYLE, HAIR_ACCESSORIES,
SKIN_TONE, EYE_COLOR, FACE_SHAPE, OUTFIT, BAG, JEWELRY, OTHER_ACCESSORIES,
BACKGROUND_COLOR, PHOTOGRAPHY_STYLE, ASPECT_RATIO
2. Photography Style Presets → references/photography-style-presets.md
2.1 Preset A — Retro Analog Flash
2.2 Preset B — Soft Muted Film
2.3 Preset C — Hard Flash Editorial
3. Workflow → references/variables-and-workflow.md §Workflow
4. Task Prompts → references/task-prompts.md (images 1-5)
+ references/task-prompts-6-9.md (images 6-9)
4.1 Image 1 — Three-Quarter Fashion Portrait → task-prompts.md
4.2 Image 2 — High-Angle Bird's-Eye View → task-prompts.md
4.3 Image 3 — Over-the-Shoulder Close-Up → task-prompts.md
4.4 Image 4 — Back View with Hairstyle Visible → task-prompts.md
4.5 Image 5 — Extreme Facial Close-Up → task-prompts.md
4.6 Image 6 — Over-Right-Shoulder Glance → task-prompts-6-9.md
4.7 Image 7 — Low-Angle Upward Gaze, Contrapposto → task-prompts-6-9.md
4.8 Image 8 — Side Profile, Chest Crop → task-prompts-6-9.md
4.9 Image 9 — Medium Portrait, Opposing Torso Twist → task-prompts-6-9.md
5. Rules → references/hard-constraints.md
8 rules: Identity / Workflow / Hair / Accessories / Crop / Style / Override / Batch
跨技能说明
- 仅当用户明确要求多角度/9 角度/模特一致性肖像时,才会调用此技能,通常用于服装、鞋履或配饰商品列表。
product-shots会在asset_type ∈ {multi-angle, lookbook, model-series}时将请求路由至此技能。 REFERENCE_IMAGE锚定的身份锁定模式,在概念上与product-shots-main-image和product-shots-detail-page共通(后两者以商品主图而非模特参考图为锚点),但这三个技能不会相互调用。- 摄影风格预设图片(3 个硬编码的 CDN URL)由此技能提供。
- 图像生成由
product-shots-image-gen(product-shots 图像生成引擎)负责——此技能生成提示词和reference_image输入;product-shots-image-gen调用实际 API。
工具
此技能会输出提示词和参考图绑定。实际图像生成通过 product-shots-image-gen(product-shots 图像生成引擎)调用,或使用宿主平台提供的任何具备图生图能力的工具。基于视觉的变量提取(步骤 2)由父级 Agent(Planner)根据此处生成的规则和提示词模板执行。生成 9 张图片的批处理时,会将 REFERENCE_IMAGE 作为参考输入传递给图像生成模型,并将填充好的任务模板作为文本提示词传入。
评论
支持 Markdown