spritecook-workflow-essentials

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SpriteCook Workflow Essentials

SpriteCook 工作流核心规范

Use this alongside the SpriteCook image or animation skill whenever SpriteCook MCP tools are available.
Requires: SpriteCook MCP server connected to your editor. Set up with
npx spritecook-mcp setup
or see spritecook.ai.
只要有 SpriteCook MCP 工具可用,就可以配合 SpriteCook 图像或动画 skill 一起使用。
依赖要求: 你的编辑器需要连接 SpriteCook MCP 服务器。可通过
npx spritecook-mcp setup
命令完成配置,或访问 spritecook.ai 查看详情。

Preflight Checklist

前置检查清单

  1. Check credits first with
    get_credit_balance
    before starting a batch or multi-asset workflow.
  2. Prefer presigned download URLs over authenticated asset endpoints.
  3. Save important
    asset_id
    values in a local manifest whenever there is a writable workspace, unless the user explicitly wants a throwaway result.
  1. 在启动批量处理或多资产工作流之前,先通过
    get_credit_balance
    检查剩余积分。
  2. 优先使用预签名下载 URL,而非需要认证的资产接口。
  3. 只要存在可写入的工作区,就将重要的
    asset_id
    值保存到本地清单中,除非用户明确需要临时生成的结果。

Credential Safety

凭证安全

  • Never ask the user to paste a SpriteCook API key into chat, prompts, code blocks, shell commands, or generated files.
  • Never print, persist, echo, or inline API keys or
    Authorization
    headers in agent output.
  • Prefer SpriteCook MCP tools, presigned URLs, or a preconfigured local connector/helper that handles authentication outside the prompt.
  • If a raw API call is required and no authenticated helper exists, stop and ask the user to configure one.
  • 永远不要要求用户将 SpriteCook API 密钥粘贴到聊天内容、提示词、代码块、shell 命令或生成的文件中。
  • 永远不要在 Agent 输出中打印、持久化、回显或者内联 API 密钥或
    Authorization
    请求头。
  • 优先使用 SpriteCook MCP 工具、预签名 URL,或者在提示词外处理认证的预配置本地连接器/辅助工具。
  • 如果需要调用原生 API 且没有可用的认证辅助工具,请终止流程并要求用户先配置相关工具。

Defaults

默认配置

  • Prefer
    smart_crop_mode="tightest"
    for the best default results. Use
    "power_of_2"
    only when the user explicitly asks for it.
  • Model guidance:
    • gemini-2.5-flash-image
      : cheapest
    • gemini-3.1-flash-image-preview
      : recommended default
    • gemini-3-pro-image-preview
      : most expensive
  • 优先使用
    smart_crop_mode="tightest"
    获得最优的默认效果。仅当用户明确要求时才使用
    "power_of_2"
  • 模型选择指引:
    • gemini-2.5-flash-image
      :成本最低
    • gemini-3.1-flash-image-preview
      :推荐默认选项
    • gemini-3-pro-image-preview
      :成本最高

Asset Manifest

资产清单

  • Treat
    asset_id
    as the primary stable identifier.
  • Store a 12-character SHA-256 prefix (
    sha12
    ) for saved local files.
  • Use a minimal manifest entry shape:
    • asset_id
    • sha12
    • optional
      label
  • Prefer a simple machine-readable file such as
    spritecook-assets.json
    unless the project already has an asset manifest.
  • Before generating a new reference asset or asking the user for an asset id, check the local manifest first.
  • Before reusing a local file, compute its
    sha12
    and match it against the manifest to recover the correct
    asset_id
    .
  • asset_id
    作为主要的稳定标识符。
  • 为本地保存的文件存储 12 位的 SHA-256 前缀(
    sha12
    )。
  • 使用最简清单条目结构:
    • asset_id
    • sha12
    • 可选的
      label
  • 除非项目已有资产清单,否则优先使用简单的机器可读文件,例如
    spritecook-assets.json
  • 在生成新的参考资产或向用户索要 asset id 之前,请先检查本地清单。
  • 在复用本地文件之前,计算其
    sha12
    并与清单匹配,以恢复正确的
    asset_id

Downloading Assets

资产下载

  • Prefer
    _presigned_pixel_url
    when saving the pixel PNG.
  • Prefer
    _presigned_url
    when saving the raw/original image.
  • Avoid direct authenticated download endpoints in skill-driven workflows unless a helper handles auth out of band.
  • 保存像素 PNG 时优先使用
    _presigned_pixel_url
  • 保存原始/原图时优先使用
    _presigned_url
  • 除非有辅助工具在流程外处理认证,否则在 skill 驱动的工作流中避免直接使用需要认证的下载接口。