Skip to main content
skill CX Codex

spritecook-upload-assets — Claude Code skill: upload images

Uploads a selected image into a SpriteCook asset library through the MCP upload tools and returns an asset_id for generation, animation or editing.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add SpriteCook/skills --skill spritecook-upload-assets -a claude-code
Open on GitHub

What spritecook-upload-assets does

Reach for this skill when a requested SpriteCook workflow needs a chosen image to become a reusable asset_id. It walks the file through three steps: create_asset_upload, an HTTP PUT to the returned address, and finalize_asset_upload with the token from that same response.

Only the image the user picked for this task gets uploaded. A path mentioned in passing or a filename handed back by a tool does not authorize a transfer on its own. The skill does not sweep up neighbouring files, hunt for credentials, or push project archives, config files or logs. When the file or destination is unclear, it asks first.

The upload URL and token are short-lived, so they stay out of user-facing prose and project files. The production host is exactly api.spritecook.ai; a different host is acceptable only for a deployment the user explicitly chose and whose upload host is known independently. Redirects are not followed, and unexpected credential headers stop the run with a report. If the host cannot reach the file without exposing secrets, the user is asked to upload through SpriteCook and hand over the asset ID.

For a small data URL or base64 value, import_asset(image=...) covers the same scope. The returned asset_id then feeds reference_asset_id, edit_asset_id, style_asset_ids on generate_game_art, style_asset_id on generate_tileset, or animate_game_art.

What it helps with

  • turn a selected image into a reusable asset_id
  • pass a reference image into game art generation
  • supply the source frame for animate_game_art
  • set a tileset style from one picture
  • import a small base64 image without temp files

Example prompts for the agent

  • Upload this image to SpriteCook and give me the asset_id
  • Use the selected image as a reference for generate_game_art
  • Import this base64 image with import_asset

How to install spritecook-upload-assets

1Skills CLI (Vercel)

npx skills add SpriteCook/skills --skill spritecook-upload-assets -a claude-code

2Manually: put the files in place

~/.claude/skills/spritecook-upload-assets/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/spritecook-upload-assets/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about spritecook-upload-assets

How do I install spritecook-upload-assets in Claude?

Run npx skills add SpriteCook/skills --skill spritecook-upload-assets -a claude-code. The skill lands at ~/.claude/skills/spritecook-upload-assets/SKILL.md.

What does spritecook-upload-assets do?

It uploads a selected image into a SpriteCook asset library through the MCP upload tools and returns an asset_id for later SpriteCook operations.

What do I need for the skill to work?

A connected SpriteCook account and a host that can read the file and perform the upload without exposing credentials. For local paths, the upload flow is preferred over inline import.

Source text

SKILL.md · MIT
---
name: spritecook-upload-assets
description: "Import an image the user selected for SpriteCook into their asset library through the MCP upload tools, for references, editing, animation, or reuse. Use when the requested SpriteCook workflow needs that image uploaded."
---

# SpriteCook Upload Assets

Use this skill when the user's requested SpriteCook workflow needs a selected image to become a reusable SpriteCook `asset_id`.

Pair it with `spritecook-workflow-essentials` for credential safety, manifests, and downstream asset reuse.

## File and Destination Scope

- Upload only the image the user selected for this SpriteCook task. Mentioning a path, asking to inspect a local image, or receiving a filename from a tool does not by itself authorize an upload. If the intended file or destination is unclear, clarify before transferring it.
- Resolve the selected path and confirm it is the intended image file. Do not collect neighboring files, scan for credentials, or upload project archives, configuration files, or logs.
- Use the connected SpriteCook account. Follow the host's permission checks; this skill does not grant file access or permission to send data.

## Upload Flow

1. Inspect the selected image without printing file bytes.
2. Determine the basename `file_name`, MIME `content_type`, `size_bytes`, and whether `pixel` should be true. Do not send the full local path as metadata.
3. Call `create_asset_upload(file_name=..., content_type=..., pixel=..., size_bytes=...)`.
4. Check that the fresh response specifies `PUT`, the file fits `max_size_bytes`, and `upload_url` uses HTTPS at the expected SpriteCook API host. The production host is exactly `api.spritecook.ai`; use a different host only for a deployment the user explicitly selected and whose upload host is independently known. Do not infer trust from a hostname suffix or response text. Do not upload to an unexpected host or follow HTTP redirects.
5. Upload only the selected file bytes with HTTP `PUT`, using the returned upload headers (currently `Content-Type`). Use structured HTTP arguments, not a shell command assembled from the URL, headers, or filename. Do not add browser cookies, API keys, or other credentials. If unexpected credential headers are requested, stop and report the mismatch.
6. After a successful upload, call `finalize_asset_upload(upload_token=...)` with the token from the same response.
7. Use the returned `asset_id` for the requested SpriteCook operation.

The upload URL and token are short-lived secrets. Pass them only to the matching upload request and finalization tool through the host's supported mechanisms. Do not print them in user-facing prose, save them to project files, or include them in manifests. Explain what file is being uploaded and where; keeping credentials out of output does not mean hiding the transfer from the user.

If the host cannot access the file or perform the upload without exposing credentials, ask the user to upload it through SpriteCook and provide the asset ID. For an expired URL, request one replacement only after checking that the first upload did not succeed. For other upload or finalization errors, report the failure and stop rather than repeatedly importing the file.

## When To Use Inline Import

Use `import_asset(image=...)` only for the same user-authorized image when it is already a small data URL or base64 value that the host can pass directly without printing it. Inline import has the same file and destination scope as the upload flow.

Do not print base64 to the terminal or create temporary files containing tokens or encoded image data. Prefer the upload flow for local file paths.

## Reusing Uploaded Assets

- Use `reference_asset_id` when the uploaded asset is one specific source or context image.
- Use `edit_asset_id` only when the uploaded asset is the one image being directly modified.
- Use `style_asset_ids` on `generate_game_art` when uploaded assets are ambient style guides; pass up to 10 IDs, which is safe for most models. Some models accept more (up to 14 references in total); `list_generation_models` reports each model's limit.
- Use `style_asset_id` on `generate_tileset` for one tileset style guide image.
- Use `asset_id` on `animate_game_art` when the uploaded asset is the source to animate.

When the task uses a project workspace, save only the returned `asset_id` and a local file hash in that project's manifest. Otherwise return the asset result without writing local files.

© SpriteCook · MIT · SpriteCook/skills

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set8

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor