unity-skill
Enables AI agents to control Unity Editor via HTTP bridge. Injects AI service scripts into Unity projects for remote command execution (create/delete objects, modify scenes, query hierarchy). Use when working with Unity projects or when user requests Unity scene manipulation.
Best use case
unity-skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Enables AI agents to control Unity Editor via HTTP bridge. Injects AI service scripts into Unity projects for remote command execution (create/delete objects, modify scenes, query hierarchy). Use when working with Unity projects or when user requests Unity scene manipulation.
Teams using unity-skill should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/unity-skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How unity-skill Compares
| Feature / Agent | unity-skill | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Enables AI agents to control Unity Editor via HTTP bridge. Injects AI service scripts into Unity projects for remote command execution (create/delete objects, modify scenes, query hierarchy). Use when working with Unity projects or when user requests Unity scene manipulation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Unity AI Control Skill
This skill allows AI agents to directly control the Unity Editor by injecting an HTTP bridge service into Unity projects.
## What This Skill Does
1. **Deploys HTTP Server**: Automatically injects `AIService.cs` into the Unity project's Editor folder
2. **Enables Remote Control**: Provides an HTTP API (port 8081) for real-time Unity control
3. **Main Thread Safe**: Handles Unity API calls correctly on the main thread
4. **JSON Communication**: Uses simple JSON format for commands and responses
## When to Use This Skill
Use this skill when:
- User requests Unity scene modifications (create/delete objects, move, etc.)
- Automating Unity Editor operations
- Building or testing Unity scenes programmatically
- User mentions "Unity", "GameObject", "scene", or related terms
## Deployment Instructions
### Step 1: Inject AI Service
Copy the skill templates into the Unity project:
```powershell
Copy-Item -Path "<skill-folder>/assets/templates/*" -Destination "<unity-project-path>" -Recurse -Force
```
This creates:
- `Assets/Editor/AgentBridge/AgentBridgeServer.cs` - HTTP server and command executor
### Step 2: Wait for Unity Compilation
Unity will automatically:
1. Detect the new script
2. Compile it
3. Start the HTTP server on port 8081
4. Display in Console: `[AI Bridge] Server started on http://127.0.0.1:8081`
### Step 3: Send Commands
Execute Unity operations via HTTP POST:
```powershell
# Recommended: Use single quotes (no escaping needed)
curl.exe -X POST http://127.0.0.1:8081/execute -d '{"command":"CreateCube","x":0,"y":1,"z":0}'
# Alternative: Use double quotes (requires escaping)
curl.exe -X POST http://127.0.0.1:8081/execute -d "{\"command\":\"CreateCube\",\"x\":0,\"y\":1,\"z\":0}"
```
## Available Commands
### CreateCube
Creates a cube primitive at specified position.
**Request**:
```json
{
"command": "CreateCube",
"x": 0,
"y": 1,
"z": 0
}
```
**Response**:
```json
{
"status": "success",
"id": 12345,
"name": "Cube"
}
```
**Parameters**:
- `x`, `y`, `z` (number) - World position coordinates
## Architecture
```
AI Agent → HTTP POST (JSON) → Unity HTTP Server (8081)
↓
Main Thread Queue
↓
Unity API Execution
↓
JSON Response → AI Agent
```
### Key Components
1. **HTTP Server**: Listens on `127.0.0.1:8081` (localhost only for security)
2. **Main Thread Dispatcher**: Queue-based system ensures Unity API calls on main thread
3. **JSON Parser**: Supports both quoted and unquoted JSON formats (handles curl quirks)
4. **Command Executor**: Switch-based routing for different commands
## Troubleshooting
### Server not starting
- Check Unity Console for compilation errors
- Verify `Assets/Editor/AgentBridge/AgentBridgeServer.cs` exists
- Restart Unity if needed
### "Unknown command" error
- Check command name spelling (case-sensitive)
- Verify JSON format is correct
- Review Unity Console for parsing logs
### "Execution timeout" error
- Unity may be busy compiling
- Check if Unity Editor is in Play mode (Editor scripts don't run in Play mode)
- Increase timeout if performing heavy operations
## Examples
### Create cube at origin
```powershell
curl.exe -X POST http://127.0.0.1:8081/execute -d '{"command":"CreateCube","x":0,"y":0,"z":0}'
```
### Create cube at custom position
```powershell
curl.exe -X POST http://127.0.0.1:8081/execute -d '{"command":"CreateCube","x":10,"y":5,"z":-3}'
```
### Health check
```powershell
curl.exe http://127.0.0.1:8081
```
Expected: `{"status":"ok","service":"Unity AI Bridge"}`
## Extending This Skill
To add new commands, edit `AIService.cs` and add cases to the `ExecuteCommand` method:
```csharp
else if (command == "YourCommand")
{
// Parse parameters
// Execute Unity operations
// Return JSON result
}
```
## Security Notes
- Server binds to `127.0.0.1` only (localhost)
- No external network access
- Runs only in Unity Editor (not in builds)
- Consider adding authentication for production use
## Requirements
- Unity Editor (any version supporting `System.Net.HttpListener`)
- Windows/Mac/Linux (HttpListener is cross-platform)
- No additional dependenciesRelated Skills
ops-automation-opportunity-finder
Identify and evaluate automation opportunities in banking operations using structured assessment frameworks. Use when analyzing processes for RPA, intelligent automation, AI/ML, or straight-through processing potential across payments, lending, account servicing, compliance, and back-office functions.
community-monetization
When the user wants to monetize their community through paid memberships, sponsorships, premium tiers, or other revenue models. Also use when the user mentions 'paid community,' 'monetize community,' 'community revenue,' 'sponsorship,' 'premium tier,' 'community subscription,' 'membership fee,' or 'community business model.' For community as a business growth engine, see community-led-growth.
startup-business-analyst-market-opportunity
Generate comprehensive market opportunity analysis with TAM/SAM/SOM calculations
internal-comms-community
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal ...
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
accessibility-ux-audit
Audit and enhance accessibility and UX across all pages and components.
accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
accessibility-rules
Concise accessibility checklist and practices for components in the repository. Use when implementing UI to ensure keyboard, screen reader, and focus semantics.
accessibility-planning
Plan accessibility compliance - WCAG 2.2, Section 508, EN 301 549, inclusive design principles, audit planning, and remediation strategies.
accessibility-design
WCAG 2.1 AA compliance patterns, screen reader compatibility, keyboard navigation, and ARIA best practices. Use when implementing accessible interfaces, reviewing UI components, or auditing accessibility compliance. Covers semantic HTML, focus management, color contrast, and assistive technology testing.
accessibility-design-checklist
Эксперт по accessibility дизайну. Используй для WCAG, a11y чеклистов и inclusive design.
accessibility-design-checker
Ensures designs meet accessibility requirements including WCAG compliance, color contrast, keyboard navigation, screen reader support, and focus management. Reviews designs for accessibility issues and provides recommendations.