agentleFS
AlexeyPerovAlexeyPerov/Unity-Open-MCP/skills/extensions/spriteatlas/SKILL.md

spriteatlas

Skill15 starsChanged 5 months agoMITView on GitHub

Skill for AI agents driving Unity SpriteAtlas assets in a project through the unity-open-mcp MCP server. This domain is embedded in the bridge and opt-in. Its tools use the built-in 2D module (SpriteAtlas / SpriteAtlasAsset / SpriteAtlasPackingSettings / SpriteAtlasTextureSettings in UnityEngine.U2D / UnityEditor.U2D) — no Unity package install is required, and they compile into every bridge build. Its tool group is hidden from ListTools until the connected session activates it. - Unity Editor is open with the target project. -…

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every mutating tool requires a non-empty paths_hint scoped to the .spriteatlas asset path — the gate has no whole-project fallback.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Unity Open MCP — SpriteAtlas Extension

Skill for AI agents driving Unity SpriteAtlas assets in a project through the unity-open-mcp MCP server.

This domain is embedded in the bridge and opt-in. Its tools use the built-in 2D module (SpriteAtlas / SpriteAtlasAsset / SpriteAtlasPackingSettings / SpriteAtlasTextureSettings in UnityEngine.U2D / UnityEditor.U2D) — no Unity package install is required, and they compile into every bridge build. Its tool group is hidden from ListTools until the connected session activates it.

Preconditions

  • Unity Editor is open with the target project.
  • unity_open_mcp_ping returns connected: true.
  • The sprite2d tool group is activated — call unity_open_mcp_manage_tools(action="activate", group="sprite2d") before invoking any SpriteAtlas (or Texture) tool. Fresh sessions start with two default-on groups (core and gate-and-verify); activate the other groups you need on demand. Because the 2D module is built-in, capabilities always reports the sprite2d group as available: true (no domainDefine).

Tool prefix

unity_open_mcp_spriteatlas_* — SpriteAtlas authoring. The sprite2d group is shared with the Texture import family (unity_open_mcp_texture_*); see the Texture extension skill for the import half of the 2D art pipeline.

Mutating tools accept the standard paths_hint and run the full gate path (editor_settle lifecycle — the .spriteatlas asset is written and reimported); read-only tools (spriteatlas_get, spriteatlas_list) are gate-free.

Authoring model

A .spriteatlas file stores a SpriteAtlasAsset (the authoring object); the runtime SpriteAtlas is the packed artifact produced from it. These tools author via SpriteAtlasAsset.Load / Save and mutate packables via Add / Remove. Packables are Object references (Sprite / Texture / DefaultAsset folder); they are resolved by Assets/-rooted path and reported back by path + type so you can round-trip without instance ids.

Canonical workflow: build an atlas

  1. Create — unity_open_mcp_spriteatlas_create with asset_path: "Assets/Atlases/UI.spriteatlas" (intermediate folders are created). include_in_build defaults to true.
  2. Add packables — unity_open_mcp_spriteatlas_add_packable with packable_paths: ["Assets/Sprites/Icons", "Assets/Textures/Icon.png"]. Folders add every sprite inside; individual textures add themselves. Per-path errors are accumulated (a bad path does not abort the batch).
  3. Tune settings — unity_open_mcp_spriteatlas_modify with a settings_json patch (see below).
  4. Verify — unity_open_mcp_spriteatlas_get (gate-free) reads the packables + packing/texture/platform settings back.
  5. Iterate — unity_open_mcp_spriteatlas_remove_packable to drop a packable; spriteatlas_modify to retune.

Settings patch (spriteatlas_modify)

settings_json is a JSON object string with three optional sub-objects:

{
  "include_in_build": false,
  "packing": {
    "padding": 4,
    "enableRotation": true,
    "enableTightPacking": false,
    "enableAlphaDilation": false,
    "blockOffset": 0
  },
  "texture": {
    "anisoLevel": 1,
    "filterMode": "Bilinear",
    "generateMipMaps": false,
    "readable": false,
    "sRGB": true
  }
}

Unknown fields are reported in unknownFields and do not abort the patch. texture.maxTextureSize is not settable here (no setter on the settings struct; controlled via platform settings).

Persistence note: in this Unity version the packing and texture settings are applied to the in-memory SpriteAtlasAsset (they take effect for the next pack) but are not written to the .spriteatlas file's serialized form — Unity manages them via the internal Sprite Atlas packing pipeline, not the public Save path. include_in_build likewise does not round-trip through the serialized file. The settings are session-scoped; for permanent settings, use the Unity Editor's Sprite Atlas panel.

Listing atlases

unity_open_mcp_spriteatlas_list (gate-free) lists every .spriteatlas under a folder (omit folder to search the whole project). Each entry reports path + name. Cap 200; truncated reports the overflow.

Layered with Texture import

The sprite2d group covers atlas packing (this skill). It pairs with the Texture import family (unity_open_mcp_texture_*) for the import side — use texture_set_import to mark a texture as a Sprite (sprite_mode: "Single") before adding it to an atlas.

Common recipes

UI icon atlas

  1. texture_set_import on each icon PNG with settings_json: '{"sprite_mode":"Single","sprite_pixels_per_unit":100}' (switches textureType to Sprite).
  2. spriteatlas_create at Assets/Atlases/UIIcons.spriteatlas.
  3. spriteatlas_add_packable with packable_paths: ["Assets/Sprites/UI"] (the folder).
  4. spriteatlas_modify with settings_json: '{"packing":{"padding":4}}'.
  5. spriteatlas_get to confirm.

Swap an atlas's contents

  1. spriteatlas_get to read the current packables.
  2. spriteatlas_remove_packable with the old paths.
  3. spriteatlas_add_packable with the new paths.

Agent-sense pairing

  • unity_senses_screenshot (view: "game") visually confirms the packed atlas renders correctly in a UI scene.
  • unity_open_mcp_texture_get_importer reads a packable texture's import config (e.g. confirm spriteImportMode before adding to the atlas).

Tool reference

ToolMutatingLifecycleNotes
spriteatlas_createyeseditor_settleCreates intermediate folders.
spriteatlas_getnononePackables + settings (read-only).
spriteatlas_add_packableyeseditor_settlePer-path errors accumulated.
spriteatlas_remove_packableyeseditor_settleMatched by asset path.
spriteatlas_modifyyeseditor_settlesettings_json patch; unknown fields reported.
spriteatlas_deletenoeditor_settleDestructive — no undo across restart.
spriteatlas_listnononeCap 200 (read-only).

Every mutating tool requires a non-empty paths_hint scoped to the .spriteatlas asset path — the gate has no whole-project fallback.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.