/unity-dev:unity-searchfrom unity-dev
Builds Unity Search queries to find assets, references, and scene objects, then opens them in a live Editor. Handles type, folder, label, and reference queries.
Ships in unity-dev. 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.
Read when SKILL.md points to them.
A request shaped like find, locate, list, where is, which ones use, what references has one good answer: a single Unity Search query, written out, with a word about what it searches.
| The situation | Read |
|---|---|
| "Where is X", "find all materials in Assets/UI", "which prefabs use X" | §Building the query, then §The answer, always two lines |
"What references this texture" — ref= relationships | reference/query-patterns.md §1–§3 |
| "Which scene objects have a Rigidbody", "show every Light in the scene" — scene component queries | §Building the query — say it searches the loaded scenes |
| "What Unity Search query do I use"; "open the Search window with that" | §Building the query, §Open it in a live Editor |
Anything past a bare t:<type> — folders, labels, references, expressions | reference/query-patterns.md §1–§3 |
| Mapping the user's wording onto a query shape | reference/query-patterns.md §4 |
| Opening the window, or an open attempt that failed | §Open it in a live Editor |
| The question is one Search cannot settle — shader properties, missing scripts, a full audit | §When Search cannot answer, then unity-debug → reference/editor-control.md |
| "Which assets does this change affect" — a diff question, not a find question | unity vcs affected in unity-cli → reference/version-control.md |
| The CLI is not installed, or no Editor answers | skill unity-cli |
Two things happen every time, whether or not an Editor is reachable:
t: prefix
means a different thing on each side, so this is not decoration.If a live Editor is there, opening the Search window with the query is a bonus, not the deliverable.
"This", "the selected one", "the current material" — with no name or path in the conversation, ask. A guessed asset name produces a query that returns nothing, and an empty result reads as "there are none" rather than "you searched for the wrong thing".
Six rules cover almost everything; the tables are in reference/query-patterns.md.
t:material,
t:prefab, t:audioclip for assets; t:Light, t:Rigidbody, t:AudioSource for what is in
the loaded scenes.t:[material, texture].dir:, label with l:, name with a bare keyword. t:prefab dir:Assets/Courier,
l:Hazard, sentry. Quote any path with a space.ref=. "uses", "references", "depends on", "what would break":
ref=Lane_Asphalt, ref="Assets/Courier/Materials/Lane Asphalt.mat", or the expression form
t:prefab ref={t:texture} when the other side is a whole type rather than one asset.Sentry t:Rigidbody.An empty result is not proof of absence. Widen once — drop the filter, keep the keyword — before reporting that nothing exists.
Query: `t:material dir:Assets/Courier/UI`
Opened the Search window with it.
…or, when nothing was opened:
Query: `t:prefab ref={t:texture}`
Paste it into the Search window.
An assumption gets a third line and nothing more: "Read as the material's name; a path would be exact." Keep the rest out.
Two preconditions: unity status --format json reports state: "ready", and the Editor's command
catalogue carries eval (unity command --detail compact). Both come from the project having the
com.unity.pipeline package — that whole surface is unity-cli.
unity command eval 'const string q = @"t:material dir:Assets/Courier/UI";
var picked = new System.Collections.Generic.List<UnityEditor.Search.SearchProvider>();
foreach (var id in new[] { "asset", "scene" })
{
var p = UnityEditor.Search.SearchService.GetProvider(id);
if (p != null) picked.Add(p);
}
var ctx = picked.Count > 0
? new UnityEditor.Search.SearchContext(picked, q)
: new UnityEditor.Search.SearchContext(UnityEditor.Search.SearchService.GetActiveProviders(), q);
UnityEditor.Search.SearchService.ShowWindow(ctx);
return "opened: " + q;' --format json
Four things that snippet is shaped by:
eval compiles is a block of statements, not a source file. No using directives (one is read
as a resource-disposal statement), and every type fully qualified — a bare SearchService does
not resolve. Confirm the flag spelling with unity command eval --help on your CLI version.@"ref=""Assets/Courier Run/Gate.prefab""".GetProvider returns null for one that is not
registered, and handing a null into the context throws; falling back to
GetActiveProviders() keeps the window opening at all.Judge the result from data.result.result only. An outer success: false or a
COMMAND_FAILED code means it did not open, whatever the exit line suggests — never report
"Opened the Search window" from an exit code. Three failures worth naming rather than retrying:
| What you see | Say |
|---|---|
UnityEditor.Search does not resolve | This Editor may not expose the modern Search API — here is the query to paste |
| The Editor is running headless, with no windows | Hand over the query instead; whether a window can open at all in that mode is worth confirming on your version |
| More than one Editor is running | Re-run with --project-path, naming the project |
t:material Standard narrows; it does not prove. A scripted
audit is the honest answer.eval script that
enumerates and reports, not a query.UnityEditor.AssetDatabase.FindAssets("t:Material", new[]{"Assets"})
— and always pass the search-in folders, because an unscoped call walks the whole project
including packages. What that costs on a large project: unity-audio →
reference/mixer-routing.md.ref= answers one hop.| Not here | Go to |
|---|---|
| Acting on results: select, rename, move, delete, re-import — this skill is read-only | Stop and ask; the Editor-side work is unity-debug |
| A project-wide dependency graph | Out of scope |
| A scripted audit that has to be exhaustive or property-aware | unity-debug → reference/editor-control.md |
| Installing the CLI, connecting an Editor, the command catalogue | unity-cli |
| "Which assets does this change affect" across a diff | unity-cli → reference/version-control.md |
| Repository text search, build logs, package registries, menu or settings search | Not Unity Search's index — name the right tool and stop |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tipoli5890/game-studio --plugin unity-dev51 skills in this plugin
/unity-2d-animationSkeletal 2D characters: PSB rig, bones and weights, sprite swaps, 2D IK (2D Animation package)./unity-2d-controllerMove a 2D character: platformer jump, slopes, coyote time, moving platforms, top-down movement./unity-2d-gridGrid tactics and tile puzzles, hex or square: move range, A* paths, line of sight, turns, undo./unity-2d-level2D level layout as data: Tiled/LDtk import, rooms, endless chunks, seeded levels, jump reachability.