remix-add-image
Generate and add images to a Remix game
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generate and add images to a Remix game
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Generate and add sprites to a Remix game
Build and publish Remix games with the current Remix toolchain. Use when work touches the official Remix CLI, MCP server, REST publishing APIs, or the @remix-gg/sdk game runtime.
OpenAPI-first endpoint reference for Remix game publishing REST routes
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.
Quickstart for the official Remix MCP server. Use when configuring or operating `@remix-gg/mcp`, wiring MCP auth, or choosing the right Remix MCP tools and skill resources.
Enable multiplayer support for a Remix game
| name | remix-add-image |
| description | Generate and add images to a Remix game |
This skill guides you through generating an AI image and integrating its hosted
URL into your game HTML. Prefer MCP generateImage, which now generates and
uploads in one step.
IMPORTANT: Do NOT create a new game without checking first.
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.
Preferred MCP flow:
generateImage({
gameId: "<your-game-id>",
prompt: "a pixel-art treasure chest on a grassy hill",
fileName: "treasure-chest"
})
The tool returns a hosted asset URL directly. No base64 payload and no separate asset-upload step.
If you are writing direct REST calls instead of using MCP, fetch the exact path
and response shape from https://api.remix.gg/docs/json first.
Skip this step when using MCP generateImage; the tool already uploads the
generated image and returns the hosted URL.
For uploading non-image assets (audio, 3D models), see the
remix-upload-assetskill.
Add the asset URL to the game HTML. Size the image to match the game entity it represents -- do not render it at its native resolution. For example, if a treasure chest is a 32x32 tile in your game, draw or display the image at 32x32 regardless of the source image dimensions.
The integration method depends on how the image is used:
As an HTML image element:
<img src="https://returned-asset-url.png" alt="Treasure chest" width="32" height="32" />
As a CSS background:
.game-bg {
background-image: url("https://returned-asset-url.png");
}
As a JavaScript-loaded image (for canvas games):
const img = new Image();
img.src = "https://returned-asset-url.png";
img.onload = () => {
// draw at the entity's size, not the image's native size
ctx.drawImage(img, x, y, entityWidth, entityHeight);
};
const bg = new Image();
bg.src = "https://uploaded-asset-url/background.png";
bg.onload = () => {
function draw() {
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
// draw game objects on top...
requestAnimationFrame(draw);
}
draw();
};
const spriteSheet = new Image();
spriteSheet.src = "https://uploaded-asset-url/player-sprites.png";
spriteSheet.onload = () => {
// draw a 32x32 frame from the sprite sheet
ctx.drawImage(spriteSheet, frameX, frameY, 32, 32, player.x, player.y, 32, 32);
};
onload before starting the
game loop to avoid flickering or missing assets.