skills/hatayama/uloopmcp/uloop-execute-dynamic-code

uloop-execute-dynamic-code

SKILL.md

Task

Execute the following request using uloop execute-dynamic-code: $ARGUMENTS

Workflow

  1. Read the relevant reference file(s) from the Code Examples section below
  2. Construct C# code based on the reference examples
  3. Execute via Bash: uloop execute-dynamic-code --code '<code>'
  4. If execution fails, adjust code and retry
  5. Report the execution result

Tool Reference

uloop execute-dynamic-code --code '<c# code>'

Parameters

Parameter Type Default Description
--code string - C# code to execute (direct statements, no class wrapper)
--compile-only boolean false Compile without execution

Code Format

Write direct statements only (no classes/namespaces/methods). Return is optional.

using UnityEngine;
var x = Mathf.PI;
return x;

String Literals (Shell-specific)

Shell Method
bash/zsh 'Debug.Log("Hello!");'
PowerShell 'Debug.Log(""Hello!"");'

Allowed Operations

  • Prefab/material wiring (PrefabUtility)
  • AddComponent + reference wiring (SerializedObject)
  • Scene/hierarchy edits
  • Inspector modifications

Forbidden Operations

  • System.IO.* (File/Directory/Path)
  • AssetDatabase.CreateFolder / file writes
  • Create/edit .cs/.asmdef files

Global Options

Option Description
--project-path <path> Target a specific Unity project (mutually exclusive with --port)
-p, --port <port> Specify Unity TCP port directly (mutually exclusive with --project-path)

Output

Returns JSON with execution result or compile errors.

For file/directory operations, use terminal commands instead.

Code Examples by Category

For detailed code examples, refer to these files:

Weekly Installs
30
GitHub Stars
207
First Seen
Feb 14, 2026
Installed on
codex30
github-copilot29
kimi-cli29
gemini-cli29
opencode29
amp29