/layer:layer-game-uifrom Layer
Builds game UI with Layer: 9-slice buttons, panels, frames, HUD elements, and icons, then exports kits to Unity, Godot, or CSS.
Ships in Layer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Game UI has two jobs that illustration does not: it resizes, and it reads at small sizes. A button that looks right at one width and smears at another is broken; an icon that reads at 512px and turns to mush at 64px is broken. Both are decided before generation, by what the prompt asks for and by which delivery fields are set.
Layer handles the resize problem with nine_slice on execute_forge: after the run it finds the
plain band through the middle of each axis, makes the edges and centre tile, and records the 9-slice
insets on the file. export_ui_kit then writes those elements in the files an engine draws them by.
Generation mechanics, the spend gate and polling are in layer; prompt craft is in layer-image.
If a sibling skill named here is missing from your available skills, ask the user to install it
(npx skills add layerai/skills --skill <name>); unattended, proceed from tool schemas and flag the
gap.
| Need | Use |
|---|---|
| Button, panel, frame, tab, tooltip | execute_forge with nine_slice: true |
| Anything that never resizes | Omit nine_slice |
| Element that must match approved UI | Approved files as reference_image, model filtered for image_editing |
| Icons on one canvas size | output_fit with canvas: "FIXED", width, height, padding |
| Remove transparent margin | output_fit.trim: true |
| Rounded card or badge plate | Generate full bleed and opaque, then output_fit.corner_radius |
| Transparent icon | remove_background: true (billed as its own run, so pass it to the estimate) |
| Engine import of resizable elements | export_ui_kit with engine UNITY, GODOT, CSS or JSON |
A 9-slice element is nine pieces: four corners that never scale, four edges that repeat along one axis, and a centre that repeats along both. The prompt has to produce an image that splits that way.
Write it into the prompt in those words: "Ornate fantasy button frame, gold filigree in the four corners only, plain dark leather centre, even straight edges, on a solid magenta background, no text".
Keep nine_slice off for anything that does not resize: icons, portraits, a logo, a fixed-size
badge.
State the target pixel size in the prompt and design for the smallest one. The fix for an icon that fails at 64px is fewer elements and heavier strokes, not a better upscale.
A set holds together by sharing a grammar, so name it in every prompt: stroke weight, corner radius,
perspective (flat, isometric, or slight three-quarter), palette, lighting direction, and whether
icons sit on a plate or float free. Extending a set is an editing job, not a generation job: attach
two or three approved icons as reference_image on a model filtered with
capabilities: {image_editing: true}, which reproduces what it is shown. style_reference carries
a look only and lets the grammar drift.
For delivery at one size, output_fit with canvas: "FIXED", the target width and height, and
a fixed padding gives every icon the same box and margin; trim: true removes the transparent
margin first. A card or symbol plate gets its rounded shape from corner_radius on a full-bleed,
opaque, square-cornered generation, not from asking for a transparent background around a rounded
card.
export_ui_kit is a deterministic file operation and costs no Creative Units. It takes up to 128
file_ids, every one carrying 9-slice insets, in the order the kit should list them, and returns a
download link to a zip with a README of import steps and each element's insets.
engine | What the zip holds |
|---|---|
UNITY | One atlas and the .meta that slices it into sprites with 9-slice borders |
GODOT | One atlas and a StyleBoxTexture .tres per element, for themes, NinePatchRect |
CSS | One image per element and a stylesheet with a border-image rule for each |
JSON | One atlas and TexturePacker JSON (hash) with each frame's borders |
Edges and centre repeat without a seam in Unity, Godot and CSS. PixiJS and Phaser, reading the JSON, stretch them instead, so tell users on those engines that a heavily textured centre will smear at large sizes and a plainer one holds up better.
"A UI kit for our dark-fantasy RPG in Godot: primary button, secondary button, dialogue panel and tooltip frame, matching the inventory panel we already approved."
file_id; no upload.list_base_models with filter.use_case: "text_to_image" and
filter.capabilities: {image_editing: true}; take the first result, then get_base_model.nine_slice: true, the approved panel as reference_image, and a prompt
naming the shared grammar plus the element: "Primary button, wide, dark iron frame, silver
filigree in the four corners only, plain dark leather centre, even straight edges, on a solid
magenta background, no text".estimate_forge_price once with those inputs, multiply by four, and ask above 20 CUs. Execute
and poll get_forge_run at poll_interval_seconds.export_ui_kit with engine: "GODOT" and the four file_ids. Hand over the link and the
README's insets.nine_slice on icons, portraits and other fixed-size art.style_reference instead of reference_image on an
image_editing model.corner_radius.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub layerai/skills --plugin layer32 skills in this plugin
/layerUse when generating or editing game and entertainment assets on Layer through MCP: images, video, 3D meshes, audio, sprites, textures, or marketing creative. Also when choosing a Layer base model, pricing a run in Creative Units before spending them, uploading reference files, polling a generation, applying a trained style, or recovering from MODEL_NOT_FOUND, INSUFFICIENT_BALANCE, RATE_LIMITED, or a silently degraded reference set./layer-3dUse when producing 3D assets with Layer: generating a mesh from text or an image, retopologising or remeshing, retexturing an existing mesh, rigging a character, or animating a rigged mesh. Also when choosing between quad and triangle output, setting a polygon budget, or asking for PBR textures for a game engine. Keywords: 3D, mesh, model, text to 3D, image to 3D, remesh, retopology, retexture, rig, skeleton, animate, PBR, quad mesh, poly count, glTF, FBX./layer-art-directionOther plugins' skills for the same job