spritecook-build-ui-kits
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpriteCook Build UI Kits
SpriteCook 构建UI套件
Use this skill for complete screens and cohesive UI systems. Pair it with for credits, manifests, safe downloads, and shared defaults.
spritecook-workflow-essentialsRequires: SpriteCook MCP server connected to your editor. Set up with or see spritecook.ai.
npx spritecook-mcp setup本技能适用于构建完整界面及连贯UI系统。搭配可实现 credits、清单、安全下载及共享默认设置等功能。
spritecook-workflow-essentials要求: SpriteCook MCP服务器需连接至你的编辑器。可通过进行设置,或查看spritecook.ai。
npx spritecook-mcp setupChoose the Right Workflow
选择合适的工作流
- Use the UI-kit workflow for menus, HUDs, inventories, dialogs, settings, overlays, shops, character screens, and other compositions whose parts must share one visual language.
- Use only for one isolated icon, badge, button, control, divider, frame, or decoration.
generate_game_art(mode="ui") - For a new screen, always establish one coherent concept first, then extract production components from that concept. Do not generate unrelated controls independently and try to assemble a visual system afterward.
- 若需构建菜单、HUD、背包、对话框、设置界面、覆盖层、商店、角色界面等各部分需共享统一视觉语言的组合界面,请使用UI套件工作流。
- 仅当生成单个独立图标、徽章、按钮、控件、分隔符、框架或装饰元素时,才使用。
generate_game_art(mode="ui") - 对于新界面,务必先确立一个连贯的概念,再从该概念中提取生产级组件。切勿独立生成无关控件后再尝试组装视觉系统。
Default Workflow
默认工作流
- Confirm the UI-kit tools are present, then call before starting the multi-image workflow. If the tools are missing, refresh or reconnect the SpriteCook MCP integration; do not fall back to independently generating a full screen with
get_credit_balance.mode="ui" - Create the kit with and preserve its
create_ui_kit. Keep the defaultidunless the user specifically requests Gemini and their account supports 2K Gemini generation.model="gpt-image-2" - Establish the concept:
- If the user or agent already has a suitable owned SpriteCook asset ID, pass it as . This selects it immediately and skips concept generation.
concept_asset_id - If the concept is a local file, use first, then pass the returned ID as
spritecook-upload-assets.concept_asset_id - Otherwise call , follow progress with
generate_ui_kit_concepts, inspect the returned concept assets, and callget_ui_kitwith the strongest option.select_ui_kit_concept
- If the user or agent already has a suitable owned SpriteCook asset ID, pass it as
- Call . Omit
generate_ui_kit_component_sheetsto let SpriteCook plan one to three sheets from the concept.sheet_count - Follow progress with until
get_ui_kitisstatusand component-sheet assets are present.sheet_review - Call without
extract_ui_kit_componentsto process every sheet from the selected or latest successful attempt.sheet_asset_ids - Inspect and the returned component draft programmatically. Confirm names are distinct, each rectangle represents one useful element, state families are sensible, and scalable components are marked correctly. If
quality_summaryis true, resolve every relevant warning before finalizing.requires_review - Call with no
finalize_ui_kitargument only when the saved draft is sensible andcomponentsis false. Otherwise supply a corrected component list with fixed names, groups, states, rectangles, scalability, or 9-slice borders.quality_summary.requires_review - Preserve the UI-kit ID, finalized component asset IDs, and manifest in the project asset manifest.
Continue through extraction and finalization by default. The returned is an optional quality-control surface, not a required handoff. Use it when detection is ambiguous, the user asks to inspect the work, or scalable borders need visual tuning.
review_url- 确认UI套件工具已就绪,在启动多图工作流前调用。若工具缺失,请刷新或重新连接SpriteCook MCP集成;切勿退而求其次,使用
get_credit_balance独立生成完整界面。mode="ui" - 调用创建套件并保留其
create_ui_kit。除非用户明确要求Gemini且其账户支持2K Gemini生成,否则默认使用id。model="gpt-image-2" - 确立概念:
- 若用户或Agent已有合适的SpriteCook自有资产ID,将其作为传入。这将直接选中该资产并跳过概念生成步骤。
concept_asset_id - 若概念为本地文件,请先使用上传,再将返回的ID作为
spritecook-upload-assets传入。concept_asset_id - 否则调用,通过
generate_ui_kit_concepts跟踪进度,检查返回的概念资产,然后调用get_ui_kit选择最优方案。select_ui_kit_concept
- 若用户或Agent已有合适的SpriteCook自有资产ID,将其作为
- 调用。省略
generate_ui_kit_component_sheets参数,让SpriteCook根据概念规划1至3张组件表。sheet_count - 通过跟踪进度,直到
get_ui_kit变为status且组件表资产已生成。sheet_review - 调用时不传入
extract_ui_kit_components,以处理所选或最新成功生成的所有组件表。sheet_asset_ids - 以编程方式检查及返回的组件草稿。确认名称唯一、每个矩形代表一个有用元素、状态分类合理、可缩放组件标记正确。若
quality_summary为true,在定稿前需解决所有相关警告。requires_review - 仅当保存的草稿合理且为false时,调用
quality_summary.requires_review且不传入finalize_ui_kit参数。否则需提供修正后的组件列表,包含修正后的名称、分组、状态、矩形区域、可缩放性或9-slice边框。components - 将UI套件ID、定稿后的组件资产ID及清单保存至项目资产清单中。
默认需完成提取和定稿步骤。返回的是可选的质量控制界面,并非必须交付的内容。仅当检测结果不明确、用户要求检查工作或可缩放边框需要视觉调优时使用该链接。
review_urlCreating the Kit
创建套件
Give the screen intent, platform, aspect ratio, game description, visual direction, and screen-specific instructions. Use only for owned images that define the broader art direction.
create_ui_kitstyle_asset_idsFor UI kits, use by default. The accepted canonical alternatives are and , but UI-kit concepts are 2K and those Gemini models require a plan that independently allows 2K generation. If the server returns , retry by creating or updating the kit with ; no generation credits were spent on that validation error. Do not use legacy model IDs.
gpt-image-2gemini-3.1-flash-imagegemini-3-pro-imageui_kit_model_resolution_limitmodel="gpt-image-2"-previewUse when the user needs only what appears in the concept. Use for production control families that should include normal, hover/focus, pressed, disabled, checked, or selected variants.
state_mode="visible-only"state_mode="complete-states"Set the state mode when creating the kit. Omit from to preserve that stored choice; pass it there only when intentionally overriding the kit for this sheet attempt.
state_modegenerate_ui_kit_component_sheetsAn existing is the specific screen concept being decomposed. It is different from , which provide ambient visual guidance.
concept_asset_idstyle_asset_ids向传入界面用途、平台、宽高比、游戏描述、视觉方向及界面特定指令。仅当使用自有图片定义整体艺术风格时,才传入。
create_ui_kitstyle_asset_ids对于UI套件,默认使用。可接受的规范替代模型为和,但UI套件概念为2K分辨率,这些Gemini模型需要独立支持2K生成的计划。若服务器返回,请通过创建或更新套件并设置重试;该验证错误不会消耗生成 credits。请勿使用旧版模型ID。
gpt-image-2gemini-3.1-flash-imagegemini-3-pro-imageui_kit_model_resolution_limitmodel="gpt-image-2"-preview当用户仅需要概念中显示的内容时,使用。若需包含正常、悬停/聚焦、按下、禁用、选中或勾选等变体的生产级控件系列,请使用。
state_mode="visible-only"state_mode="complete-states"创建套件时设置状态模式。在中省略以保留已存储的选择;仅当有意为本次组件表生成覆盖套件设置时,才传入该参数。
generate_ui_kit_component_sheetsstate_mode现有是待分解的特定界面概念,与提供环境视觉指导的不同。
concept_asset_idstyle_asset_idsRefining Results
优化结果
- Regenerate concepts with to explore a fresh batch.
revision_notes - Refine one concept with and
edit_source_asset_id.edit_notes - Use when only a subset such as buttons, inventory slots, or HUD meters is needed. A focused request uses one sheet.
focus_notes - Use for missing pieces without replacing accepted sheets.
supplemental_notes - Refine one component sheet with and
edit_source_asset_id.edit_notes - Request only when the user's plan supports 4K and larger source components materially help.
high_resolution=true
Paid concept and sheet tools return job IDs immediately. Do not treat submission as completion; call until the workflow reaches the expected review status.
get_ui_kit- 使用重新生成概念,以探索新的方案批次。
revision_notes - 使用和
edit_source_asset_id优化单个概念。edit_notes - 当仅需要按钮、背包槽或HUD仪表等子集时,使用。聚焦请求将使用一张组件表。
focus_notes - 使用补充缺失内容,无需替换已接受的组件表。
supplemental_notes - 使用和
edit_source_asset_id优化单个组件表。edit_notes - 仅当用户计划支持4K分辨率且更大的源组件确实有帮助时,才请求。
high_resolution=true
付费概念和组件表工具会立即返回任务ID。请勿将提交视为完成;需调用直到工作流达到预期的审核状态。
get_ui_kitExtraction and 9-Slice Rules
提取与9-Slice规则
extract_ui_kit_components12410Always audit the returned before finalization:
quality_summary- A sheet with reached the 100-detection ceiling. Check whether small components were omitted or merged.
at_component_limit=true - Inspect and split an obvious multi-object rectangle into separate corrected rectangles, or omit it when its contents already exist separately.
possible_merged - Fix duplicate or vague names and correct controls misclassified as panels or decorations.
- Give obvious interaction families one stable and distinct
groupvalues such as normal, hover, pressed, disabled, on/off, selected/unselected, or checked/unchecked.state - Treat fallback classification as a reason to review all names and types.
- Keep at most 100 finalized components per source sheet, at most three sheets, and at most 300 components total. If splitting a merged rectangle would exceed 100 on a sheet, remove low-value duplicates or combine corrections before finalizing.
Automatic extraction initializes all 9-slice borders to zero. Zero is correct for fixed-size icons and decorations. For scalable panels, buttons, inputs, tooltips, tracks, and frames, set non-zero , , , and borders only when the protected edges can be identified confidently. Use the optional browser review for precise visual placement.
lefttoprightbottomFinalization returns reusable private component assets plus a manifest containing type, state group, state, dimensions, scalability, and 9-slice metadata. Unity, Godot, and web archive downloads remain available from the browser review page; MCP supplies the assets and manifest directly.
extract_ui_kit_components12410定稿前务必审核返回的:
quality_summary- 若,说明已达到100个检测上限。请检查是否遗漏或合并了小型组件。
at_component_limit=true - 检查,将明显的多对象矩形拆分为单独的修正矩形,或当其内容已单独存在时省略该矩形。
possible_merged - 修复重复或模糊的名称,纠正被错误分类为面板或装饰元素的控件。
- 为明确的交互系列设置一个稳定的和不同的
group值,例如normal、hover、pressed、disabled、on/off、selected/unselected或checked/unchecked。state - 将 fallback分类视为审核所有名称和类型的理由。
- 每个源表最多保留100个定稿组件,最多3张组件表,总计最多300个组件。若拆分合并矩形会导致单张表超过100个组件,请在定稿前移除低价值重复项或合并修正内容。
自动提取会将所有9-slice边框初始化为0。0值适用于固定尺寸的图标和装饰元素。对于可缩放面板、按钮、输入框、提示框、轨道和框架,仅当能可靠识别受保护边缘时,才设置非零的、、和边框。可使用可选的浏览器审核界面进行精确的视觉定位。
lefttoprightbottom定稿后将返回可复用的私有组件资产及包含类型、状态组、状态、尺寸、可缩放性和9-slice元数据的清单。Unity、Godot及Web存档下载可从浏览器审核页面获取;MCP会直接提供资产和清单。
Recovery
恢复操作
- Use if the kit ID is lost, then continue with
list_ui_kits.get_ui_kit - Use to stop active concept or component-sheet jobs for the kit.
cancel_ui_kit - Keep the returned ; it opens the same durable kit in SpriteCook without making review mandatory.
review_url - Surface brief, user-friendly errors. Preserve successful concepts or sheets after partial failures and continue from them when possible.
- 若丢失套件ID,使用查询,然后通过
list_ui_kits继续操作。get_ui_kit - 使用停止套件的活跃概念或组件表任务。
cancel_ui_kit - 保存返回的;该链接可在SpriteCook中打开同一个持久化套件,无需强制审核。
review_url - 显示简洁、用户友好的错误信息。部分失败后保留成功生成的概念或组件表,并尽可能从中继续开发。