一键导入
image-generation
// Generate game assets via Google Gemini API and process them into final sprite files. Use when creating new game sprites, generating concept art, or running the asset pipeline (Gemini image generation, sprite sheets, Imagen).
// Generate game assets via Google Gemini API and process them into final sprite files. Use when creating new game sprites, generating concept art, or running the asset pipeline (Gemini image generation, sprite sheets, Imagen).
Build 2D browser games with Phaser 3 (JS/TS): scenes, sprites, physics (Arcade/Matter), tilemaps (Tiled), animations, input. Trigger: 'Phaser scene', 'Arcade physics', 'tilemap', 'Phaser 3 game'.
Write player-focused, SEO-optimized blog posts for PixelDen. Use for any new article in content/blog/. Hard rule: NO technical/devlog content (no tech stack, code, internals, file paths, framework names). Audience is players, not developers.
Generate pixel-art tilesets and sprites via PixelLab MCP. Use when creating sidescroller platform tiles, top-down Wang tilesets, or other pixel-art assets through the PixelLab MCP server.
Use when the user wants to clean halo fragments or imperfect alpha from native-resolution pixel art sprites (PixelLab, Aseprite, or handmade). Invokes the Node/TypeScript CLI at scripts/pixelart-cleanup. Do NOT trigger for upscaled AI pixel art where one logical pixel spans many real pixels — that needs grid detection instead.
Post code review verdicts to Jira. Use after a code review is done and the user wants to sync the result to Jira. Triggers on: "post to Jira", "update the ticket", "sync review to Jira", or when a review is complete and Jira context is available (project key, issue number, or Atlassian MCP connected). Posts a concise verdict comment, flags blockers, and suggests workflow transitions.
Sandwich-structured code review for PRs, MRs, diffs, or pasted code. Triggers on: "review this", "check my PR/MR", "what do you think of this code", "is this OK to merge", or any paste of code/diff where the user wants feedback. Produces motivating reviews that clearly separate blockers from nitpicks. Always use this skill — even for quick reviews. The structure matters.
| name | image-generation |
| description | Generate game assets via Google Gemini API and process them into final sprite files. Use when creating new game sprites, generating concept art, or running the asset pipeline (Gemini image generation, sprite sheets, Imagen). |
Generuj game assety přes Google Gemini API a zpracuj je do finálních sprite souborů.
GEMINI_API_KEY=$(grep GEMINI_API_KEY .env | cut -d= -f2) \
node tools/generate-image.mjs "<prompt>" [--out <path>] [--aspect <ratio>] [--model <name>] [--count <n>] [--ref <image>]
| Model | Poznámka |
|---|---|
gemini-3-pro-image-preview | Default — nejlepší kvalita |
gemini-3.1-flash-image-preview | Rychlejší |
imagen-4.0-generate-001 | Imagen 4, podporuje --negative |
1:1 | 16:9 | 9:16 | 4:3 | 3:4
Pro sprite sheet (více assetů najednou):
node tools/generate-image.mjs \
"Pixel art sprite sheet of 8 breakout bricks in horizontal row, evenly spaced on pure black background. Colors: pink, red, orange, gold, green, cyan, blue, purple. Each brick ~2.5:1 aspect ratio, neon style, dark outline. No text." \
--out public/assets/games/breakout/bricks-sheet.png \
--aspect 4:3
Pro jednotlivý asset:
node tools/generate-image.mjs \
"Pixel art paddle bar for breakout game. Neon cyan, wide flat rectangle, white highlight, dark outline, glow. Pure black background. No text." \
--out public/assets/games/breakout/paddle-raw.png \
--aspect 16:9
pure black background (pro tmavé hry) nebo pure white background (pro světlé)No text, no other elements — jinak Gemini přidá random text~2.5:1 aspect ratio, 7 times wider than tallpixel art, 8-bit, retro arcade, neon glowing#00FFF2, magenta #FF00E4, dark bg #0A0E174:3 pro sprite sheety, 16:9 pro široké assety (paddle), 1:1 pro čtvercové (ball, ikony)process-sprites.mjsVŽDY po generování zpracuj obrázek. Gemini generuje velké obrázky (~1408x768) s hodně prázdného prostoru.
node tools/process-sprites.mjs <input> [options]
Options:
| Flag | Popis |
|---|---|
--out <path> | Výstupní cesta (default: přepíše input; s --split: prefix) |
--bg <black|white> | Barva pozadí k odstranění (default: auto-detect) |
--threshold <n> | Práh detekce (default: 20) |
--split | Rozřež sheet na jednotlivé sprity |
--names <a,b,c> | Jména pro split sprity (default: 0,1,2...) |
--square | Paduj na čtverec |
--pad <n> | Padding kolem obsahu (default: 2) |
--no-crop | Přeskoč crop |
--no-transparent | Přeskoč odstranění pozadí |
node tools/process-sprites.mjs raw-paddle.png \
--out public/assets/games/breakout/paddle.png \
--bg black
node tools/process-sprites.mjs sheet-raw.png \
--split --names head,body,corner,tail \
--out public/assets/games/snake/snake \
--bg white --square
# 1. Rozřež sheet (odstraní bílé bg)
node tools/process-sprites.mjs sheet-raw.png \
--split --names head,body,tail \
--out public/assets/games/snake/snake \
--bg white --square
# 2. Odstraň černé bg z každého spritu
for name in head body tail; do
node tools/process-sprites.mjs "public/assets/games/snake/snake-${name}.png" \
--bg black --threshold 8 --no-crop
done
Tool automaticky konvertuje JPEG/WebP na PNG (přes macOS sips).
# Smaž raw/sheet soubory, nechej jen finální assety
rm -f *-raw.png *-sheet.png *-gen.png *-new.png
| Typ | Cesta |
|---|---|
| Game sprites | public/assets/games/{slug}/{asset}.png |
| Game thumbnail | public/assets/games/{slug}/thumbnail.png |
| Hero banner | public/assets/placeholders/hero-banner.png |
| Placeholder thumbs | public/assets/placeholders/game-thumb-{n}.jpg |
Gemini generuje velké obrázky (800-1400px). V Phaseru se zobrazují malé (40x16, 80x12, atd).
VŽDY v kódu:
sprite.setDisplaySize(TARGET_W, TARGET_H);
// Pro dynamic body:
sprite.body!.setSize(TARGET_W, TARGET_H);
// Pro STATIC body (bricks) — POVINNÉ:
(sprite.body as Phaser.Physics.Arcade.StaticBody).setSize(W, H);
(sprite.body as Phaser.Physics.Arcade.StaticBody).updateFromGameObject();
Bez updateFromGameObject() na static bodies bude physics hitbox na špatné pozici!
Pro style-matching přidej --ref:
node tools/generate-image.mjs "new brick style matching reference" \
--ref public/assets/games/breakout/brick-0.png \
--out public/assets/games/breakout/brick-new.png