mcpField
P
product-shots

product-shots

github.com/motiful创意与媒体121142 次安装20 周前更新
代码仓库

关于 product-shots

用于 product-shots 视觉创作请求的分流技能。它通过有轮次上限的问题澄清需求,整理平台和行业相关的创意简报,再交给专门技能处理,而不直接生成图片。

主要功能

  1. 01结构化需求澄清
  2. 02最多五轮提问
  3. 03平台与行业视觉指导
  4. 04在简报中纳入 Brand Kit 信息
  5. 05分流至五种专门技能
  6. 06不直接生成图片

适用场景

  1. 01将开放式需求整理为创意简报
  2. 02将 Amazon 商品图片需求交给专门技能
  3. 03准备适用于特定平台的社交或广告创意

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/motiful/product-shots --skill product-shots

安装后在 Claude Code 中输入/product-shots确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
ad-creative-flow.md
brief-output-and-routing.md
clarification-stages.md
defaults-and-state-machine.md
design-element-standards.md
hard-constraints.md
industry-visual-dna.md
platform-visual-dna.md
suggestion-format.md

详细介绍

Hub

专业设计指导,通过结构化问题厘清用户意图,并生成适用于各个平台的创意简报,其中融入视觉 DNA、提示词补丁和行业专属风格规则。它是产品图技能生态系统的意图路由器:负责 0–5 轮澄清,锁定 Brief,并将工作分派给五种下游业务技能之一(product-shots-main-image / product-shots-detail-page / product-shots-multi-angle / product-shots-ad-creative / product-shots-social-post)。

参与原则

这些规则适用于每个 Section。执行前请先阅读。

  1. 严格限制澄清轮数 — 最多 5 轮;当 brief_completeness > 0.8 时提前终止。绝不无限循环。
  2. 与用户使用相同语言 — 根据用户输入自动检测;所有回复均使用相同语言;绝不主动切换语言。
  3. 按优先级提问 — 问题按“对创意方向的影响程度”排序:平台 > 风格偏好 > 变体数量。优先询问影响较大的问题。
  4. 每个问题只涉及一个维度 — 每轮只询问一个维度,绝不在一轮中连续提出多个问题。
  5. 选项集使用 <suggestion> — 每个提供的选项都用 <suggestion> 标签包裹,以便 UI 将其显示为可点击的选项。用户也可以同时提供自定义输入。
  6. 路由前注入视觉 DNA — 每份 Brief 在分派前都必须包含平台提示词补丁、行业提示词补丁、风格修饰项和统一负面约束补丁。
  7. 负面约束不可协商 — 每份生成的 Brief 都必须追加统一提示词补丁(social media UI, screenshot, watermark, messy background, distorted text, phone frame, app interface)。
  8. Hub 是路由器,不是生成器 — Hub 不会直接调用图像生成工具。它会生成结构化 Brief,并分派给下游技能(若没有匹配的专用技能,则直接返回 Brief)。
  9. 信息缺失时应用默认值 — optimization_target=engagement、target_audience=general、variant_count=3、style_direction 根据行业表确定、format=platform_default。
  10. Brand Kit 是一类重要资产 — 第 2 阶段(视觉资产)除产品照片和参考照片外,还接受用户提供的 Brand Kit(文件路径或内联字段)。参见下文的 §Brand Kit Reference。

执行流程

route_design_request(user_request) → brief + downstream_skill_id

# Step 0 — Pin hard constraints (MUST, before any decision)
load references/hard-constraints.md
    → Negative Constraints prompt patch + 4 forbidden categories
keep these in working context for Step 5 (DNA injection) and Step 7 (route + handoff).

# Step 1 — Initialize Brief State
state = BriefState()
    # Stage 1 fields: platform / format / dimensions / ratio / content_topic
    # Stage 2 fields: visual_assets / asset_urls
    # Stage 3 fields: optimization_target / target_audience
    # Stage 4 fields: style_direction / brand_colors / brand_fonts / brand_logo
    # Derived: industry / asset_type / variant_count / is_promotion / product_category
    # Metadata: round_count / completeness
language = detect_language(user_request)   # zh / en — locks all replies to this language

# Step 2 — Dynamic Clarification Loop (at most 5 rounds)
while state.round_count < 5 AND completeness <= 0.8:
    next_stage = select_next_stage(state)
        # Stage 1: Task Skeleton    → Platform + Asset Type + Topic
        # Stage 2: Visual Assets    → product photo / reference / Brand Kit / none
        # Stage 3: Business Goal    → optimization_target + audience
        # Stage 4: Style & Brand    → style direction + brand constraints
    question, options = generate_question(next_stage, references/clarification-stages.md)
    emit question wrapped in <suggestion> tags          # see references/suggestion-format.md
    state.update(user_answer)
    state.round_count += 1
    completeness = calculate_brief_completeness(state)  # weighted, threshold = 0.8

# Step 3 — Apply Defaults for missing fields
state = apply_defaults(state)
    # see references/defaults-and-state-machine.md §Default Values

# Step 4 — Identify Industry + Asset Type (auto-derive)
state.industry   = identify_industry(state.content_topic)
    # references/industry-visual-dna.md §Industry Matching Logic
state.asset_type = identify_asset_type(user_request, state.platform)
    # references/defaults-and-state-machine.md §Asset Type Identification
    # main_image / secondary_image / aplus / multi_angle / ad / post

# Step 5 — Inject Visual DNA + Negative Constraints
brief = build_brief(state)
brief.prompt          += load_platform_dna(state.platform, user_request).prompt_patches
                            # references/platform-visual-dna.md
brief.prompt          += load_industry_dna(state.content_topic).prompt_patches
                            # references/industry-visual-dna.md
brief.style_modifier   = style_modifier(state.style_direction)
                            # references/design-element-standards.md §Style Modifiers
brief.negative_prompt  = NEGATIVE_CONSTRAINTS.unified_prompt_patch
                            # references/hard-constraints.md
if state.platform == "Google Display":
    brief.negative_prompt += ", text overlay"   # platform-specific extension

# Step 6 — Ad-Creative Special Flow (if asset_type == ad)
if is_ad_creative_flow(user_request, state.asset_type):
    brief = run_ad_creative_flow(user_request, state.asset_type)
        # 6-stage ad questionnaire + AD_BRIEF_TEMPLATE
        # AD_PLATFORM_CONSTRAINTS for Google Display / TikTok / multi-platform

# Step 7 — Route + Handoff
brief.route_to = route_to_next_skill(brief)
                            # references/brief-output-and-routing.md
    # product-shots-main-image / product-shots-detail-page / product-shots-multi-angle / product-shots-ad-creative / product-shots-social-post
emit brief in STANDARD_BRIEF_TEMPLATE (or AD_BRIEF_TEMPLATE if ad flow)
hand off to downstream skill_id

# Self-check gate
audit(brief) →
    assert brief.platform IS NOT NULL
    assert brief.content_topic IS NOT NULL
    assert brief.negative_prompt CONTAINS unified_prompt_patch
    assert brief.route_to IN allowed_targets
    assert response_language == language        # never switch unprompted
    assert no question chain (one dimension per turn)
    if any fail → revise + re-emit; if all pass → deliver Brief and route

模块文件目录

  • references/hard-constraints.md — 负面约束。4 类禁止事项 + 统一提示词补丁(19 个单词的字符串)。MUST 级别。在 EP Step 0 加载,并在交接前重新验证。
  • references/clarification-stages.md — 澄清机制 + 澄清状态机(含字段列表、优先级逻辑和终止条件的 4 个阶段)。
  • references/platform-visual-dna.md — 平台视觉 DNA。电商平台(以 Amazon 为主 + Shopify / AliExpress / TikTok Shop / 独立站)和社交平台(Instagram、X/Twitter、YouTube、LinkedIn、Facebook、TikTok、Pinterest),以及 RedNote / WeChat 的条件显示规则。
  • references/industry-visual-dna.md — 行业视觉 DNA。7 个行业,包含 prompt_patches、color_direction、key_avoid、composition_rules;以及行业匹配关键词表。
  • references/design-element-standards.md — 设计元素标准。文字层级 + 色彩与构图(6-3-1 规则)+ 风格修饰词。
  • references/ad-creative-flow.md — 广告创意专属流程。触发检测、6 阶段广告澄清优先级、AD_PLATFORM_CONSTRAINTS、AD_BRIEF_TEMPLATE。
  • references/brief-output-and-routing.md — 标准 Brief 输出(含 Brief 模板)和路由规则。STANDARD_BRIEF_TEMPLATE、完整度评分、5 个带条件的路由目标。
  • references/defaults-and-state-machine.md — 默认值 + 状态机字段列表(BriefState)+ 状态转换。EP Step 1 / 3 的辅助模块。
  • references/suggestion-format.md — 建议问题格式 + IMPORTANT!建议。XML 封装规则和“DO NOT ASK several questions”指令(保留全角标点)。

章节索引

Goal
Language Rule
Clarification Mechanism                          → references/clarification-stages.md §Mechanism
Clarification State Machine                      → references/clarification-stages.md §State Machine
   Stage 1: Task Skeleton — Platform + Asset Type + Topic
   Stage 2: Visual Assets — Key Visual Materials
   Stage 3: Business Goal & Audience — Optimization Direction
   Stage 4: Style & Brand Constraints — Visual Style Rules
Platform Visual DNA                              → references/platform-visual-dna.md
Industry Visual DNA                              → references/industry-visual-dna.md
Design Element Standards                         → references/design-element-standards.md
   Text Hierarchy
   Color & Composition
   Style Modifiers
Negative Constraints                             → references/hard-constraints.md
Ad Creative Special Flow                         → references/ad-creative-flow.md
Standard Brief Output                            → references/brief-output-and-routing.md §Brief Output
   Brief Template
Routing Rules                                    → references/brief-output-and-routing.md §Routing
Suggested Question Format                        → references/suggestion-format.md §Question Format
IMPORTANT!Suggestion                             → references/suggestion-format.md §IMPORTANT

目标

成为产品拍摄视觉创作请求的专业入口。通过结构化的 0–5 轮对话澄清用户意图,使用平台 / 行业视觉 DNA + 负面约束丰富请求,然后将最终确定的 Brief 分发给最合适的下游业务技能。Brief 必须可直接用于平台、融入 DNA、通过完整度检查(≥ 0.8),并完成路由。

语言规则

Always respond in the user's language.
Detection: auto_detect_from_user_input
Matching: MUST match user's language in ALL responses
Forbidden: NEVER switch languages proactively

IF user writes in English  THEN respond in English
IF user writes in Chinese  THEN respond in Chinese

重要 — 建议格式

IMPORTANT!Suggestion: Always use the format <suggestion> to guide the user.
DO NOT ASK several questions!

Example: use the format <suggestion> to provide options like
Amazon (main image / A+ Content) / Instagram (Feed or Story) / TikTok / Facebook /
Pinterest / Other platform.

XML 格式:

<suggestion>
  <label>Button text</label>
  <prompt>Message sent when clicked</prompt>
</suggestion>

这是前端渲染指令——选项集用 <suggestion> 标签封装,以便 UI 将其渲染为可点击的选项标签。

跨技能说明

Hub 是产品拍摄技能生态系统中的意图路由器。它会将每份已澄清的 Brief 分发给以下某个下游业务技能:

下游技能路由条件
product-shots-main-image电商主图 / 副图(1:1 轮播图)——非广告
product-shots-detail-pageAmazon A+ Content / 21:9 Hero Banner / 3:2 模块
product-shots-multi-angle服装 / 配饰模特 9 角度一致性系列
product-shots-ad-creativeasset_type == 'ad' OR is_promotion == True(适用于 IG、FB、TikTok、LinkedIn、Google、YouTube、Pinterest、X)
product-shots-social-postIG / TikTok / FB / Pinterest / RedNote / LinkedIn / X 上的自然社交帖子——非广告

跨技能一致性:

  • 此处定义的 7 行业视觉 DNA 与 product-shots-social-post、product-shots-ad-creative 及下游业务技能共享。
  • 19 个单词的统一负面约束提示词补丁会传递至下游——接收技能继承该补丁,不会重复添加。
  • Brand Kit(第 2 阶段视觉素材)是用户提供的输入——文件路径或内联字段。存在时,这些字段会传递到 Brief;下游技能会使用 brand_colors / brand_fonts / brand_logo。完整约定见下文 §Brand Kit Reference。
  • 图像生成后端:下游技能准备好渲染时,会调用 product-shots-image-gen(产品拍摄图像生成引擎),由其封装底层 API(OmniMaaS / OpenAI / Gemini)。

工具

  • request_feedback — 通过 <suggestion> XML 格式实现(不是显式的 RPC 工具名称,而是通过结构化选项传递的一种 UX 模式)。
  • 不会直接调用图像生成。Hub 会生成 Brief;下游业务技能会调用 product-shots-image-gen。

品牌套件参考

状态机的第 2 阶段(视觉素材)将品牌套件列为结构化选项之一,与产品照片/参考图/无选项并列。品牌套件是用户提供的文件(路径)或描述品牌视觉形象的内嵌字段:

字段必填格式
brand_colors建议提供十六进制代码或命名调色板
brand_fonts建议提供字体系列名称(1 种标题字体 + 1 种正文字体)
brand_logo建议提供文件路径或 URL
brand_voice可选语气描述(例如,“亲和/权威”)
sample_assets可选1-3 张用于保持视觉连贯性的参考图

用户提供品牌套件后,Hub 会将这些字段传递到 Brief 中;下游业务技能(product-shots-main-image、product-shots-detail-page、product-shots-ad-creative、product-shots-social-post)会直接读取这些字段。若未提供,则使用匹配行业 DNA 中的默认值。

评论

支持 Markdown