Backup of the full Claude Code environment — custom hooks, agents, skills, slash commands, output styles, and settings. Designed to restore a working setup on a new machine in minutes.
Copy this folder to your home directory (~/.claude/ or C:\Users\<username>\.claude\).
| Folder/File | Purpose |
|---|---|
settings.json |
Global settings: permissions, hooks, status line, effort level |
CLAUDE.md |
Global instructions loaded into every conversation |
hooks/ |
Python lifecycle scripts (pre/post tool use, notifications, session tracking, TTS, LLM utilities) |
status_lines/ |
Status line scripts showing context window usage |
agents/ |
Custom sub-agent definitions (builder, validator, crypto, research, TTS) |
commands/ |
Slash commands (plan, build, cook, prime, git_status, etc.) |
skills/ |
Skills (defuddle, obsidian-cli, obsidian-markdown, json-canvas, obsidian-bases) |
output-styles/ |
Output format templates (bullet-points, ultra-concise, TTS, tables, etc.) |
projects/ |
Per-project persistent memory (will regenerate as you work) |
Step-by-step instructions for setting up Claude Code with a Unity 6 project, including:
- MCP server configuration (mcp-unity, mcp-playtest)
- Unity packages to install
- Project-level permissions and settings
- Environment variables for API keys
Install these before restoring the backup:
| Tool | Install |
|---|---|
| Node.js 18+ | https://nodejs.org |
| Python 3.11+ | https://www.python.org |
| uv | pip install uv or https://docs.astral.sh/uv |
| Git | https://git-scm.com |
npm install -g @anthropic-ai/claude-codeRun claude once to log in and let it create the initial ~/.claude/ folder.
Copy the contents of this repo's .claude/ folder into your ~/.claude/ directory, overwriting the defaults:
# Linux/macOS
cp -r .claude/* ~/.claude/
# Windows (PowerShell)
Copy-Item -Path .\.claude\* -Destination $env:USERPROFILE\.claude\ -Recurse -Forcenpm install -g defuddle typescriptOpen ~/.claude/CLAUDE.md and set your Obsidian vault path (if using one):
A cross-project Obsidian vault exists at `<YOUR_VAULT_PATH>`.Start Claude Code in any project directory:
claudeYou should see the status line at the bottom and all slash commands available (type / to list them).
See Unity-Requirements.md for the full Unity-specific setup, including MCP servers, project permissions, and the MCP Playtest Server installation.
A custom two-tier MCP server that enables AI-driven Play Mode testing, input simulation, screenshot/video capture, and game state querying — all while Unity runs as a background window.
The standard mcp-unity package shuts down during Play Mode domain reloads, so there is no way for an AI agent to interact with the game at runtime. The MCP Playtest Server fills that gap by surviving Play Mode transitions via SessionState persistence and [DidReloadScripts] restart.
Claude Code <-> (stdio) <-> Node.js MCP Server (TypeScript)
|
WebSocket (port 8091, path /McpPlaytest)
|
Unity Editor (C# PlaytestServer)
- Runs on port 8091 (mcp-unity uses 8090)
- WebSocket path:
/McpPlaytest - Namespace:
McpPlaytest
| Tool | Description |
|---|---|
play_mode_control |
Enter, exit, pause, unpause, or step-frame Play Mode |
capture_screenshot |
Capture Game View as base64 PNG (works without window focus) |
simulate_input |
Inject movement (x,y) or button presses (melee/ranged/throw/special) |
query_game_state |
Read player positions, scores, states, round info, game mode |
get_playtest_logs |
Retrieve recent console logs with error/warning/log filtering |
record_video |
Start/stop frame-sequence recording, returns array of PNG frames |
spawn_player |
Spawn a new player with a virtual gamepad device in Lobby state |
Capture works even when Unity is a background window that is not focused. The primary capture method renders all active cameras directly to a RenderTexture (bypassing the Game View window entirely). A fallback reads the Game View's internal render texture via reflection if the camera approach fails.
- Screenshots: returned as a single base64 PNG at the requested resolution (default 1280x720)
- Video: captures frame sequences at a configurable FPS (default 5) and max duration (default 5s). Frames are returned as individual PNG image blocks, up to 30 frames max.
Assets/Editor/McpPlaytest/
├── PlaytestServer.cs # WebSocket server, tool registry, Play Mode lifecycle
├── PlaytestSocketHandler.cs # Message routing, JSON-RPC handling
├── PlaytestToolBase.cs # Base class for all tools
├── Tools/
│ ├── PlayModeControlTool.cs
│ ├── CaptureScreenshotTool.cs
│ ├── SimulateInputTool.cs
│ ├── QueryGameStateTool.cs
│ ├── GetConsoleLogsTool.cs
│ ├── RecordVideoTool.cs
│ └── SpawnPlayerTool.cs
├── Utils/
│ ├── ScreenCaptureHelper.cs # RenderTexture-based capture (background-safe)
│ └── InputSimulator.cs # Virtual gamepad input injection
└── Server~/ # Node.js TypeScript MCP bridge (ignored by Unity)
├── package.json
├── tsconfig.json
└── src/
├── index.ts # MCP server entry point, tool registration
├── unity/playtestUnity.ts # WebSocket client to Unity Editor
├── utils/
│ ├── logger.ts
│ └── errors.ts
└── tools/ # One handler per tool, mirrors C# tools
- The
Assets/Editor/McpPlaytest/folder is already in the project. - Build the Node.js server:
cd Assets/Editor/McpPlaytest/Server~ npm install npm run build - Ensure
.mcp.jsonin the project root has themcp-playtestentry:{ "mcpServers": { "mcp-playtest": { "command": "node", "args": ["<project-path>/Assets/Editor/McpPlaytest/Server~/build/index.js"] } } } - Open Unity — the PlaytestServer starts automatically on port 8091.
- Restart Claude Code to pick up the new MCP server.
ProjectSettings/McpPlaytestSettings.json:
{
"Port": 8091,
"Host": "localhost",
"RequestTimeoutSeconds": 30
}- The
projects/folder contains per-project memory tied to directory paths. It will regenerate naturally as you work — no need to restore it on a new machine. - The
tasks/folder holds current session tasks and can be safely ignored. - Hooks use
uv run --scriptwith inline dependencies —uvauto-installs Python packages on first run. No manualpip installneeded beyonduvitself. - API keys (
ANTHROPIC_API_KEY,OPENAI_API_KEY,ELEVENLABS_API_KEY) must be set separately in your environment or a.envfile if using the LLM/TTS hook utilities.