--- name: ue5-unreal description: > Unreal Engine 5 development assistant — crash analysis, asset auditing, knowledge-base search, and Python script generation via Spaghetti Unreal AI Workbench. Call these tools when the user is working in a UE5 project and needs expert help with crashes, asset cleanup, engine docs, or editor automation. --- # UE5 Unreal AI Workbench Tools This skill provides access to Spaghetti's Unreal AI Workbench MCP tools. These tools run on a remote server (`mcp.spaghetti.gg`) and require authentication via OAuth (your client handles this automatically on first connect — a browser window opens for sign-in at spaghetti.gg). ## Prerequisites Your UE5 project must have a `.spaghetti` file at its root containing `team_id` and `project_id`. If no `.spaghetti` exists, the first tool call returns an Agentic Directive instructing you to create one. Follow it. ## Available tools (Phase 1 — MVP) ### Crash Investigator (`spaghetti/analyze_crash`) **When to call:** The user reports a UE5 crash, paste an output log, or mentions a crash dump / minidump. **What it does:** Parses the UE5 Output Log and crash dumps, identifies root-cause nodes or C++ pointers, and returns a precise fix with context from the proprietary UE5 bug knowledge base. **Input:** Crash log text (paste the Output Log contents or the relevant section). **Safety:** Read-only analysis. Returns a diagnosis + suggested fix; does not modify project files. ### Asset Janitor (`spaghetti/audit_assets`) **When to call:** The user asks about asset cleanup, naming conventions, unused assets, missing LODs, or compliance reports. **What it does:** Finds textures without LODs, detects naming-convention violations (`T_`, `BP_`, etc.), identifies unused/0-reference assets, and generates compliance reports. **Input:** Optionally specify which checks to run (naming, LODs, unused). **Safety:** Audit is read-only. If the user wants to apply fixes, use Tool-Maker to generate a dry-run Python script first. ### Smart Librarian (`spaghetti/search_kb`) **When to call:** The user asks about UE5 engine architecture, best practices, or how specific systems work. Also for snippet search (verified node setups, Blueprint patterns). **What it does:** Semantic search over two knowledge bases: - **Team KB:** your project's private RAG index (studio docs, past bug resolutions, conventions). - **UE5 Engine Graph:** GraphRAG over the public UE 5.8 source for multi-hop reasoning about engine architecture. **Input:** Natural-language query about UE5 or your project's knowledge base. ### Tool-Maker (`spaghetti/make_tool`) **When to call:** The user wants to automate a UE5 editor task (batch-rename assets, apply materials, configure project settings, etc.). **What it does:** Generates a safe, production-quality Python script using `unreal.EditorAssetLibrary` API. The script runs via the UE 5.8 Python remote execution bridge. **Safety — three-layer model:** 1. **API allowlist:** only approved `unreal.EditorAssetLibrary` functions. 2. **Dry run:** scripts default to simulation mode (log what would happen, don't execute destructive ops). 3. **Human approval:** before any destructive script runs, the user sees an Approve/Reject dialog. **Always show the generated script to the user before executing.** If the script modifies assets, wrap in `unreal.ScopedTransaction` for undo support. ## Safety defaults - **Never auto-delete assets** without explicit user confirmation. - **Prefer dry-run mode** for any script that modifies the project. - **Use ScopedTransaction** for reversible operations (enables Ctrl+Z). - **Read the Output Log** for errors after any automated editor operation. ## Context The `.spaghetti` file at the project root identifies which team and project this UE5 project belongs to. All tool calls are billed to the team's Spaghetti wallet. If you see a `402 Payment Required`, direct the user to `spaghetti.gg/billing` to top up.