OpenParable
Skip to content
← Back to skills

Pocketjs Gba Imagegen

Design
pocketjs-gba-imagegen

Pocketjs Gba Imagegen is an Agent Skill for design published in the pocket-stack/pocketjs repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Generate original GBA-friendly pixel-art asset source sheets through Codex app-server and ImageGen, then save PNGs for PocketJS AOT asset baking. Use when a local coding agent needs reusable tiles, 16x16 character sprites, RPG item icons, or generic Game Boy Advance-style pixel art through the shared Codex image generation path.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/pocket-stack/pocketjs/blob/HEAD/skills/pocketjs-gba-imagegen/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pocketjs-gba-imagegen, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

PocketJS GBA ImageGen

Overview

Use this skill when a PocketJS or local Codex agent needs GBA-class pixel-art source images without hand-driving the built-in ImageGen tool. The standard entrypoint is bun imagegen; it starts a temporary Codex app-server on localhost, sends a single ImageGen turn, captures the image_generation result from the app-server event stream, and writes the PNG requested by --out.

The prompt is intentionally generic to the platform category. It must not ask for a specific existing game, franchise, creature, character, logo, or visual style clone.

Standard Workflow

  1. Confirm the target branch and local changes:
git status --short --branch
  1. Generate a source sheet with the Bun TypeScript CLI:
bun imagegen --out aot/demo/imagegen/gba-source.png
  1. Add an art-direction seed only when the user asks for one:
bun imagegen --out aot/demo/imagegen/rainy-port-source.png --theme "rainy port town with stone quays and lanterns"
  1. Use --json when another coding agent needs machine-readable output:
bun imagegen --out /tmp/gba-sheet.png --json
  1. If replacing the AOT demo source sheet, rerun the deterministic extractor:
bun aot/demo/imagegen/build-assets.ts

Prompt Profiles

Use --kind sprite-sheet for the default mixed source sheet: terrain cells plus one generic four-direction walking character.

Use --kind tileset for top-down background terrain and props.

Use --kind character for one 16x16-style walking sprite with down/up/left/right facings and two walk frames per facing.

Use --kind items for small RPG item icons that remain readable as 16x16 sprites.

Constraints

  • Keep all command wrappers in Bun TypeScript. Do not add native shell scripts for this workflow.
  • Generate original assets only; avoid franchise terms and existing character references.
  • Keep the output as a source sheet on a neutral background with gutters so later scripts can crop or quantize it.
  • Treat the generated PNG as source art. The AOT runtime still requires deterministic 4bpp extraction before the image can ship as cartridge data.