Detect and resolve Unity C# compilation errors using VSCode diagnostics. Use this skill when Unity projects have compilation errors that need diagnosis and automated fixes. Analyzes errors from VSCode Language Server, proposes solutions based on error patterns, and handles version control conflicts for Unity projects.
Detects and resolves Unity C# compilation errors by analyzing VSCode diagnostics from the OmniSharp language server. Uses an error pattern database to propose context-aware fixes for common Unity issues, handling version control conflicts and verifying fixes.
/plugin marketplace add Dev-GOM/claude-code-marketplace/plugin install unity-dev-toolkit@dev-gom-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/error-patterns.jsonscripts/analyze-diagnostics.jsThis skill enables automatic detection and resolution of Unity C# compilation errors by leveraging VSCode's diagnostic system. It collects real-time errors from the OmniSharp C# language server, analyzes error patterns against a curated database of common Unity issues, and proposes context-aware solutions for user approval before applying fixes.
Use this skill when:
Example user requests:
Follow this workflow when the skill is invoked:
Use the mcp__ide__getDiagnostics tool to collect errors from VSCode:
// Collect all project diagnostics
mcp__ide__getDiagnostics()
// Or target specific Unity script files
mcp__ide__getDiagnostics({ uri: "file:///path/to/PlayerController.cs" })
Filter the diagnostics to focus on Unity-relevant errors:
severity: "Error" (ignore warnings)source: "csharp" (OmniSharp C# diagnostics)For each detected error:
Extract error information:
uri and rangemessage (e.g., "CS0246")Match against error pattern database:
references/error-patterns.jsonRead affected file context:
For each error, create a structured fix proposal:
**Error**: CS0246 at PlayerController.cs:45
**Message**: The type or namespace name 'Rigidbody' could not be found
**Analysis**:
- Missing using directive for UnityEngine namespace
- Common Unity API usage pattern
**Proposed Solution**:
Add `using UnityEngine;` at the top of PlayerController.cs
**Changes Required**:
- File: Assets/Scripts/PlayerController.cs
- Action: Insert using directive at line 1
Before applying any fixes:
Present all proposed solutions in a clear, structured format
Use AskUserQuestion tool to get user approval:
Wait for explicit confirmation - do not apply fixes automatically
For each approved fix:
Example:
Edit({
file_path: "Assets/Scripts/PlayerController.cs",
old_string: "public class PlayerController : MonoBehaviour",
new_string: "using UnityEngine;\n\npublic class PlayerController : MonoBehaviour"
})
After applying fixes:
Check for .meta file conflicts:
Report VCS status:
After fixes are applied:
mcp__ide__getDiagnostics()The skill relies on references/error-patterns.json for error analysis. This database contains:
To analyze an error, load the database and match the error code:
Read({ file_path: "references/error-patterns.json" })
// Parse JSON and find errorCode entry
The skill includes Node.js scripts in scripts/ for complex error analysis:
Processes VSCode diagnostics JSON output and extracts Unity-relevant errors.
Usage:
node scripts/analyze-diagnostics.js <diagnostics-json-file>
Output:
This script can be run independently or invoked from the SKILL.md workflow when detailed analysis is needed.
When using this skill:
mcp__ide__getDiagnostics() without parameters to get complete error pictureNode.js script for processing VSCode diagnostics and filtering Unity-specific C# errors.
Curated database of common Unity C# compilation errors with solutions and Unity-specific guidance.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.