unity-repl

Execute raw C# expressions on a running Unity Editor via file-based IPC.

41|6|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/LambdaLabsHQ/unity-repl --skill unity-repl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-repl
Source: https://github.com/LambdaLabsHQ/unity-repl/tree/main/.agents/skills/unity-repl
Command: npx skills add https://github.com/LambdaLabsHQ/unity-repl --skill unity-repl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides direct, evaluative access to the Unity Editor runtime so agents and developers can query engine state, modify scenes, instantiate assets, and run Unity API commands without building custom tool wrappers or MCP endpoints.

Core Features & Use Cases

  • One-shot and interactive REPL: evaluate single expressions or run a persistent prompt to drive iterative exploration.
  • Scene and runtime manipulation: inspect scene graph, instantiate prefabs, add components, and toggle Play Mode from automated agents or CI.
  • Coroutines, validation, and automation contracts: auto-drives IEnumerators across frames, supports compile-only validation, configurable timeouts, and deterministic exit codes for automation workflows.
  • Use Case: an autonomous agent can discover a test scenario, synthesize a multi-step C# snippet to set up the scene, run a coroutine to exercise gameplay, and collect results as stdout for downstream analysis.

Quick Start

Use the unity-repl skill to evaluate a C# expression that returns the active scene name and print the result.

Frequently Asked Questions about unity-repl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute C# scripts directly in the Unity Editor runtime?

You can execute C# scripts directly in the Unity Editor by using a REPL that evaluates raw expressions over file-based IPC, preloads common Unity namespaces, and returns structured output for automation.

How do I automate Unity scene inspection and prefab instantiation from an external script?

Automate Unity scene inspection and prefab instantiation by sending raw C# statements to the running Unity Editor via IPC, allowing agents to query and mutate runtime state without building custom tool wrappers.

Can I run Unity coroutines from a CI workflow or automated agent?

Yes, you can run Unity coroutines from CI workflows by evaluating C# in the editor REPL, which auto-drives IEnumerators across frames with configurable timeouts and deterministic exit codes for automation.

Does the Unity REPL support compile-time validation without executing the code?

Yes, the Unity REPL supports compile-only validation, allowing you to enforce compile-time checks on C# expressions and statements before executing them against the runtime editor state.

What is the best way to toggle Unity Play Mode from an autonomous agent?

The best way to toggle Unity Play Mode from an autonomous agent is by sending raw C# commands through a REPL over IPC, which directly manipulates the editor runtime and returns structured exit codes.