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.
View on GitHubDev-GOM/claude-code-marketplace
unity-dev-toolkit
January 16, 2026
Select agents to install to:
npx add-skill https://github.com/Dev-GOM/claude-code-marketplace/blob/main/plugins/unity-dev-toolkit/skills/unity-compile-fixer/SKILL.md -a claude-code --skill unity-compile-fixerInstallation paths:
.claude/skills/unity-compile-fixer/# Unity Compile Fixer
## Overview
This 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.
## When to Use This Skill
Use this skill when:
- Unity projects report C# compilation errors in VSCode
- Need to diagnose the root cause of Unity compiler errors (CS* error codes)
- Want automated fix suggestions for common Unity scripting issues
- Working with Unity projects that have version control integration (Git, Unity Collaborate, Plastic SCM)
- Need to handle Unity .meta file conflicts
**Example user requests:**
- "Check Unity compilation errors and help me fix them"
- "My Unity project has compiler errors, can you diagnose and fix?"
- "Unity scripts are not compiling, what's wrong?"
- "Fix the C# errors in my Unity project"
## Workflow
Follow this workflow when the skill is invoked:
### 1. Detect Compilation Errors
Use the `mcp__ide__getDiagnostics` tool to collect errors from VSCode:
```typescript
// 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**: Only process errors with `severity: "Error"` (ignore warnings)
- **Source**: Only process `source: "csharp"` (OmniSharp C# diagnostics)
- **Error Codes**: Focus on CS* compiler error codes (e.g., CS0246, CS0029, CS1061)
### 2. Analyze Error Patterns
For each detected error:
1. **Extract error information:**
- File path and line number from `uri` and `range`
- Error code from `message` (e.g., "CS0246")
- Full error message text
2. **Match against error pattern database:**
- Load `references/error-patterns.json`