From ddc2472fa6ca0008ca0146d08440858b86efb1c7 Mon Sep 17 00:00:00 2001 From: hatayama Date: Sun, 17 May 2026 19:20:03 +0900 Subject: [PATCH] update skills --- .agents/skills/uloop-clear-console/SKILL.md | 2 +- .agents/skills/uloop-compile/SKILL.md | 2 +- .agents/skills/uloop-control-play-mode/SKILL.md | 2 +- .agents/skills/uloop-execute-dynamic-code/SKILL.md | 2 +- .../references/asset-operations.md | 2 ++ .agents/skills/uloop-find-game-objects/SKILL.md | 2 +- .agents/skills/uloop-focus-window/SKILL.md | 2 +- .agents/skills/uloop-get-hierarchy/SKILL.md | 2 +- .agents/skills/uloop-get-logs/SKILL.md | 2 +- .agents/skills/uloop-hello-world/SKILL.md | 2 +- .agents/skills/uloop-launch/SKILL.md | 2 +- .agents/skills/uloop-record-input/SKILL.md | 4 ++-- .agents/skills/uloop-replay-input/SKILL.md | 8 +++++++- .agents/skills/uloop-run-tests/SKILL.md | 4 +++- .agents/skills/uloop-screenshot/SKILL.md | 2 +- .agents/skills/uloop-simulate-keyboard/SKILL.md | 6 +++--- .agents/skills/uloop-simulate-mouse-input/SKILL.md | 6 +++--- .agents/skills/uloop-simulate-mouse-ui/SKILL.md | 2 +- .claude/skills/uloop-clear-console/SKILL.md | 2 +- .claude/skills/uloop-compile/SKILL.md | 2 +- .claude/skills/uloop-control-play-mode/SKILL.md | 2 +- .claude/skills/uloop-execute-dynamic-code/SKILL.md | 2 +- .../references/asset-operations.md | 2 ++ .claude/skills/uloop-find-game-objects/SKILL.md | 2 +- .claude/skills/uloop-focus-window/SKILL.md | 2 +- .claude/skills/uloop-get-hierarchy/SKILL.md | 2 +- .claude/skills/uloop-get-logs/SKILL.md | 2 +- .claude/skills/uloop-hello-world/SKILL.md | 2 +- .claude/skills/uloop-launch/SKILL.md | 2 +- .claude/skills/uloop-record-input/SKILL.md | 4 ++-- .claude/skills/uloop-replay-input/SKILL.md | 8 +++++++- .claude/skills/uloop-run-tests/SKILL.md | 4 +++- .claude/skills/uloop-screenshot/SKILL.md | 2 +- .claude/skills/uloop-simulate-keyboard/SKILL.md | 6 +++--- .claude/skills/uloop-simulate-mouse-input/SKILL.md | 6 +++--- .claude/skills/uloop-simulate-mouse-ui/SKILL.md | 2 +- 36 files changed, 64 insertions(+), 44 deletions(-) diff --git a/.agents/skills/uloop-clear-console/SKILL.md b/.agents/skills/uloop-clear-console/SKILL.md index a86149ab8..2202a7be2 100644 --- a/.agents/skills/uloop-clear-console/SKILL.md +++ b/.agents/skills/uloop-clear-console/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-clear-console toolName: clear-console -description: "Clear all Unity Console log entries. Use when you need to: (1) Clear console before running tests or compilation, (2) Start a fresh debugging session, (3) Remove noisy logs to isolate specific output." +description: "Clear Unity Console entries. Use before compile, tests, or debugging when stale logs would hide the current result." --- # uloop clear-console diff --git a/.agents/skills/uloop-compile/SKILL.md b/.agents/skills/uloop-compile/SKILL.md index 532e640e8..e9bd21c6b 100644 --- a/.agents/skills/uloop-compile/SKILL.md +++ b/.agents/skills/uloop-compile/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-compile toolName: compile -description: "Compile Unity project and report errors/warnings. Use when you need to: (1) Verify code compiles after C# file edits, (2) Check for compile errors before testing, (3) Force full recompilation with Domain Reload. Returns error and warning counts." +description: "Compile the Unity project and report errors/warnings. Use after C# edits or when a full Domain Reload compile is needed." --- # uloop compile diff --git a/.agents/skills/uloop-control-play-mode/SKILL.md b/.agents/skills/uloop-control-play-mode/SKILL.md index 3eead2c5e..828ef4d74 100644 --- a/.agents/skills/uloop-control-play-mode/SKILL.md +++ b/.agents/skills/uloop-control-play-mode/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-control-play-mode toolName: control-play-mode -description: "Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection." +description: "Control Unity Editor Play Mode. Use to start, stop, or pause Play Mode for runtime behavior checks and frame inspection." --- # uloop control-play-mode diff --git a/.agents/skills/uloop-execute-dynamic-code/SKILL.md b/.agents/skills/uloop-execute-dynamic-code/SKILL.md index 8161911c3..d29fcdc9c 100644 --- a/.agents/skills/uloop-execute-dynamic-code/SKILL.md +++ b/.agents/skills/uloop-execute-dynamic-code/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-execute-dynamic-code toolName: execute-dynamic-code -description: "Execute C# code dynamically in Unity Editor. Use find-game-objects first for basic selected GameObject discovery or property inspection. Use when you need to: (1) Wire prefab/material references and AddComponent operations, (2) Edit SerializedObject properties and reference wiring, (3) Perform scene/hierarchy edits and batch operations, (4) Execute Unity Editor menu commands through EditorApplication.ExecuteMenuItem, (5) PlayMode automation (click buttons, invoke methods, tweak runtime state), (6) PlayMode UI controls (InputField, Slider, Toggle, Dropdown), (7) PlayMode inspection that requires custom Unity API code beyond existing tools. NOT for file I/O or script authoring." +description: "Execute C# with Unity APIs when existing uloop tools cannot inspect or edit enough. Use for scene, prefab, SerializedObject, AssetDatabase refresh/.meta generation, menu, or PlayMode automation." context: fork --- diff --git a/.agents/skills/uloop-execute-dynamic-code/references/asset-operations.md b/.agents/skills/uloop-execute-dynamic-code/references/asset-operations.md index de0ed73fc..31ddf7adc 100644 --- a/.agents/skills/uloop-execute-dynamic-code/references/asset-operations.md +++ b/.agents/skills/uloop-execute-dynamic-code/references/asset-operations.md @@ -184,6 +184,8 @@ return $"Asset has {dependencies.Length} dependencies"; ## Refresh AssetDatabase +Use this after terminal-based asset file changes when Unity needs to import them and generate `.meta` files. + ```csharp using UnityEditor; diff --git a/.agents/skills/uloop-find-game-objects/SKILL.md b/.agents/skills/uloop-find-game-objects/SKILL.md index a6e7f6c7f..1d9bc71d9 100644 --- a/.agents/skills/uloop-find-game-objects/SKILL.md +++ b/.agents/skills/uloop-find-game-objects/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-find-game-objects toolName: find-game-objects -description: "Use first when the user asks about the currently selected GameObject in the Unity Hierarchy. Inspect selected object details with `--search-mode Selected` before using `execute-dynamic-code`. Use when you need to: (1) Get details and component properties for selected GameObject(s), (2) Search for objects by name, regex, or path, (3) Find objects with specific components, tags, or layers. Use get-hierarchy when the child tree under the selection is needed. Returns hierarchy paths, active state, tags, layers, and components (or writes to a file when multiple GameObjects are selected)." +description: "Find or inspect Unity GameObjects, especially objects the user currently selected in the Hierarchy. Use for details, components, tags, layers, or name/path searches." --- # uloop find-game-objects diff --git a/.agents/skills/uloop-focus-window/SKILL.md b/.agents/skills/uloop-focus-window/SKILL.md index 87dbc3587..9379ef080 100644 --- a/.agents/skills/uloop-focus-window/SKILL.md +++ b/.agents/skills/uloop-focus-window/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-focus-window -description: "Bring Unity Editor window to front via uloop CLI. Use when you need to: (1) Focus Unity Editor before capturing screenshots, (2) Ensure Unity window is visible for visual checks, (3) Bring Unity to foreground for user interaction." +description: "Bring the Unity Editor window to front. Use when Unity must be visible for visual checks or user-facing interaction." --- # uloop focus-window diff --git a/.agents/skills/uloop-get-hierarchy/SKILL.md b/.agents/skills/uloop-get-hierarchy/SKILL.md index 9323b9414..fc7724208 100644 --- a/.agents/skills/uloop-get-hierarchy/SKILL.md +++ b/.agents/skills/uloop-get-hierarchy/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-get-hierarchy toolName: get-hierarchy -description: "Get Unity scene hierarchy as a structured tree from all roots, a root path, or the current Hierarchy selection. Use this when you need the child tree, parent-child structure, or descendants under selected GameObject(s) with `--use-selection`. Use find-game-objects for selected object details and component properties. Hierarchy data is written to a JSON file on disk and the response returns the file path (not the tree inline) — open the file to read the structure." +description: "Get the Unity scene hierarchy as a structured tree. Use for parent-child structure, descendants, roots, or subtrees under objects the user currently selected." --- # uloop get-hierarchy diff --git a/.agents/skills/uloop-get-logs/SKILL.md b/.agents/skills/uloop-get-logs/SKILL.md index 49c7d281d..68cb95938 100644 --- a/.agents/skills/uloop-get-logs/SKILL.md +++ b/.agents/skills/uloop-get-logs/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-get-logs toolName: get-logs -description: "Retrieve current Unity Console entries via uloop CLI. Use when you need to: (1) inspect errors, warnings, or logs after compile, tests, PlayMode, or dynamic code execution, (2) search current Console messages or stack traces, (3) confirm whether a recent Unity operation emitted logs. Prefer this over reading Editor.log or Unity log files for normal Console contents; use log files only for startup, crash, freeze, or uloop connection failures." +description: "Read current Unity Console entries from a running Editor. Use during bug investigation after compile, tests, PlayMode, or dynamic code to inspect logs, warnings, errors, and stack traces." --- # uloop get-logs diff --git a/.agents/skills/uloop-hello-world/SKILL.md b/.agents/skills/uloop-hello-world/SKILL.md index 776e34624..475cfbb4d 100644 --- a/.agents/skills/uloop-hello-world/SKILL.md +++ b/.agents/skills/uloop-hello-world/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-hello-world -description: "Sample hello world tool via uloop CLI. Use when you need to test the Unity CLI Loop tool system or see an example of custom tool implementation." +description: "Sample uloop hello-world tool. Use to verify custom tool wiring or inspect a minimal tool implementation example." --- # uloop hello-world diff --git a/.agents/skills/uloop-launch/SKILL.md b/.agents/skills/uloop-launch/SKILL.md index 613547391..6e5a63218 100644 --- a/.agents/skills/uloop-launch/SKILL.md +++ b/.agents/skills/uloop-launch/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-launch -description: "Launch Unity project with matching Editor version via uloop CLI. Use when you need to: (1) Open a Unity project with the correct Editor version, (2) Restart Unity to apply changes, (3) Switch build target when launching." +description: "Launch or restart Unity Editor. Use when Unity needs to be opened or restarted." --- # uloop launch diff --git a/.agents/skills/uloop-record-input/SKILL.md b/.agents/skills/uloop-record-input/SKILL.md index ba2a974a8..2e824ff6a 100644 --- a/.agents/skills/uloop-record-input/SKILL.md +++ b/.agents/skills/uloop-record-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-record-input toolName: record-input -description: "Record keyboard and mouse input during PlayMode into a JSON file. Use when you need to: (1) Capture human gameplay input for later replay, (2) Record input sequences for E2E testing, (3) Save input for bug reproduction. Captures Input System device-state diffs frame-by-frame in PlayMode and serializes them to JSON when stopped. Requires PlayMode and the New Input System." +description: "Record PlayMode keyboard and mouse input to JSON. Use to capture gameplay, bug repro, or E2E input sequences for replay." --- # uloop record-input @@ -40,7 +40,7 @@ Replay injects input frame-by-frame, so the game must also be deterministic to p - Unity must be in **PlayMode** - **Input System package** must be installed (`com.unity.inputsystem`) -- Active Input Handling must be set to `Input System Package (New)` or `Both` in Player Settings +- Use this only when the project already uses the New Input System. ## Output diff --git a/.agents/skills/uloop-replay-input/SKILL.md b/.agents/skills/uloop-replay-input/SKILL.md index 803b05454..dc9d81414 100644 --- a/.agents/skills/uloop-replay-input/SKILL.md +++ b/.agents/skills/uloop-replay-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-replay-input toolName: replay-input -description: "Replay recorded input during PlayMode with frame-precise injection. Use when you need to: (1) Reproduce recorded gameplay exactly, (2) Run E2E tests from recorded input, (3) Generate demo videos with consistent input. Deserializes the JSON recording and pushes captured device states back into Mouse.current / Keyboard.current frame-by-frame in PlayMode. Requires PlayMode and the New Input System." +description: "Replay recorded PlayMode keyboard and mouse input. Use for exact gameplay reproduction, E2E runs, or consistent demos from JSON recordings." --- # uloop replay-input @@ -40,6 +40,12 @@ uloop replay-input --action Stop Replay injects the exact same input frame-by-frame, but the game must also be deterministic to produce identical results. If replay output must be compared across runs, read [references/deterministic-replay.md](references/deterministic-replay.md) before interpreting failures. +## Prerequisites + +- Unity must be in **PlayMode** +- **Input System package** must be installed (`com.unity.inputsystem`) +- Use this only when the project already uses the New Input System. + ## Output Returns JSON with: diff --git a/.agents/skills/uloop-run-tests/SKILL.md b/.agents/skills/uloop-run-tests/SKILL.md index f614a6329..89406b1b6 100644 --- a/.agents/skills/uloop-run-tests/SKILL.md +++ b/.agents/skills/uloop-run-tests/SKILL.md @@ -1,13 +1,15 @@ --- name: uloop-run-tests toolName: run-tests -description: "Execute Unity Test Runner and get detailed results. Use when you need to: (1) Run EditMode or PlayMode unit tests, (2) Verify code changes pass all tests, (3) Diagnose test failures with error messages and stack traces. Single-flight only — never run multiple `uloop run-tests` in parallel." +description: "Run Unity Test Runner and report detailed results. Use for EditMode/PlayMode tests, change verification, or failure diagnosis." --- # uloop run-tests Execute Unity Test Runner. When tests fail, NUnit XML results with error messages and stack traces are automatically saved. Read the XML file at `XmlPath` for detailed failure diagnosis. +`uloop run-tests` is single-flight. Do not run multiple `uloop run-tests` commands in parallel against the same Unity Editor. + Before executing tests, `uloop run-tests` checks for unsaved loaded Scene changes and unsaved current Prefab Stage changes. If any are found, it returns `Success: false`, keeps `TestCount` at `0`, lists the unsaved items in `Message`, and does not start the Unity Test Runner. Save or discard those editor changes, then rerun the command. Use `--save-before-run` only when the user explicitly asks to save editor changes before continuing. ## Usage diff --git a/.agents/skills/uloop-screenshot/SKILL.md b/.agents/skills/uloop-screenshot/SKILL.md index f9da5b7cd..6aaea3988 100644 --- a/.agents/skills/uloop-screenshot/SKILL.md +++ b/.agents/skills/uloop-screenshot/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-screenshot toolName: screenshot -description: "Capture screenshots of Unity Editor windows as PNG files. Use when you need to: (1) Screenshot Game View, Scene View, Console, Inspector, or other windows, (2) Capture current visual state for debugging or documentation, (3) Save editor window appearance as PNG files with optional UI element annotations. Writes PNG files via uloop CLI." +description: "Capture Unity Editor windows or Game View rendering as PNG. Use for visual checks, debugging, documentation, or annotated UI element coordinates." --- # uloop screenshot diff --git a/.agents/skills/uloop-simulate-keyboard/SKILL.md b/.agents/skills/uloop-simulate-keyboard/SKILL.md index 358e6b2a5..8f44bc5dd 100644 --- a/.agents/skills/uloop-simulate-keyboard/SKILL.md +++ b/.agents/skills/uloop-simulate-keyboard/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-keyboard toolName: simulate-keyboard -description: "Simulate keyboard key input in PlayMode via Input System. Use when you need to: (1) Press game control keys like WASD, Space, or Shift during PlayMode, (2) Hold keys down for continuous movement or actions, (3) Combine multiple held keys for complex input like Shift+W for sprint. Injects into Unity Input System (`Keyboard.current`); requires PlayMode and the New Input System." +description: "Simulate keyboard input in PlayMode through Unity Input System. Use for key presses, holds, releases, and game controls such as WASD or Space." context: fork --- @@ -83,6 +83,6 @@ Returns JSON with: ## Prerequisites - Unity must be in **PlayMode** -- **Input System package** (`com.unity.inputsystem`) must be installed -- Active Input Handling must be set to **Input System Package (New)** or **Both** in Player Settings +- **Input System package** must be installed (`com.unity.inputsystem`) +- Use this only when the project already uses the New Input System. - Game code must read input via Input System API (e.g. `Keyboard.current[Key.W].isPressed`), not legacy `Input.GetKey()` diff --git a/.agents/skills/uloop-simulate-mouse-input/SKILL.md b/.agents/skills/uloop-simulate-mouse-input/SKILL.md index 05d196683..da66d0b1f 100644 --- a/.agents/skills/uloop-simulate-mouse-input/SKILL.md +++ b/.agents/skills/uloop-simulate-mouse-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-mouse-input toolName: simulate-mouse-input -description: "Simulate mouse input in PlayMode for gameplay code that reads Unity Input System Mouse.current. Use when you need to: (1) Click or right-click in games that read Mouse.current button state, (2) Inject mouse delta for FPS camera control, (3) Inject scroll wheel for hotbar switching or zoom. Requires PlayMode and the New Input System; for EventSystem UI elements, use simulate-mouse-ui instead." +description: "Simulate Mouse.current input in PlayMode through Unity Input System. Use for gameplay clicks, mouse delta, or scroll; use simulate-mouse-ui for EventSystem UI elements." context: fork --- @@ -59,7 +59,7 @@ uloop simulate-mouse-input --action [options] | Scenario | Tool | |----------|------| | Click a Unity UI Button (IPointerClickHandler) | `simulate-mouse-ui` | -| Destroy a block in Minecraft (reads `Mouse.current.leftButton`) | `simulate-mouse-input` when the project uses the New Input System; otherwise prefer `execute-dynamic-code` for a project-specific workaround | +| Destroy a block in Minecraft (reads `Mouse.current.leftButton`) | `simulate-mouse-input` when the project uses the New Input System | | Place a block with right-click | `simulate-mouse-input --button Right` when the project uses the New Input System | | Drag a UI slider | `simulate-mouse-ui --action Drag` | | Look around with mouse (FPS camera) | `simulate-mouse-input --action MoveDelta` when the project uses the New Input System | @@ -95,7 +95,7 @@ uloop simulate-mouse-input --action SmoothDelta --delta-x 300 --delta-y 0 --dura - Unity must be in **PlayMode** - **Input System package** must be installed (`com.unity.inputsystem`) - Game code must read input via Input System API (e.g. `Mouse.current.leftButton.wasPressedThisFrame`) -- If the target project cannot use the New Input System, prefer `execute-dynamic-code` for a project-specific workaround instead of changing project settings just to use this tool +- Use this only when the project already uses the New Input System. ## Output diff --git a/.agents/skills/uloop-simulate-mouse-ui/SKILL.md b/.agents/skills/uloop-simulate-mouse-ui/SKILL.md index 7e9a4efc8..ed7afba04 100644 --- a/.agents/skills/uloop-simulate-mouse-ui/SKILL.md +++ b/.agents/skills/uloop-simulate-mouse-ui/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-mouse-ui toolName: simulate-mouse-ui -description: "Simulate mouse click, long-press, and drag on PlayMode UI elements via EventSystem screen coordinates from annotated screenshots. Use when you need to: (1) Click buttons or interactive UI elements during PlayMode testing, (2) Drag UI elements between annotated screen positions, (3) Long-press or hold a drag for sustained pointer interactions. First get target coordinates with `uloop screenshot --capture-mode rendering --annotate-elements --elements-only` and use `AnnotatedElements[].SimX` / `SimY`; for gameplay code that reads Mouse.current, use simulate-mouse-input instead." +description: "Simulate PlayMode EventSystem UI mouse actions using screen coordinates. Use for UI clicks, long-presses, or drags from annotated screenshots." context: fork --- diff --git a/.claude/skills/uloop-clear-console/SKILL.md b/.claude/skills/uloop-clear-console/SKILL.md index a86149ab8..2202a7be2 100644 --- a/.claude/skills/uloop-clear-console/SKILL.md +++ b/.claude/skills/uloop-clear-console/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-clear-console toolName: clear-console -description: "Clear all Unity Console log entries. Use when you need to: (1) Clear console before running tests or compilation, (2) Start a fresh debugging session, (3) Remove noisy logs to isolate specific output." +description: "Clear Unity Console entries. Use before compile, tests, or debugging when stale logs would hide the current result." --- # uloop clear-console diff --git a/.claude/skills/uloop-compile/SKILL.md b/.claude/skills/uloop-compile/SKILL.md index 532e640e8..e9bd21c6b 100644 --- a/.claude/skills/uloop-compile/SKILL.md +++ b/.claude/skills/uloop-compile/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-compile toolName: compile -description: "Compile Unity project and report errors/warnings. Use when you need to: (1) Verify code compiles after C# file edits, (2) Check for compile errors before testing, (3) Force full recompilation with Domain Reload. Returns error and warning counts." +description: "Compile the Unity project and report errors/warnings. Use after C# edits or when a full Domain Reload compile is needed." --- # uloop compile diff --git a/.claude/skills/uloop-control-play-mode/SKILL.md b/.claude/skills/uloop-control-play-mode/SKILL.md index 3eead2c5e..828ef4d74 100644 --- a/.claude/skills/uloop-control-play-mode/SKILL.md +++ b/.claude/skills/uloop-control-play-mode/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-control-play-mode toolName: control-play-mode -description: "Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection." +description: "Control Unity Editor Play Mode. Use to start, stop, or pause Play Mode for runtime behavior checks and frame inspection." --- # uloop control-play-mode diff --git a/.claude/skills/uloop-execute-dynamic-code/SKILL.md b/.claude/skills/uloop-execute-dynamic-code/SKILL.md index 8161911c3..d29fcdc9c 100644 --- a/.claude/skills/uloop-execute-dynamic-code/SKILL.md +++ b/.claude/skills/uloop-execute-dynamic-code/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-execute-dynamic-code toolName: execute-dynamic-code -description: "Execute C# code dynamically in Unity Editor. Use find-game-objects first for basic selected GameObject discovery or property inspection. Use when you need to: (1) Wire prefab/material references and AddComponent operations, (2) Edit SerializedObject properties and reference wiring, (3) Perform scene/hierarchy edits and batch operations, (4) Execute Unity Editor menu commands through EditorApplication.ExecuteMenuItem, (5) PlayMode automation (click buttons, invoke methods, tweak runtime state), (6) PlayMode UI controls (InputField, Slider, Toggle, Dropdown), (7) PlayMode inspection that requires custom Unity API code beyond existing tools. NOT for file I/O or script authoring." +description: "Execute C# with Unity APIs when existing uloop tools cannot inspect or edit enough. Use for scene, prefab, SerializedObject, AssetDatabase refresh/.meta generation, menu, or PlayMode automation." context: fork --- diff --git a/.claude/skills/uloop-execute-dynamic-code/references/asset-operations.md b/.claude/skills/uloop-execute-dynamic-code/references/asset-operations.md index de0ed73fc..31ddf7adc 100644 --- a/.claude/skills/uloop-execute-dynamic-code/references/asset-operations.md +++ b/.claude/skills/uloop-execute-dynamic-code/references/asset-operations.md @@ -184,6 +184,8 @@ return $"Asset has {dependencies.Length} dependencies"; ## Refresh AssetDatabase +Use this after terminal-based asset file changes when Unity needs to import them and generate `.meta` files. + ```csharp using UnityEditor; diff --git a/.claude/skills/uloop-find-game-objects/SKILL.md b/.claude/skills/uloop-find-game-objects/SKILL.md index a6e7f6c7f..1d9bc71d9 100644 --- a/.claude/skills/uloop-find-game-objects/SKILL.md +++ b/.claude/skills/uloop-find-game-objects/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-find-game-objects toolName: find-game-objects -description: "Use first when the user asks about the currently selected GameObject in the Unity Hierarchy. Inspect selected object details with `--search-mode Selected` before using `execute-dynamic-code`. Use when you need to: (1) Get details and component properties for selected GameObject(s), (2) Search for objects by name, regex, or path, (3) Find objects with specific components, tags, or layers. Use get-hierarchy when the child tree under the selection is needed. Returns hierarchy paths, active state, tags, layers, and components (or writes to a file when multiple GameObjects are selected)." +description: "Find or inspect Unity GameObjects, especially objects the user currently selected in the Hierarchy. Use for details, components, tags, layers, or name/path searches." --- # uloop find-game-objects diff --git a/.claude/skills/uloop-focus-window/SKILL.md b/.claude/skills/uloop-focus-window/SKILL.md index 87dbc3587..9379ef080 100644 --- a/.claude/skills/uloop-focus-window/SKILL.md +++ b/.claude/skills/uloop-focus-window/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-focus-window -description: "Bring Unity Editor window to front via uloop CLI. Use when you need to: (1) Focus Unity Editor before capturing screenshots, (2) Ensure Unity window is visible for visual checks, (3) Bring Unity to foreground for user interaction." +description: "Bring the Unity Editor window to front. Use when Unity must be visible for visual checks or user-facing interaction." --- # uloop focus-window diff --git a/.claude/skills/uloop-get-hierarchy/SKILL.md b/.claude/skills/uloop-get-hierarchy/SKILL.md index 9323b9414..fc7724208 100644 --- a/.claude/skills/uloop-get-hierarchy/SKILL.md +++ b/.claude/skills/uloop-get-hierarchy/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-get-hierarchy toolName: get-hierarchy -description: "Get Unity scene hierarchy as a structured tree from all roots, a root path, or the current Hierarchy selection. Use this when you need the child tree, parent-child structure, or descendants under selected GameObject(s) with `--use-selection`. Use find-game-objects for selected object details and component properties. Hierarchy data is written to a JSON file on disk and the response returns the file path (not the tree inline) — open the file to read the structure." +description: "Get the Unity scene hierarchy as a structured tree. Use for parent-child structure, descendants, roots, or subtrees under objects the user currently selected." --- # uloop get-hierarchy diff --git a/.claude/skills/uloop-get-logs/SKILL.md b/.claude/skills/uloop-get-logs/SKILL.md index 49c7d281d..68cb95938 100644 --- a/.claude/skills/uloop-get-logs/SKILL.md +++ b/.claude/skills/uloop-get-logs/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-get-logs toolName: get-logs -description: "Retrieve current Unity Console entries via uloop CLI. Use when you need to: (1) inspect errors, warnings, or logs after compile, tests, PlayMode, or dynamic code execution, (2) search current Console messages or stack traces, (3) confirm whether a recent Unity operation emitted logs. Prefer this over reading Editor.log or Unity log files for normal Console contents; use log files only for startup, crash, freeze, or uloop connection failures." +description: "Read current Unity Console entries from a running Editor. Use during bug investigation after compile, tests, PlayMode, or dynamic code to inspect logs, warnings, errors, and stack traces." --- # uloop get-logs diff --git a/.claude/skills/uloop-hello-world/SKILL.md b/.claude/skills/uloop-hello-world/SKILL.md index 776e34624..475cfbb4d 100644 --- a/.claude/skills/uloop-hello-world/SKILL.md +++ b/.claude/skills/uloop-hello-world/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-hello-world -description: "Sample hello world tool via uloop CLI. Use when you need to test the Unity CLI Loop tool system or see an example of custom tool implementation." +description: "Sample uloop hello-world tool. Use to verify custom tool wiring or inspect a minimal tool implementation example." --- # uloop hello-world diff --git a/.claude/skills/uloop-launch/SKILL.md b/.claude/skills/uloop-launch/SKILL.md index 613547391..6e5a63218 100644 --- a/.claude/skills/uloop-launch/SKILL.md +++ b/.claude/skills/uloop-launch/SKILL.md @@ -1,6 +1,6 @@ --- name: uloop-launch -description: "Launch Unity project with matching Editor version via uloop CLI. Use when you need to: (1) Open a Unity project with the correct Editor version, (2) Restart Unity to apply changes, (3) Switch build target when launching." +description: "Launch or restart Unity Editor. Use when Unity needs to be opened or restarted." --- # uloop launch diff --git a/.claude/skills/uloop-record-input/SKILL.md b/.claude/skills/uloop-record-input/SKILL.md index ba2a974a8..2e824ff6a 100644 --- a/.claude/skills/uloop-record-input/SKILL.md +++ b/.claude/skills/uloop-record-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-record-input toolName: record-input -description: "Record keyboard and mouse input during PlayMode into a JSON file. Use when you need to: (1) Capture human gameplay input for later replay, (2) Record input sequences for E2E testing, (3) Save input for bug reproduction. Captures Input System device-state diffs frame-by-frame in PlayMode and serializes them to JSON when stopped. Requires PlayMode and the New Input System." +description: "Record PlayMode keyboard and mouse input to JSON. Use to capture gameplay, bug repro, or E2E input sequences for replay." --- # uloop record-input @@ -40,7 +40,7 @@ Replay injects input frame-by-frame, so the game must also be deterministic to p - Unity must be in **PlayMode** - **Input System package** must be installed (`com.unity.inputsystem`) -- Active Input Handling must be set to `Input System Package (New)` or `Both` in Player Settings +- Use this only when the project already uses the New Input System. ## Output diff --git a/.claude/skills/uloop-replay-input/SKILL.md b/.claude/skills/uloop-replay-input/SKILL.md index 803b05454..dc9d81414 100644 --- a/.claude/skills/uloop-replay-input/SKILL.md +++ b/.claude/skills/uloop-replay-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-replay-input toolName: replay-input -description: "Replay recorded input during PlayMode with frame-precise injection. Use when you need to: (1) Reproduce recorded gameplay exactly, (2) Run E2E tests from recorded input, (3) Generate demo videos with consistent input. Deserializes the JSON recording and pushes captured device states back into Mouse.current / Keyboard.current frame-by-frame in PlayMode. Requires PlayMode and the New Input System." +description: "Replay recorded PlayMode keyboard and mouse input. Use for exact gameplay reproduction, E2E runs, or consistent demos from JSON recordings." --- # uloop replay-input @@ -40,6 +40,12 @@ uloop replay-input --action Stop Replay injects the exact same input frame-by-frame, but the game must also be deterministic to produce identical results. If replay output must be compared across runs, read [references/deterministic-replay.md](references/deterministic-replay.md) before interpreting failures. +## Prerequisites + +- Unity must be in **PlayMode** +- **Input System package** must be installed (`com.unity.inputsystem`) +- Use this only when the project already uses the New Input System. + ## Output Returns JSON with: diff --git a/.claude/skills/uloop-run-tests/SKILL.md b/.claude/skills/uloop-run-tests/SKILL.md index f614a6329..89406b1b6 100644 --- a/.claude/skills/uloop-run-tests/SKILL.md +++ b/.claude/skills/uloop-run-tests/SKILL.md @@ -1,13 +1,15 @@ --- name: uloop-run-tests toolName: run-tests -description: "Execute Unity Test Runner and get detailed results. Use when you need to: (1) Run EditMode or PlayMode unit tests, (2) Verify code changes pass all tests, (3) Diagnose test failures with error messages and stack traces. Single-flight only — never run multiple `uloop run-tests` in parallel." +description: "Run Unity Test Runner and report detailed results. Use for EditMode/PlayMode tests, change verification, or failure diagnosis." --- # uloop run-tests Execute Unity Test Runner. When tests fail, NUnit XML results with error messages and stack traces are automatically saved. Read the XML file at `XmlPath` for detailed failure diagnosis. +`uloop run-tests` is single-flight. Do not run multiple `uloop run-tests` commands in parallel against the same Unity Editor. + Before executing tests, `uloop run-tests` checks for unsaved loaded Scene changes and unsaved current Prefab Stage changes. If any are found, it returns `Success: false`, keeps `TestCount` at `0`, lists the unsaved items in `Message`, and does not start the Unity Test Runner. Save or discard those editor changes, then rerun the command. Use `--save-before-run` only when the user explicitly asks to save editor changes before continuing. ## Usage diff --git a/.claude/skills/uloop-screenshot/SKILL.md b/.claude/skills/uloop-screenshot/SKILL.md index f9da5b7cd..6aaea3988 100644 --- a/.claude/skills/uloop-screenshot/SKILL.md +++ b/.claude/skills/uloop-screenshot/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-screenshot toolName: screenshot -description: "Capture screenshots of Unity Editor windows as PNG files. Use when you need to: (1) Screenshot Game View, Scene View, Console, Inspector, or other windows, (2) Capture current visual state for debugging or documentation, (3) Save editor window appearance as PNG files with optional UI element annotations. Writes PNG files via uloop CLI." +description: "Capture Unity Editor windows or Game View rendering as PNG. Use for visual checks, debugging, documentation, or annotated UI element coordinates." --- # uloop screenshot diff --git a/.claude/skills/uloop-simulate-keyboard/SKILL.md b/.claude/skills/uloop-simulate-keyboard/SKILL.md index 358e6b2a5..8f44bc5dd 100644 --- a/.claude/skills/uloop-simulate-keyboard/SKILL.md +++ b/.claude/skills/uloop-simulate-keyboard/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-keyboard toolName: simulate-keyboard -description: "Simulate keyboard key input in PlayMode via Input System. Use when you need to: (1) Press game control keys like WASD, Space, or Shift during PlayMode, (2) Hold keys down for continuous movement or actions, (3) Combine multiple held keys for complex input like Shift+W for sprint. Injects into Unity Input System (`Keyboard.current`); requires PlayMode and the New Input System." +description: "Simulate keyboard input in PlayMode through Unity Input System. Use for key presses, holds, releases, and game controls such as WASD or Space." context: fork --- @@ -83,6 +83,6 @@ Returns JSON with: ## Prerequisites - Unity must be in **PlayMode** -- **Input System package** (`com.unity.inputsystem`) must be installed -- Active Input Handling must be set to **Input System Package (New)** or **Both** in Player Settings +- **Input System package** must be installed (`com.unity.inputsystem`) +- Use this only when the project already uses the New Input System. - Game code must read input via Input System API (e.g. `Keyboard.current[Key.W].isPressed`), not legacy `Input.GetKey()` diff --git a/.claude/skills/uloop-simulate-mouse-input/SKILL.md b/.claude/skills/uloop-simulate-mouse-input/SKILL.md index 05d196683..da66d0b1f 100644 --- a/.claude/skills/uloop-simulate-mouse-input/SKILL.md +++ b/.claude/skills/uloop-simulate-mouse-input/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-mouse-input toolName: simulate-mouse-input -description: "Simulate mouse input in PlayMode for gameplay code that reads Unity Input System Mouse.current. Use when you need to: (1) Click or right-click in games that read Mouse.current button state, (2) Inject mouse delta for FPS camera control, (3) Inject scroll wheel for hotbar switching or zoom. Requires PlayMode and the New Input System; for EventSystem UI elements, use simulate-mouse-ui instead." +description: "Simulate Mouse.current input in PlayMode through Unity Input System. Use for gameplay clicks, mouse delta, or scroll; use simulate-mouse-ui for EventSystem UI elements." context: fork --- @@ -59,7 +59,7 @@ uloop simulate-mouse-input --action [options] | Scenario | Tool | |----------|------| | Click a Unity UI Button (IPointerClickHandler) | `simulate-mouse-ui` | -| Destroy a block in Minecraft (reads `Mouse.current.leftButton`) | `simulate-mouse-input` when the project uses the New Input System; otherwise prefer `execute-dynamic-code` for a project-specific workaround | +| Destroy a block in Minecraft (reads `Mouse.current.leftButton`) | `simulate-mouse-input` when the project uses the New Input System | | Place a block with right-click | `simulate-mouse-input --button Right` when the project uses the New Input System | | Drag a UI slider | `simulate-mouse-ui --action Drag` | | Look around with mouse (FPS camera) | `simulate-mouse-input --action MoveDelta` when the project uses the New Input System | @@ -95,7 +95,7 @@ uloop simulate-mouse-input --action SmoothDelta --delta-x 300 --delta-y 0 --dura - Unity must be in **PlayMode** - **Input System package** must be installed (`com.unity.inputsystem`) - Game code must read input via Input System API (e.g. `Mouse.current.leftButton.wasPressedThisFrame`) -- If the target project cannot use the New Input System, prefer `execute-dynamic-code` for a project-specific workaround instead of changing project settings just to use this tool +- Use this only when the project already uses the New Input System. ## Output diff --git a/.claude/skills/uloop-simulate-mouse-ui/SKILL.md b/.claude/skills/uloop-simulate-mouse-ui/SKILL.md index 7e9a4efc8..ed7afba04 100644 --- a/.claude/skills/uloop-simulate-mouse-ui/SKILL.md +++ b/.claude/skills/uloop-simulate-mouse-ui/SKILL.md @@ -1,7 +1,7 @@ --- name: uloop-simulate-mouse-ui toolName: simulate-mouse-ui -description: "Simulate mouse click, long-press, and drag on PlayMode UI elements via EventSystem screen coordinates from annotated screenshots. Use when you need to: (1) Click buttons or interactive UI elements during PlayMode testing, (2) Drag UI elements between annotated screen positions, (3) Long-press or hold a drag for sustained pointer interactions. First get target coordinates with `uloop screenshot --capture-mode rendering --annotate-elements --elements-only` and use `AnnotatedElements[].SimX` / `SimY`; for gameplay code that reads Mouse.current, use simulate-mouse-input instead." +description: "Simulate PlayMode EventSystem UI mouse actions using screen coordinates. Use for UI clicks, long-presses, or drags from annotated screenshots." context: fork ---