PR architecture review — DI, events, assemblies, coupling, SOLID. Triggers — 'architecture review', 'review architecture', 'check architecture', 'DI review', 'coupling review'.
Install
npx skillscat add cuozg/oh-my-unity/unity-review-architecture Install via the SkillsCat registry.
unity-review-architecture
Review a GitHub PR for architectural concerns: dependency injection, event systems, assembly boundaries, coupling, and SOLID principle violations — then post comments to the PR.
When to Use
- A PR introduces new systems, services, or manager classes
- Changes touch assembly definitions, dependency injection setup, or event buses
- Suspecting tight coupling, circular dependencies, or God-object growth
Workflow
- Fetch PR — list changed files via
gh api repos/{owner}/{repo}/pulls/{pr}/files - Identify architecture files — filter for
.cs,.asmdef,.asset, dependency containers - Read changed files — load full content; trace public API surface changes
- Check DI — verify dependencies injected via constructor or interface, not
GetComponentchains - Check events — confirm event channels are typed ScriptableObjects or C# events; no static bus overuse
- Check assemblies —
.asmdefboundaries respected; no back-references from Runtime → Editor - Check coupling — measure fan-out; flag classes with 6+ direct dependencies
- Check SOLID — single responsibility, open/closed, interface segregation violations
- Post comments — build payload and submit via
gh api(seeunity-standards/references/review/architecture-checklist.md)
Rules
- Flag
FindObjectOfTypeorGameObject.Findin production code as CRITICAL - Flag concrete class injection (not interface) as WARNING
- Flag assemblies with bidirectional references as CRITICAL
- Flag static singleton access from non-manager classes as WARNING
- Flag classes over 300 lines without clear single responsibility as NOTE
- Flag event systems without unsubscription as WARNING
- Never suggest rewriting entire systems — scope comments to the PR changes
- Use severity prefix:
[CRITICAL],[WARNING],[NOTE]in every comment body - Do not duplicate issues already flagged by unity-review-code-pr
- Post comments only; do not approve or request-changes
Output Format
MANDATORY: Use unity-standards/references/review/pr-submission.md as the output template — JSON payload, event decision, batching rules, and gh CLI commands. All comments MUST be submitted in a single review POST call following that template exactly.
Architecture comments posted to the GitHub PR. Print a local summary with coupling metrics and any CRITICAL violations.
Standards
Load unity-standards for architecture criteria. Key references:
review/pr-submission.md— MANDATORY output template: JSON payload, event decision, batching, gh CLIreview/architecture-checklist.md— coupling, SOLID, assembly boundariescode-standards/dependencies.md— DI, service locator, constructor injectioncode-standards/events.md— C# events, UnityEvent, SO channels, Actioncode-standards/architecture-patterns.md— state machine, MVC/MVP, command pattern
Load via read_skill_file("unity-standards", "references/<path>").