Sprite Segment 3x3grid logo

Sprite Segment 3x3grid

OrganizationPopular
Unity-Technologies
sprite-segment-3x3grid

Segments a Sprite texture into a 3x3 grid and outputs a pattern of cells matching the center cell's color. Use when the user asks to analyze or document a sprite's structure or color distribution.

Overview

PublisherUnity-Technologies
Repositoryskills
Skill namesprite-segment-3x3grid
Stars
1K
Forks
61
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Unity-Technologies on GitHub. Read the source before you install it.

Installation

Install the Sprite Segment 3x3grid AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Unity-Technologies/skills/tree/main/skills/sprite-segment-3x3grid
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Unity-Technologies/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/sprite-segment-3x3grid .claude/skills/sprite-segment-3x3grid
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sprite Segment 3x3grid in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sprite Segment 3x3grid on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sprite Segment 3x3grid is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Sprite Color Grid Analysis

Purpose

This skill analyzes Sprite textures by segmenting them into a 3x3 grid and outputting a text representation based on color matching with the center cell.

Parameters

Match Threshold

The match threshold determines what percentage of pixels in a non-center cell must match the center's majority color for that cell to be considered a "match" (.).

ThresholdDescriptionUse Case
50%At least half the cell's pixels match center colorLenient matching for sprites with mixed regions
75%At least three-quarters match center colorModerate matching for mostly solid regions
90%Nearly all pixels must match center colorStrict matching for very uniform sprites

Default: 75%

Algorithm

  1. Segment the Sprite: Divide the Sprite's texture region into a 3x3 grid (9 cells total)
  2. Identify Center Color: Calculate the majority (most frequent) color in the center cell (position [1,1])
  3. Compare Each Cell: For each of the 8 surrounding cells, calculate what percentage of pixels match the center's majority color. If the percentage meets or exceeds the match threshold, the cell is a match (.); otherwise it is not (X)
  4. Generate Output: Create a text representation using the legend below

Output Legend

SymbolMeaning
XCell does NOT meet the match threshold (insufficient pixels match center color)
.Cell MEETS the match threshold (enough pixels match center color)
*The center cell itself (always position [1,1] in the grid)

Output Format

The output is a single line with three groups of three characters, separated by /. Each group represents one row of the grid.

Order: Top to Bottom rows, Left to Right within each row.

Format: [TopRow] / [MiddleRow] / [BottomRow]

Each row contains 3 characters separated by spaces: [Left] [Center] [Right]

Grid Position Mapping

Grid Layout:        Output Order:
[0,0] [1,0] [2,0]   1  2  3   -> First group
[0,1] [1,1] [2,1]   4  5  6   -> Second group (5 is always *)
[0,2] [1,2] [2,2]   7  8  9   -> Third group

Examples

Example 1: Center matches top-left and bottom-right only

. X X / X * X / X X .

Grid interpretation:

.  X  X
X  *  X
X  X  .

Example 2: Center matches all surrounding cells

. . . / . * . / . . .

Example 3: Center matches none of the surrounding cells

X X X / X * X / X X X

Example 4: Center matches bottom row only

X X X / X * X / . . .

Implementation Guidance

Calculating Center's Majority Color

For the center cell:

  1. Sample all pixels within the cell's bounds
  2. Group pixels by color (consider using a color tolerance threshold for similar colors)
  3. The majority color is the color with the highest pixel count
  4. For tie-breaking, use the first color encountered

Matching Non-Center Cells

For each of the 8 surrounding cells:

  1. Count the total number of pixels in the cell
  2. Count how many pixels match the center's majority color (using color tolerance)
  3. Calculate the match percentage: matchingPixels / totalPixels
  4. If match percentage >= threshold, cell is a match (.); otherwise (X)

Color Tolerance

When comparing pixel colors:

  • Consider using a tolerance threshold (e.g., RGB distance < 10) for "matching"
  • Alternatively, for sprites with limited palettes, exact matching may be appropriate
  • Account for alpha channel if relevant to the use case

Sprite Bounds

Use the Sprite's rect property to determine the pixel region to analyze:

  • sprite.rect.x, sprite.rect.y for the origin
  • sprite.rect.width, sprite.rect.height for dimensions
  • Divide width and height by 3 to get cell dimensions

References

Code Template: "scripts/SpriteGridAnalysis.cs"

Use Cases

  • Documentation: Describe sprite patterns in a compact text format
  • Testing: Verify expected sprite structure in automated tests
  • Analysis: Quickly identify sprites with similar color distributions
  • Debugging: Understand why sprites look different than expected
  • Asset Cataloging: Generate searchable metadata for sprite assets

Notes

  • This analysis works best with sprites that have distinct color regions
  • For sprites with gradients or many colors, consider increasing color tolerance
  • The Y-axis is flipped from Unity's texture coordinates to produce top-to-bottom output
  • Transparent pixels can be treated as a distinct "color" or ignored based on use case

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sprite Segment 3x3grid AI skill do?

Segments a Sprite texture into a 3x3 grid and outputs a pattern of cells matching the center cell's color. Use when the user asks to analyze or document a sprite's structure or color distribution.

Why use Sprite Segment 3x3grid on TypingMind?

Because you install it once and use it with any model. Sprite Segment 3x3grid is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sprite Segment 3x3grid in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Unity-Technologies/skills/tree/main/skills/sprite-segment-3x3grid. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sprite Segment 3x3grid?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sprite Segment 3x3grid?

As many as you like. As long as a model supports skills, you can use Sprite Segment 3x3grid with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sprite Segment 3x3grid AI skill free?

It is published on GitHub by Unity-Technologies. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇