Skip to main content
ui-graphics is a skill from the Summer skill library: a guide your AI agent reads when the task matches, so it builds the good version on the first try. Generate game UI art (icons, buttons, panels, frames, HUD widgets) flat, on a transparent background.

When your agent uses it

  • Generating UI elements — icons, buttons, panels, frames, HUD widgets, badges — in flat-design, transparent-background game-UI style
  • A HUD still uses placeholder icons, buttons, or panels and needs consistent flat-design art

Install

summer setup installs every skill for your agent. To add only this one:
Swap claude-code for your agent, such as codex or cursor. See Skills for every option.

The skill

This skill generates flat game-UI graphics: icons, button states, panels, frames, and HUD widgets. Output is transparent PNG by default and wires through Summer Engine TextureRect, NinePatchRect, or AtlasTexture nodes. UI graphics succeed or fail on two specific things: a clean transparent background (no checkerboard residue) and a consistent visual language across the set (all icons share line weight, color treatment, lighting). This skill encodes both.

When to use

  • “Generate a fire-spell icon for the ability bar.”
  • “I need a parchment panel background for the inventory.”
  • “Make a set of 8 status-effect icons (poison, burn, freeze, stun, …).”
  • “Create a button frame I can NinePatch.”
  • “HUD frame for the health bar.”

When NOT to use

  • The user wants a character portrait → character-portrait.
  • The user wants pixel-art UI → pixel-art (UI in pixel style needs a different prompt pattern).
  • The user wants a 3D HUD element → that’s a 3D mesh job; route to asset-strategy.
  • The user wants a font → fonts aren’t generated; use a .ttf/.otf and import via FontFile.

Steps

1. Lock the UI style anchor

Check .summer/ui-anchor.md. If it doesn’t exist, define it on the first UI asset and re-use:
Every icon / button / panel re-uses this anchor verbatim. Skipping this step produces the most common UI failure: 12 icons that all look like they came from 12 different games.

2. Search before generating

3. Pick the right pattern (icon vs button vs panel)

assets.generate_image takes aspectRatio (1:1 default, 16:9, 21:9, 3:2, 4:3, …) and, for a minimum size, width and height. Square suits icons, panels, and badges; wide assets (buttons, HUD bar frames) get a wide aspectRatio.

4. Build the prompt — subject + anchor + transparent

Pattern:
isolated is load-bearing. For the background, do not rely on the prompt — pass removeBackground: true, which runs a real background-removal pass after generation and returns a PNG with true alpha. That is the single highest-value argument in this skill, and it is the actual fix for the checkerboard failure listed below: models asked for a “transparent background” in text frequently paint the checkerboard.

5. Generate

Icon example:
There is no negative_prompt: the negations have to live in the prompt text. Button (3 states in 3 calls):
Panel for NinePatch:
The “clear distinction between border and center” is the NinePatch hint — without it, the border bleeds into the center and 9-slicing produces artifacts.

6. Import with transparency preserved

Verify in the import dock: Mipmaps: off (UI shouldn’t mipmap), Filter: Linear for high-res UI (or Nearest if pixel-style).

7. Wire into the scene

One summer_run_script call wires each graphic with its settings; scenePath is the exact scene to change. Icon as TextureRect:
Panel as NinePatchRect:
Tune patch margins to match the actual border width in the generated texture. Open the texture in the editor’s NinePatch preview to verify. Multiple icons as AtlasTexture: If you generate a 4×4 grid of icons in one image, each icon becomes an AtlasTexture referencing the same source. Saves draw calls. Use a Region rect per icon.

Prompt patterns

Bad prompts (and why)

Anti-patterns

  • Skipping the anchor. A 12-icon ability bar with no anchor looks like 12 unrelated games. Define the anchor on icon #1.
  • Letting the model render text. Diffusion models cannot render reliable text. Always overlay text in Summer Engine with a Label node. The button texture is the frame; the label is the word.
  • Forgetting removeBackground: true. Default is opaque. Prompting for “transparent background” instead is what produces the painted-checkerboard failure below — the option runs a real alpha pass and does not.
  • Expecting style to do the work. Only cartoon and anime append anything; realistic and none append nothing, and any other value is coerced to none. style: "none" is right for UI, but “flat design” has to be in the prompt regardless.
  • NinePatch with no border-vs-center distinction. The 9-slice scaling smears the border into the center.
  • Mipmaps on UI. UI textures shouldn’t mipmap — they’re displayed at 1:1 or near it. Mipmaps waste memory and blur sharp edges.

Edge cases

  • User wants the same icon at multiple sizes (32, 64, 128). Generate once at high resolution. Summer Engine’s TextureRect with STRETCH_KEEP_ASPECT_CENTERED scales it down cleanly.
  • User wants pixel-style UI. Route to pixel-art — different prompt pattern, different filter, different anchor.
  • User wants animated UI (spinning loading icon). Generate the static frame here. Animate via AnimationPlayer rotating the TextureRect, not as a sprite sheet.
  • Transparency comes back as a checkerboard pattern in the image. The model rendered the checkerboard literally because the prompt asked for transparency. Remove every mention of transparency from the prompt, generate on a plain background, and pass removeBackground: true to cut the alpha server-side.
  • Icons need to read at very small size (16-24px in a packed bar). Bias prompts toward bold silhouette + minimal interior detail. Ornate detail is invisible at 16px and adds noise.

Without Summer Engine

In a session without Summer Engine tools (the assets profile; the summer-assets skill has the whole loop), do steps 1-5 and skip steps 6-7 (import, scene wiring). Pass out with the person’s folder so each PNG lands there (the summer-assets skill says how); keep removeBackground: true for icons and buttons that need transparency.

Fallback (no MCP)

Print the call:
User runs via the Summer dashboard, then summer_import_from_url to res://ui/icons/<name>.png and wires manually.

Handoff

After the UI graphic is wired:
  • More icons in the same set → re-invoke this skill with the same anchor.
  • Button states (hover/pressed) → re-invoke for each state.
  • Theme assembly (combining icons + panels into a Summer Engine Theme resource) → scene-composition for the resource wiring.
  • Pixel-art UI → pixel-art.
  • Dialogue UI with portraits → character-portrait for the portrait, then back here for the surrounding panel.

See also

  • character-portrait — for in-UI character images.
  • pixel-art — pixel-style UI.
  • scene-composition — Theme and Control hierarchy.
  • summer_docs_read id reference/mcp-tools-reference — how to call assets.generate_image.

From a shell

No Summer MCP tools in this session? Run each one as a command; when summer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.
  • character-portrait: Generate one polished character bust for dialogue UI, character select, lore cards or codex entries.
  • pixel-art: Generate pixel-art sprites, items, tiles and portraits at a set resolution with a limited palette.
  • asset-strategy: Route any ‘I need a [thing]’ asset request to the right skill: 2D, 3D, audio, video, VFX or animation.

Source: library/skills/ui-graphics/SKILL.md, rendered from summer-engine@4.3.0 on npm.