uloop-compile — скилл для Claude Code: что делает и как установить
Скилл uloop-compile запускает компиляцию проекта Unity из командной строки и возвращает ошибки с предупреждениями в формате JSON. Пригодится после правок кода на C#.
MIT 1 установок ★ 602 обновлён 2026-10-29
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a claude-codeЧто делает uloop-compile
Скилл вызывает CLI-команду uloop compile, чтобы проверить сборку Unity после изменения исходников и применить изменения в редакторе перед тестами или запуском Play Mode. В отличие от uloop hot-reload, полноценная компиляция сбрасывает все временные патчи и прерывает текущую игровую сессию.
Результат возвращается в виде JSON со счётчиками ErrorCount и WarningCount, подсказками NextActions по исправлению ошибок и консольными логами. Флаг --force-recompile почти никогда не нужен: обычный запуск сам находит внешние правки файлов, а полная пересборка с перезагрузкой домена способна надолго заморозить большой проект.
Если Unity API Updater открывает окно согласия на перезапись скриптов, инструмент отклоняет его автоматически, чтобы не менять код без явного подтверждения.
Какие задачи решает
- собрать проект Unity после правок файлов на C#
- получить список ошибок компилятора и предупреждений в JSON
- проверить зависимости asmdef при ошибках CS0234 и CS0246
- применить изменения кода перед запуском тестов в редакторе
Примеры запросов агенту
- Запусти компиляцию проекта Unity через uloop-compile
- Собери проект без ожидания перезагрузки домена
- Скомпилируй изменения в Unity с таймаутом 300 секунд
Как установить uloop-compile
1Через Skills CLI (Vercel)
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a claude-code2Вручную: положить файлы
~/.claude/skills/uloop-compile/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/uloop-compile/
1Через Skills CLI (Vercel)
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a codex2Вручную: положить файлы
.agents/skills/uloop-compile/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a cursor2Вручную: положить файлы
.cursor/skills/uloop-compile/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hatayama/unity-cli-loop .claude/skills/uloop-compile2Вручную: положить файлы
.github/skills/uloop-compile/SKILL.md1Через Skills CLI (Vercel)
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a gemini-cli2Командой платформы
gemini skills install https://github.com/hatayama/unity-cli-loop --path .claude/skills/uloop-compileВручную: положить файлы
.devin/skills/uloop-compile/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hatayama/unity-cli-loop --skill uloop-compile -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об uloop-compile
Как установить uloop-compile в Claude Code?
Выполните команду npx skills add hatayama/unity-cli-loop --skill uloop-compile -a claude-code в терминале.
Что делает uloop-compile?
Запускает компиляцию в Unity, отслеживает перезагрузку домена и отдаёт результат сборки со счётчиками ошибок и списком шагов для исправления.
Когда стоит использовать --force-recompile?
Только когда требуется отобразить скрытые предупреждения компилятора из других asmdef; в остальных ситуациях достаточно обычной компиляции.
Исходный текст
SKILL.md · MIT
--- name: uloop-compile toolName: compile description: "Compile the Unity project and report errors/warnings. Use after C# edits; to try edits in the running Editor without a domain reload, use hot-reload." --- # uloop compile Execute Unity project compilation. ## When to use - After C# edits, to check for compile errors and make the change live in the Editor (Play Mode, tests, a tool call): to land edits you finished trying with hot reload, or to apply structural changes hot reload cannot. - To try an edit in the running Editor, especially during Play Mode, run `uloop hot-reload` instead: a compile drops every hot-reload patch and discards the Play session. ## Usage ```bash uloop compile [--force-recompile] [--no-wait-for-domain-reload] [--stop-on-external-scene-changes] [--timeout-seconds <seconds>] ``` ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `--force-recompile` | flag | - | Full recompile plus domain reload. Almost never needed: a plain compile already detects externally edited files, and the forced reload can freeze large projects and come back as `COMPILE_RESULT_UNKNOWN`. | | `--no-wait-for-domain-reload` | flag | - | Return before Domain Reload completion | | `--stop-on-external-scene-changes` | flag | - | Stop before compilation if open Scene files changed externally instead of auto-reloading them | | `--timeout-seconds` | integer | 600 | Maximum seconds the CLI waits for the compile to finish before returning COMPILE_WAIT_TIMEOUT (default 600). Values above 1200 exceed the Unity-side result retention window (20 minutes) and weaken post-timeout recovery. | ## When to use --force-recompile `--force-recompile` is almost never needed. Detecting changed files is Unity's job: even when files were edited outside the Editor, a plain `uloop compile` refreshes assets and runs every recompilation the changes require. "The files were changed externally, so recompile everything just in case" is not a valid reason. Why to avoid it: - On large projects a full recompile plus domain reload can freeze Unity for a long time. - The result crosses a domain reload, so it often comes back as `COMPILE_RESULT_UNKNOWN` and does not work as a verification step. - It puts the Editor into the unstable just-after-reload state for no benefit. The one legitimate use case: you need warnings hidden by other asmdefs surfaced by a full build. Otherwise always run plain `uloop compile`. ## Output Returns JSON: - `Success`: boolean or null - `ErrorCount`: number or null - `WarningCount`: number or null - `Warning` (string, optional): set when the compile was requested during Play Mode (the Play session is discarded), while pause points were armed in either Play Mode or Edit Mode (the domain reload drops every pause point patch; those enabled with `--persist` are counted separately and re-armed from their saved enable request after the reload), or while hot-reload changes were active (a successful compile drops every patch; the edited sources are compiled in). After a `COMPILE_WAIT_TIMEOUT`, a re-run that returns the timed-out compile's result also sets it, to say that result does not include script changes saved after that compile started. - `Message`: string - `ErrorCode`: string or null. `COMPILE_ALREADY_IN_PROGRESS` / `COMPILE_EDITOR_UPDATING` when Unity was still compiling or updating after the CLI waited for it and sent the compile again (it does so twice before giving up; run `uloop compile` again), `COMPILE_RESULT_UNKNOWN` after a forced recompile that did not return a definitive result. - `NextActions`: string array or null. Corrective steps derived from the errors, e.g. the assembly that declares an unresolved namespace (CS0234), or, for CS0246 in a script under an asmdef, a reminder to check that asmdef's references (the type may instead be a typo — decide from the error). When Unity stops compiling before the finish callback (`Success: null`, indeterminate), `Message` keeps the get-logs pointer and appends `Recent Console errors:` with the last few Console errors (typically the asmdef or compiler error that aborted the compile), so fix from that list before reaching for `uloop get-logs`. ## Troubleshooting When Unity's API Updater asks for consent to rewrite source files during a CLI compile (the 'Script Updating Consent' dialog), uloop declines automatically — source files are never rewritten without explicit user consent — and the response's Warning discloses the decline. The obsolete-API errors the updater would have fixed appear in Errors; fix them in code, or have the user accept the dialog in an interactive Unity session. Outside CLI compiles, and for the separate 'API Update Required' dialog, the modal can still appear and uloop cannot click it: if compile times out while the Editor looks idle, ask the user to answer the dialog — never auto-dismiss it. A compile that outlives your shell's output window keeps running inside Unity: the call may return with empty or truncated output while the compile is still in progress, and the next uloop command is rejected with "Unity is busy running 'compile'" until it finishes. That rejection is normal single-flight behavior, not a failure — wait and rerun the command; do not restart Unity or rerun compile to recover. After `COMPILE_WAIT_TIMEOUT`, the compile keeps running inside Unity. Re-running `uloop compile` reattaches to it and returns its result without compiling again, with a `Warning` saying so. That result covers the scripts as they were when the timed-out compile started: if scripts changed since then, run `uloop compile` once more after it returns. `uloop hot-reload`'s compile fallback and `uloop run-tests` always compile the current scripts, so they need no extra compile.
© hatayama · MIT · hatayama/unity-cli-loop