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:
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 EngineTextureRect, 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/.otfand import viaFontFile.
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:
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:negative_prompt: the negations have to live in the prompt text.
Button (3 states in 3 calls):
6. Import with transparency preserved
Mipmaps: off (UI shouldn’t mipmap), Filter: Linear for high-res UI (or Nearest if pixel-style).
7. Wire into the scene
Onesummer_run_script call wires each graphic with its settings; scenePath is the exact scene to change.
Icon as TextureRect:
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
Labelnode. 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
styleto do the work. Onlycartoonandanimeappend anything;realisticandnoneappend nothing, and any other value is coerced tonone.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
TextureRectwithSTRETCH_KEEP_ASPECT_CENTEREDscales 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
AnimationPlayerrotating theTextureRect, 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: trueto 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; thesummer-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: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-compositionfor the resource wiring. - Pixel-art UI →
pixel-art. - Dialogue UI with portraits →
character-portraitfor 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_readidreference/mcp-tools-reference— how to callassets.generate_image.
From a shell
No Summer MCP tools in this session? Run each one as a command; whensummer --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.
Related skills
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.
