/arcosian-unity:unity-bridgefrom arcosian-unity
Drives a Unity 6 project through the C# language server (diagnostics, go to definition, references), the Unity CLI and unity-mcp: compile checks, EditMode and PlayMode tests, play mode, screenshots, headless builds and scene building. Use when asked to "find where this class is defined", "run the Unity tests", "build the player", "screenshot play mode" or "which Unity automation tool should I use", or when a tool will not connect.
Ships in arcosian-unity. 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.
Use the C# language server while writing scripts: compiler errors after each edit and symbol navigation without text search. Use the rest of this skill when a claim about a Unity game must be verified in the Editor or when Editor work must be automated: compile status, tests, play mode, screenshots, builds, scene and prefab generation. Do not use it to author C# or asset text; edit source files directly and keep diffs reviewable.
| Need | Channel | Why |
|---|---|---|
| Definition, references, members of a C# symbol | LSP tool (goToDefinition, findReferences, documentSymbol, workspaceSymbol, hover) | Answers from the compiler's model, not text search |
| Compiler errors in the file just edited | Language-server diagnostics after the edit | Seconds, no Editor needed for engine-free code |
| Install editors, headless build, run tests in CI | unity CLI, shell | No Editor session, cheap, scriptable |
| One-off Editor action or query | unity command / unity eval | Drives the open Editor directly, no MCP schema cost |
| Persistent session, many small scene ops | unity-cli MCP server (unity mcp) | Tool calls with structured results |
| Play-mode screenshot, profiler, scene hierarchy ops the CLI lacks | CoplayDev unity-mcp (opt-in; setup snippet in this plugin's README) | Broader tool surface, community maintained |
| Last resort, no Editor available | Unity -batchmode -executeMethod | Classic headless entry point |
Default order: CLI first, MCP second, community bridge third. Confirm exact subcommands with unity --help; they have changed between releases and this skill does not pin flags.
lsp/unity-csharp-lsp.mjs runs csharp-ls for the project and picks a mode at start:
.slnx or .sln sits next to Assets/ (written by the Visual Studio Editor package): every script, real Unity references.noEngineReferences (in the template Game.Core). Files outside them get no diagnostics at all; that silence means "not checked", not "clean". Check those files with the Editor's compile gate.Diagnostics are for iterating; the compile gate in the Editor (or the template's licence-free .NET harness for Game.Core) stays the evidence. If the user asks for full coverage, tell them to open the project in Unity once with an external script editor set (Preferences > External Tools) and click Regenerate project files.
Check the server from the Unity project folder:
node ${CLAUDE_PLUGIN_ROOT}/lsp/lsp-selftest.mjs --file Assets/_Game/Core/Sim.cs -- node ${CLAUDE_PLUGIN_ROOT}/lsp/unity-csharp-lsp.mjs
It prints PASS or FAIL per check; add --also <file> for files that must report no errors.
git status clean or committed. Agents can delete assets.Compile gate. Trigger a script refresh, wait for the domain reload to finish, read the console. Pass means zero errors; warnings are listed, not ignored. Never proceed on a stale console read.
Tests. The template in arcosian/templates/unity-starter/ splits Core (pure C#), Presentation and Editor assemblies. Run EditMode tests first (sim-core, fast, deterministic), PlayMode second. Report counts, failing test names and the first stack frame in project code. A flaky test is a bug in the test or in the determinism seam; do not retry until green without saying so.
Play mode and screenshots. Enter play mode, run the scripted playthrough (seeded RNG, fixed timestep), capture frames at named checkpoints (main menu, first level start, a win state, a fail state), exit play mode. Save images under the project's .gamestudio/ evidence folder so the critic agent can open them. If a screenshot is black, the usual causes are: capture before the first rendered frame, UI on a camera not in the capture path, or a Game view at zero size.
Builds. Android and iOS player builds go through the template's BuildScript (an -executeMethod entry) so settings live in code, not in a hand-edited Editor window. Report: build time, output size, scripting backend, and the warnings list. iOS produces an Xcode project; signing and upload belong to the ship skill and fastlane, not this adapter.
Do not hand-write scene YAML. Instead:
SceneBuilder.Build() in the Editor assembly that creates the scene from code: camera, lights, canvas with a safe-area root, prefab instances, and wiring through serialized references.unity eval or the MCP, or -executeMethod in batch mode.Benefit: scenes become reviewable code, regenerate cleanly after a refactor, and the agent never edits YAML with unstable file IDs.
SceneBuilder.Build() creates the board scene.dotnet tool install --global csharp-ls, or set GS_UNITY_PROJECT / GS_CSHARP_LS./plugin warns LSP server "<name>" is not used for .cs files: Anthropic's csharp-lsp plugin is also enabled; disable one of the two.Library/ is missing after a fresh clone; open the project in Unity once./mcp.unity eval and script tools execute arbitrary C# with your user's rights. Do not run code you have not read, do not point them at projects containing secrets, and keep builds free of debug bridges (strip the Pipeline or MCP packages from release configurations).
.slnx for SDK-style projects since 2.0.24 (2.0.28 current). Sources: https://github.com/razzmatazz/csharp-language-server ; packages.unity.comWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub samsamurai301/arcosian --plugin arcosian-unity