remix-add-sprite

Generate and add sprites to a Remix game

8 stars

Best use case

remix-add-sprite is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate and add sprites to a Remix game

Teams using remix-add-sprite should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/remix-add-sprite/SKILL.md --create-dirs "https://raw.githubusercontent.com/farworld-labs/remix-skills/main/skills/remix-add-sprite/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/remix-add-sprite/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How remix-add-sprite Compares

Feature / Agentremix-add-spriteStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate and add sprites to a Remix game

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Add Sprite to Game Workflow

## Overview

This skill guides you through generating sprite sheets for canvas-based games
on the Remix platform.

## Prerequisites

- The game HTML file must already exist (follow the **game-creation** workflow
  first if starting from scratch).
- A game must be created on the Remix platform (you need a game ID).
- The `REMIX_API_KEY` environment variable must be set.

## Steps

### 1. Check for Existing Game ID

Use `gameId` from task context or prior tool results when available.

Otherwise, read the nearest `.remix-cli.json`. Older projects may still use
`.remix-mcp.json`. If either contains a `gameId`, reuse it.

Only if none of those sources contain a `gameId` should you follow the
**upload-game** workflow to create one.

### 2. Generate the Sprite Sheet

Prefer MCP `generateSpriteSheet`:

```js
generateSpriteSheet({
  gameId: "<your-game-id>",
  prompt: "a pixel-art knight walking, side view, 2D game character",
  gridSize: 4
})
```

The response includes hosted `spriteUrl`, `transparentSpriteUrl`, grid metadata,
and any warnings. If you need to write REST calls instead, confirm the exact
schema from the OpenAPI spec first.

### 3. Integrate the Sprite Sheet into the Game

Use the returned URL with canvas `drawImage` to render individual frames:

```js
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.

## Tips

- **Be specific about frame count and action.** "4-frame walk cycle" is better
  than "walking character".
- **Specify art style.** Include "pixel-art", "hand-drawn", "flat vector", etc.
  in your prompt.
- **Frame layout follows the returned grid metadata.** Do not assume a single
  horizontal strip; compute frame width and height from the generated sheet and
  requested `gridSize`.
- **Use `transparentSpriteUrl` for in-game sprites** that need to overlay
  backgrounds or other elements.
- **Preload before gameplay.** Wait for `onload` before starting the game loop.

Related Skills

remix-upload-game

8
from farworld-labs/remix-skills

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.

remix-upload-asset

8
from farworld-labs/remix-skills

Upload images, audio, or 3D models as hosted game assets

remix-submission-rules

8
from farworld-labs/remix-skills

Validation and publish constraints for Remix game submissions

remix-shop-items

8
from farworld-labs/remix-skills

Create, update, delete, and integrate Remix shop items. Use when a game needs Bits items, consumables, one-time unlocks, tier unlocks, store icons, or purchase handling in @remix-gg/sdk code.

remix-save-game

8
from farworld-labs/remix-skills

Add save and load game state functionality via RemixSDK

remix-rest-snippets

8
from farworld-labs/remix-skills

REST client snippets for Remix agent publishing

remix-open-game

8
from farworld-labs/remix-skills

Open a game in the Remix Studio browser for preview and editing

remix-multiplayer

8
from farworld-labs/remix-skills

Enable multiplayer support for a Remix game

remix-game-sdk

8
from farworld-labs/remix-skills

Reference for the current @remix-gg/sdk runtime. Use when generating or repairing Remix game code, shop item integrations, save-state flows, multiplayer hooks, or host-safe mobile UI behavior.

remix-game-creation

8
from farworld-labs/remix-skills

Create a new game draft via the Remix API

remix-game-best-practices

8
from farworld-labs/remix-skills

Mobile-first game creation best practices for Remix

remix-cli

8
from farworld-labs/remix-skills

Use the official Remix CLI for authentication, config inspection, game creation, uploads, and analytics. Trigger this skill when a task involves `remix login`, `remix whoami`, `.remix-cli.json`, `REMIX_API_KEY`, or terminal-based game management on Remix.