Local C# logic review — adds inline REVIEW comments to changed files. Triggers — 'review my code', 'code review', 'review local', 'check my changes', 'review this file'.
Install
npx skillscat add cuozg/oh-my-unity/unity-review-code-local Install via the SkillsCat registry.
unity-review-code-local
Add inline // ── REVIEW comments to locally changed C# files using parallel subagents (one per review criterion). Apply safe fixes inline. Covers logic, lifecycle, serialization, performance, architecture, concurrency.
When to Use
- Reviewing uncommitted or staged changes before a commit
- Checking a single file or feature for correctness issues
- Wanting reviewer feedback without opening a GitHub PR
Workflow
- Fetch changes — run
git diff HEAD(orgit diff --cached) to get changed files and hunks - Read changed files — load full file content for each
.csfile in the diff - Spawn 6 parallel subagents — one
task(category="quick", load_skills=["unity-standards"], run_in_background=true)per review criterion (seeunity-standards/references/review/parallel-review-criteria.md) - Each subagent — loads its assigned checklist from
unity-standards, reviews ONLY its criterion, returns findings as[{path, line, severity, title, body}] - Collect results —
background_outputon all 6 tasks - Aggregate — deduplicate by (path, line), keep highest severity, sort by file → line
- Investigate context — use
lsp_goto_definition/lsp_find_referencesto validate findings that need caller/lifecycle context - Annotate — insert
// ── REVIEWcomments withWhat:/Why:lines above the issue line - Apply fixes — rewrite the problem line when fix is safe (single-line, no cross-file deps); leave unchanged otherwise
- Queue fixes — create
task_createentries for issues that could not be applied inline
Review Criteria (6 parallel subagents)
| # | Criterion | Checklist |
|---|---|---|
| 1 | Logic | review/logic-checklist.md |
| 2 | Lifecycle | review/unity-lifecycle-risks.md |
| 3 | Serialization | review/serialization-risks.md |
| 4 | Performance | review/performance-checklist.md |
| 5 | Architecture | review/architecture-checklist.md |
| 6 | Concurrency | review/concurrency-checklist.md |
See unity-standards/references/review/parallel-review-criteria.md for subagent prompt template and aggregation rules.
Rules
- Insert comments at the exact line of concern, not at the top of the file
- Use format from
unity-standards/references/review/comment-format.mdfor every comment - Use icon + label + tag:
🔴 CRITICAL,🟠 HIGH,🟡 MEDIUM,🔵 LOW,⚪ STYLE - Apply safe single-line fixes directly (null checks, caching, unsubscribes); leave complex/design fixes as comments only
- Never commit changes — leave diff for user inspection
- Always read the full file, not just the diff hunk
- Use
lsp_find_referencesbefore flagging a method as unused or dead code - Flag
Update()allocations (LINQ, string concat, closures) as MEDIUM or higher - Flag missing
OnDestroyunsubscription whenOnEnablesubscribes to events - Create
task_createonly for issues NOT fixed inline
Output Format
Inline // ── REVIEW comments with icons inserted into source files. Safe fixes applied directly to code.
A summary list of remaining unfixed issues (with created fix tasks) is printed after annotation.
Standards
Load unity-standards for review criteria. Key references:
review/logic-checklist.md— correctness, edge cases, state, data flowreview/unity-lifecycle-risks.md— order-of-execution, null timing, scene loadreview/serialization-risks.md— missing fields, type changes, prefab overridesreview/performance-checklist.md— allocations, Update, physics, renderingreview/architecture-checklist.md— coupling, SOLID, assembly boundaries, event couplingreview/concurrency-checklist.md— threading, race conditions, async/await, main thread rulereview/comment-format.md— inline review comment syntax and severityreview/parallel-review-criteria.md— subagent delegation, criteria table, prompt template
Load via read_skill_file("unity-standards", "references/review/<file>").