skills/unity-review/SKILL.md
Use this skill to review Unity code changes, GitHub pull requests, or audit entire Unity projects for quality. Covers three modes: local review (inline // REVIEW comments on changed C# files), PR review (parallel specialist reviews of .cs, .prefab, .shader files with APPROVE/REQUEST_CHANGES via GitHub API), and project audit (A-F grades on architecture, performance, best practices, tech debt as HTML report). MUST use whenever the user mentions reviewing code, checking changes, evaluating a pull request, auditing project quality, or assessing merge readiness. Also use when they say "look over my changes," "check this PR," "code review," "is this ready to merge," "rate this codebase," "tech debt," "quality report," "check the prefabs," "review the assets," or wants any feedback on Unity code, assets, or architecture before merging or committing.
npx skillsauth add cuozg/oh-my-skills unity-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect review target, classify changed file types and size, delegate specialist reviews to parallel subagents, aggregate findings, deliver results — inline comments for local, GitHub comments + APPROVE/REQUEST_CHANGES for PRs, HTML reports for audits.
| Signal | Mode | First Action |
|--------|------|-------------|
| PR URL/number, "PR", "pull request", "merge", "is this ready" | PR Review | read_skill_file("unity-review", "references/pr-review-workflow.md") |
| "review my code", "check changes", specific file path, no PR context | Local Review | read_skill_file("unity-review", "references/local-review-workflow.md") |
| "audit project", "quality report", "tech debt", "rate codebase", "grade" | Project Audit | read_skill_file("unity-review", "references/quality-audit-workflow.md") |
If ambiguous, ask: "Should I review your local changes, a GitHub PR, or audit the whole project?"
For all modes, load unity-standards checklists via read_skill_file("unity-standards", "references/<path>"):
| Mode | Required References |
|------|-------------------|
| PR Review | review/checklist.md, review/pr-submission.md, review/parallel-review-criteria.md (for Large PRs) |
| Local Review | review/checklist.md, review/comment-format.md, review/parallel-review-criteria.md |
| Project Audit | quality/grading-criteria.md, quality/architecture-audit.md, quality/performance-audit.md, quality/best-practices-audit.md, quality/tech-debt-audit.md, quality/html-report-format.md |
Follow references/pr-review-workflow.md — a self-contained 11-step workflow:
references/pr-specialist-reviews.md) → 6. Aggregate findings → 7. Check for prior reviews → 8. Make final decision (APPROVE/REQUEST_CHANGES/COMMENT) → 9. Build review body → 10. Submit via gh api → 11. Verify submissionKey rules:
Follow references/local-review-workflow.md:
.cs files → 3. Read full files → 4. Spawn 6 parallel subagents (one per review criterion) → 5. Collect results → 6. Aggregate and validate with LSP → 7. Insert // ── REVIEW comments → 8. Apply safe single-line fixes → 9. Queue remaining issues via task_createKey rules:
lsp_find_references before flagging dead codeFollow references/quality-audit-workflow.md:
Key rules:
**{🔴|🟠|🟡|🔵|⚪} Title** — `SEVERITY`
{what is wrong, why it matters}
```suggestion
{corrected code}
```
Suggestion blocks required for MEDIUM+ severity.
// ── REVIEW {icon} {LABEL} #{category}
// What: 1-line summary
// Why: 1-3 lines — impact + evidence
🔴 CRITICAL → 🟠 HIGH → 🟡 MEDIUM → 🔵 LOW → ⚪ STYLE
These issues must NEVER be graded below the stated level:
| Issue | Floor |
|-------|:-----:|
| Missing event unsubscription (OnEnable += / no OnDisable -=) | HIGH |
| Coroutine not stopped on lifecycle exit | HIGH |
| async void outside Unity event handlers | MEDIUM |
| GetComponent / Find* per frame (Update/FixedUpdate) | MEDIUM |
| Missing null check on deserialized gameplay data | MEDIUM |
| Hardcoded API keys, passwords, tokens | CRITICAL |
| m_Script: {fileID: 0} (missing MonoBehaviour in prefab) | CRITICAL |
| LINQ / string concat / lambda allocations in Update | MEDIUM |
| FindObjectOfType in production code for runtime wiring | HIGH |
| Missing [FormerlySerializedAs] on renamed serialized field | HIGH |
| DestroyImmediate in runtime code | HIGH |
| Problem | Action |
|---------|--------|
| gh not installed or not authenticated | Tell user: brew install gh && gh auth login |
| PR number not found (404) | Verify owner/repo. Check if PR is in a fork. |
| No local changes found | Check git status. Inform user if working tree is clean. |
| Project too large (1000+ files) for audit | Use sampling strategy (see quality audit workflow). |
| Subagent returns empty findings | That's fine — no issues in that criterion. Include in summary. |
| Review submission fails (422) | Re-fetch HEAD SHA. Check comment size (<32KB). Retry. |
tools
Generate Unity raster image assets through Unity MCP: game sprites, item art, backgrounds, UI icons, portraits, concept images, transparent cutouts, image edits, upscales, background removal, and Unity scene or Game View screenshots. Use when a Unity project needs image files imported under Assets or screenshots captured from the editor. Do not use for meshes, audio, animation, materials, gameplay code, UI Toolkit layout, or generic non-Unity image generation.
tools
Create Unity technical solution documents from user requirements, feature ideas, bug goals, specs, or codebase problems. Use when the user asks for a technical approach, architecture, implementation strategy, solution options, feasibility analysis, system design, or "how should we build/fix this" for Unity runtime, Editor, tools, assets, data, UI, WebGL, SDKs, or production pipelines.
tools
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
development
Convert a spec document into an implementation TODO list in the same spec folder. U se when the user says goal-todo, todo from spec, generate tasks from spec, turn this spec into todos, create implementation checklist, extract tasks, or asks to read a Docs/Specs design doc and produce what must be implemented. Includes UI/UX review and codebase investigation before writing the checklist. Do not use for implementing the tasks, creating new goal files, writing test cases, or verifying completed work.