Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

sprite-editor

FreeRuns bundled scriptsNot checked

Edits sprite rectangles, names, borders, pivots, outlines, and slicing in a texture's import data by generating C# Editor scripts. Use when asked to slice a…

Unity-Technologiesby Unity-Technologies★ 1,342 GitHub stars

About this skill

Sprite Editor

Edit sprite metadata (rects, names, borders, pivots, outlines) through ISpriteEditorDataProvider in a connected Unity Editor.

Important

  • Use the unity cli (unity command --format json) and the unity-cli and unity-pipeline skills for each step.
  • Don't use using directives or unqualified types in the snippet for script eval. The compiler reads using UnityEngine and a bare AssetDatabase, Volume, or Object causes errors (CS0246 / CS0103 / CS0104). return what you want to read; it arrives at data.result.result.
  • Create a restore point you can roll back to if your changes fail.
  • Do only what's asked. Don't change unrelated assets or files.
  • Never leave verification code in the user's script. Never build logging or detection they didn't ask for. See Final step.
  • Avoid long explanations.

Step 1

Before you go forward with a workflow or diagnosis:

  1. Open and read the documentation page(s) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
  2. Name the file(s) you read in your response.

This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.

Full topic map

The Sprite Editor Data Provider API docs ship with the 2D Sprite package. The docs pages are local markdown conversions of the Unity Manual, stored at <project-folder>/Library/PackageCache/com.unity.2d.sprite@*/. Read only the .md files in that specific PackageCache subfolder. You must not look at non-.md files, or look outside at other Library or PackageCache folders, otherwise it takes too much time. If that folder has no .md files, fetch https://docs.unity3d.com/Packages/com.unity.2d.sprite@<VERSION>/manual/DataProvider.html, because that website has no .md variant.

The Sprite Editor window pages are in the Unity Manual. Check the project's Unity version first, because the docs location depends on it:

  • Unity 6000.0 and later: If the Editor install folder has a Data/Documentation folder (eg ...Unity/Hub/Editor/6000.6.0b2/Editor/Data/Documentation), read the html files from the <editor-install>/Editor/Data/Documentation/en/Manual folder. Otherwise the docs pages are online at https://docs.unity.com/en-us/engine/<VERSION>/manual/.
  • Earlier versions: Read the same local folder if it exists. Otherwise fetch https://docs.unity3d.com/<VERSION>/Documentation/Manual/SpriteEditor.html and follow its links, because docs.unity.com has no pages for those versions and the file names differ.

Prefer fetching the page directly (for example WebFetch) over searching (for example WebSearch) — faster and lands on the exact reference. Only fetch what you need, and only search if you don't have the exact URL. Replace <VERSION> with the following before fetching:

  • docs.unity3d.com: The Unity version, eg 6000.6
  • Package on docs.unity3d.com: The package version, eg @6.6 or @2.0. Check the package version if unsure.
  • Engine on docs.unity.com: The Unity version, eg 6000.3
  • docs.unity.com: The product version, eg 7000.0

Before fetching, check that <VERSION> is listed as a ## Version heading in https://docs.unity.com/en-us/engine/llms.txt. If it isn't, use the docs.unity3d.com Manual instead. The two sites use different page names, so don't reuse the paths below. Instead, find each page by its title in https://docs.unity3d.com/<VERSION>/Documentation/Manual/docdata/toc.js, then fetch https://docs.unity3d.com/<VERSION>/Documentation/Manual/<link>.html, where <link> is the link value next to the title.

For Engine pages, <VERSION> is the Unity major.minor from ProjectSettings/ProjectVersion.txt, for example 6000.0 from 6000.0.58f1, because the full build number gives a 404. For the 2D Sprite package, <VERSION> is the com.unity.2d.sprite major.minor from Packages/packages-lock.json, for example 1.0.

Full SKILL.md on GitHub

Install sprite-editor in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

SECURITY.mdreferences/api_reference.mdreferences/background.mdreferences/templates.mdscripts/AutomaticSliceTexture.csscripts/GenerateNewSpriteRects.csscripts/GetTextureSourceImageSize.csscripts/GetTextureToSlice.csscripts/GridSliceTexture.csscripts/IsometricSliceTexture.csscripts/README.mdscripts/SetPivotExample.csscripts/SpriteToPng.cs

FAQ

What does the sprite-editor skill do?

Edits sprite rectangles, names, borders, pivots, outlines, and slicing in a texture's import data by generating C# Editor scripts. Use when asked to slice a sprite sheet or change sprite pivots, borders, or outlines by script.

How do I install the sprite-editor skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the sprite-editor skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare sprite-editor with