skills/remix-add-sprite/SKILL.md
Generate and add sprites to a Remix game
npx skillsauth add farworld-labs/remix-skills remix-add-spriteInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides you through generating sprite sheets for canvas-based games on the Remix platform.
REMIX_API_KEY environment variable must be set.Read .remix-settings.json in the current directory. If it exists and contains
a gameId, use that value.
Only if .remix-settings.json does not exist or has no gameId should you
follow the upload-game workflow to create one.
Call the sprite generation endpoint:
POST https://api.remix.gg/v1/games/{gameId}/sprites/generate
Authorization: Bearer $REMIX_API_KEY
Content-Type: application/json
{
"prompt": "a pixel-art knight walking animation, 4 frames",
"gridSize": 4,
"imageUrl": null
}
Parameters:
prompt (required) -- description of the sprite and animationgridSize (optional) -- number of frames in the sprite sheet gridimageUrl (optional) -- reference image URL to base the sprite onThe response returns spriteUrl and transparentSpriteUrl directly (already
hosted -- no separate upload step needed).
Use the returned URL with canvas drawImage to render individual frames:
const sprite = new Image();
sprite.src = "https://returned-sprite-url.png";
const frameWidth = 64; // width of a single frame
const frameHeight = 64; // height of a single frame
const totalFrames = 4;
let currentFrame = 0;
sprite.onload = () => {
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw the current frame from the sprite sheet
ctx.drawImage(
sprite,
currentFrame * frameWidth, 0, // source x, y in the sprite sheet
frameWidth, frameHeight, // source width, height
player.x, player.y, // destination x, y on canvas
frameWidth, frameHeight // destination width, height
);
currentFrame = (currentFrame + 1) % totalFrames;
requestAnimationFrame(animate);
}
animate();
};
Use transparentSpriteUrl when you need the sprite rendered over other
game elements without a background.
gridSize to get individual frame dimensions.transparentSpriteUrl for in-game sprites that need to overlay
backgrounds or other elements.onload before starting the game loop.content-media
Generate and add images to a Remix game
development
Build lightweight mobile-friendly 3D browser games with Three.js
tools
Upload and validate HTML game code for Remix. Use when creating or updating a draft version through the CLI, MCP tools, or direct REST calls.
data-ai
Upload images, audio, or 3D models as hosted game assets