AgentBridge CLAUDE.md

Repository instructions for AgentBridge, a Unity package that lets language-model agents control a running Unity Editor through files and an MCP connection.

In plain words
What is it for?
Running Go integration tests, building the Go agent, and checking C# changes in Unity.
Why use it?
They record the project structure and the checks needed after code changes, reducing mistakes such as using the wrong test timeout or missing Unity compile errors.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/simonwittber/agentbridge/claude-md
Clone the repo
git clone --depth 1 https://github.com/simonwittber/AgentBridge
Per session 593 This file is loaded in full into every session.
When invoked 593 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00593 $0.00593
Opus 5 $0.00296 $0.00296
Sonnet 5 $0.00119 $0.00119
Haiku 4.5 $0.00059 $0.00059

Measured 2d ago against content hash 87f06a2aa9fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AgentBridge CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentBridge

Unity package (com.dffrnt.llm-dev-tools) that exposes a file-based command bridge so LLM agents can control a running Unity Editor via MCP.

Structure

AgentBridge/
  Editor/         C# EditorWindow + AgentBridge (Unity-side bridge)
  Harness~/       Go agent CLI + tools (excluded from Unity import)
  Example~/       Example Unity project (excluded from Unity import)
  Tests~/         Test package (excluded from Unity import)

Running integration tests

cd AgentBridge/Harness~/dffrnt-agent
go test -timeout 300s

Use -timeout 300s minimum. The full suite takes ~120s; the default 30s timeout will kill it mid-run.

Building the Go agent

cd AgentBridge/Harness~/dffrnt-agent
go build -o dffrnt-agent .        # Linux/macOS
go build -o dffrnt-agent.exe .    # Windows

Run go get ./... first if dependencies are missing.

After editing C# files

Open Unity and let it compile. Check the Console for errors. There is no automated compile trigger — Unity auto-compiles on focus or file change.

Key files

File Purpose
AgentBridge/Editor/AgentBridge.cs Main bridge loop — reads Temp/agent_input, writes Temp/agent_output
AgentBridge/Editor/AgentLogWindow.cs Window > General > LLM Agent Log
AgentBridge/Harness~/dffrnt-agent/main.go CLI entry point (dffrnt-agent send / dffrnt-agent serve)
AgentBridge/Harness~/dffrnt-agent/serve.go MCP server (stdio transport)
AgentBridge/Harness~/dffrnt-agent/bridge.go File I/O helpers, session check, UID generation

Protocol

  • Temp/agent_input — newline-delimited JSON written by the agent CLI
  • Temp/agent_output — newline-delimited JSON written by Unity
  • Temp/agent_session — JSON heartbeat written by Unity every 5 s: pid, state, active_scene, play_mode, compile_errors, written_at
  • Output rotates at 2 MB; input is truncated on Unity startup

Notifications

AgentBridge sends notifications/message events when Unity state changes. In serve mode, dffrnt-agent forwards these automatically to connected MCP clients.

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 64 lines · 593 tokens per session scan A 87f06a2aa9fb

Subscribe to this mod's changes

AgentBridge CLAUDE.md is an instructions file published in the GitHub repository simonwittber/AgentBridge (0 stars, last pushed 7d ago), licensed MIT. It adds 593 tokens to every session, about $0.0030 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.