SKILL.md
SpriteCook Workflow Essentials
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.
Preflight Checklist
- Check credits first with
getcreditbalancebefore starting a batch or multi-asset workflow. - Use each asset's
spriteurlas the canonical downloadable image URL. Usespritesheeturlonly when it is present and specifically needed. - Save important
asset_idvalues in a local manifest whenever there is a writable workspace, unless the user explicitly wants a throwaway result. - When a workflow involves follow-up generations or animations for the same subject, identify and reuse the canonical
asset_idinstead of generating from scratch again. - If the agent loses track of generated asset IDs, recover them with
listrecentassets(limit=...)before failing.
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
Authorizationheaders 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.
Async Operations
- Treat
generategameart,generatetileset,removebackground,generatecharacter,generatecharacteranimations, andanimategame_artas asynchronous operations. - Follow the returned
poll.toolwith its exactpoll.arguments. Do not invent a polling endpoint or search arbitrary response fields. - Use
operationidas the generic identifier while retaining the returnedjobidorrun_idfor the matching poll tool. - Pass
wait_secondsonly when the tool exposes it and an explicit bounded wait is useful; the normal default is immediate return. - On a terminal success, consume canonical
assets. If the response containswarning.code="assetoutputunavailable", execute its suppliedwarning.recoverytool call.
Asset Library Tools
- Use
spritecook-upload-assetspluscreateassetuploadandfinalizeassetuploadwhen a local file path needs to become a SpriteCook asset before animation, editing, reference, or tileset-style reuse. - Use
importasset(image=..., pixel=..., displayname=..., file_name=...)only when the image is already a small data URL or raw base64 value that can be passed without printing it. - Use
removebackground(assetid=...)for owned SpriteCook assets that need a transparent cutout. Useremove_background(image=...)only when the user supplies local image data and does not need a reusable imported asset first. Poll the returned job contract for the cleaned asset. - Use
updateassetlabel(asset_id=..., label=...)after generation, import, or cleanup when a clearer asset name will help the project manifest or future agent steps. - Do not tell the user to use the SpriteCook HTTP API or API keys for local image import when the SpriteCook MCP tools are available. Prefer the upload bridge for file paths.
UI Kit Tools
- Use
spritecook-build-ui-kitsfor complete UI screens and cohesive systems. Build or select one concept first, then generate sheets and extract components from that shared visual source. - If the UI-kit MCP tools are missing, refresh or reconnect the SpriteCook integration. Do not silently substitute several unrelated
generategameart(mode="ui")calls for a full screen. - Pass an existing owned concept to
createuikit(conceptassetid=...)when the user or agent already has a suitable SpriteCook asset. Do not regenerate it merely to enter the UI-kit workflow. - Keep
generategameart(mode="ui")for a single isolated UI asset such as an icon, badge, control, divider, or decoration. - Treat UI-kit concept and sheet generation as multi-asset work: check credits first, preserve the kit ID, and poll with
getuikituntil queued jobs settle. - Keep
gpt-image-2as the UI-kit model default. Gemini UI-kit concepts require an account that independently supports 2K generation. - Inspect extraction
quality_summarybefore finalization and followspritecook-build-ui-kitswhen it requires corrections.
Preset Tools
- When the user says to use one of their saved presets, call
list_presets(query=...)first and identify the best matching preset by title, mode, and status. - Then call
getpresetsettings(preset_id=...)and apply the returned settings as guidance for the next SpriteCook MCP generation or edit tool. - Treat presets as saved settings and reference guidance, not as a separate generation path.
- Private draft presets can return owned reference asset IDs in
settings.reference.styleAssetIds,contextAssetId, andeditAssetId. - For still-image generation, map
settings.reference.styleAssetIdstostyleassetidsongenerategameart; use up to 10 IDs. - Treat style guide images as ambient style context for new related assets; agents do not need to restate them in the prompt unless calling out a specific visual trait.
- Map
settings.reference.contextAssetIdtoreferenceassetidwhen the preset provides one specific visual/context reference asset. - Use
referenceassetidwhen a prompt refers to one specific source or context asset, such as a particular building, character, prop, or part. - Use
editassetidonly for the one asset being directly modified. - Published presets can return frozen preset media URLs in
settings.reference.styleUploadUrls,contextUploadUrl, andeditUploadUrl; use these only when the target MCP tool supports upload URL references. - Use
saveprivatepreset(...)only when the user explicitly asks to save a private preset. It creates a private draft preset only and does not publish, share, or submit anything for moderation.
Defaults
- Prefer
smartcropmode="tightest"for the best default results. Use"powerof2"only when the user explicitly asks for it. - Model guidance:
- gemini-2.5-flash-image: cheapest - gemini-3.1-flash-image: recommended default for ordinary still-image generation - gemini-3-pro-image: most expensive
- Focused workflow defaults override this general guidance. In particular, UI kits default to
gpt-image-2because their concept and sheet pipeline uses 2K output.
Asset Manifest
- Treat
asset_idas 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.jsonunless 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
sha12and match it against the manifest to recover the correctasset_id.
Downloading Assets
- For recent-asset recovery flows, prefer
listrecentassets(limit=...). - Treat
sprite_urlas the single primary asset URL to inspect, save, or hand off to downstream tools. - Treat
spritesheet_urlas an optional secondary artifact. Use it only when present and only when you specifically need a spritesheet export. - For single-asset inspection flows,
getassetmetadata(assetid)also exposes canonicalassetid,spriteurl, and optionalspritesheeturlfields. - Treat
url,pixelurl, andrawurlas compatibility aliases rather than the primary contract. - Avoid relying on low-level internal fields such as
presignedpixelurlorpresigned_urlin agent-facing workflows unless no higher-level field is available. - Avoid direct authenticated download endpoints in skill-driven workflows unless a helper handles auth out of band.