AgentSkillsCN

sprite-forge

SNES 像素艺术资产流水线助手。专注于 Palette 管理、精灵表切割,以及为 Oracle of Secrets 提供 4bpp 转换工作流。

SKILL.md
--- frontmatter
name: sprite-forge
description: SNES pixel art asset pipeline assistant. specialized in palette management, sprite sheet slicing, and 4bpp conversion workflows for Oracle of Secrets.

Sprite Forge

Scope

  • Generate and validate 15-color SNES palettes.
  • Slice and format png sprite sheets for 16x16 grid alignment.
  • Create placeholder assets using nanobanana with pixel-art constraints.
  • Assist with png -> 4bpp conversion workflows.

Core Competencies

1. Palette Management

  • SNES Color Math: RGB555 format (0-31 per channel).
  • Constraints: 15 colors + 1 transparent (index 0).
  • Calculations: Convert Hex #RRGGBB to SNES $BBGG RR (little endian).

2. Asset Generation (via Nanobanana)

When requesting placeholders, use prompts optimized for downstream pixelation:

  • "Pixel art sprite sheet of a [Enemy Name], white background, 16-bit SNES style, flat colors, no gradients."
  • Use /edit to quantize or adjust palettes of generated images.

3. Sheet Layout

  • Grid: 16x16 pixel cells (standard sprite size) or 8x8 (tile size).
  • Layout: Top-left to bottom-right.
  • Alignment: Ensure sprites are centered in their 16x16 or 32x32 cells.

4. Integration

  • Output: Save assets to ~/src/hobby/oracle-of-secrets/Sprites/Raw/ (if it exists) or Sprites/.
  • Naming: spr_[name]_[action].png (e.g., spr_moblin_walk.png).

Workflow

  1. Concept: "I need a Ice Wizzrobe."
  2. Draft: Generate raw options: nanobanana --prompt "pixel art ice wizard..." --count 4.
  3. Refine: Pick one, edit for palette compliance.
  4. Format: Arrange into a strip (Walk Down, Walk Up, Walk Side).
  5. Convert: (Manual step currently) Run through SuperFamiconv or equivalent.

Commands

  • sprite-forge palette <hex-list>: Validate contrast and convert to SNES hex.
  • sprite-forge slice <image> --grid 16x16: Verify alignment.
  • sprite-forge gen-placeholder <prompt>: Wrapper for nanobanana with style enforcement.

References

  • ~/src/hobby/oracle-of-secrets/Tools/sprite_catalog.md
  • ~/src/hobby/oracle-of-secrets/Sprites/