uw-code-review
Skill44 starsChanged 8 months agoMITView on GitHub
Pre-commit code quality review for Unity C# code. Checks against Rules, CODING_STANDARDS.md, NAMING_CONVENTIONS.md, and GDD Gherkin test coverage. Use when code has been written and tests are passing but before committing. Runs automatically at Step 8.5 of /uw-cmd-implement-feature. Triggers on "review this code", "check my implementation", "pre-commit review", "code review", "check before commit", "is this ready to commit", "review my changes", or any request to validate code quality before committing.
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- uw-dependency-injectionSkill
- uw-game-feel-integratorSkill
- uw-network-setupSkill
- uw-scriptable-object-archSkill
- uw-skill-creatorSkill
- uw-state-machineSkill
- uw-ui-toolkit-binderSkill
- uw-unity-debuggingSkill
- uw-unity-editor-toolsSkill
- uw-unity-feature-scaffoldSkill
- uw-unity-project-setupSkill
- uw-unity-test-runnerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read docs/CODING_STANDARDS.md for formatting, class structure, serialization, null safety, and async rules.
- Very specific: line 13
Read docs/NAMING_CONVENTIONS.md for naming rules (private fields, properties, files, asmdefs).
- Very specific: line 14
Read docs/GDD.md for Gherkin scenarios — every scenario should have a corresponding test.
- Distinctive: line 15
Read the files being reviewed in full before assessing.
- Distinctive: line 76
Do not commit until Issues to fix is "None".
- Very specific: line 81
Debug failures: Use uw-unity-debugging for systematic diagnosis of any issues found.
- Very specific: line 82
Missing tests: Use uw-unity-test-runner to generate tests for uncovered Gherkin scenarios.
- Very specific: line 83
Missing game feel: Use uw-game-feel-integrator if Rule of Three is not satisfied and "now" was chosen.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review
Pre-commit quality gate. Read the target files, then run this checklist. Output one structured report per review. Fix all issues before committing.
Before You Start
- Read
docs/CODING_STANDARDS.mdfor formatting, class structure, serialization, null safety, and async rules. - Read
docs/NAMING_CONVENTIONS.mdfor naming rules (private fields, properties, files, asmdefs). - Read
docs/GDD.mdfor Gherkin scenarios — every scenario should have a corresponding test. - Read the files being reviewed in full before assessing.
Checklist
1. Rules Compliance
- All Inspector fields use
[SerializeField] private— nopublicfields on MonoBehaviours - All component references cached in
Awake()orStart()— never inUpdate/FixedUpdate/LateUpdate GameDebugused instead ofDebug.Log/Debug.LogError/Debug.LogWarning- New Input System only — no
Input.GetKey*/Input.GetAxis* TryGetComponent<T>()preferred overGetComponent<T>()where component may be absent- No Unity API calls from background threads
- No
.metafile modifications
2. Naming Conventions
- Private fields:
_camelCase - Public properties & methods:
PascalCase - Parameters & local variables:
camelCase - Booleans:
is/has/can/shouldprefix (e.g._isGrounded,CanJump) - Events:
Onprefix (e.g.OnDeath) - Static fields:
s_camelCase - Class name matches file name
3. Code Quality
- No magic numbers or hardcoded strings — use constants, ScriptableObjects, or serialized fields
- No
FindObjectOfType<T>()orGameObject.Find()(except in editor-only code) - No cross-assembly references that violate the TDD's asmdef dependency graph
- K&R braces (opening brace on same line)
- 4-space indentation (no tabs)
4. Performance
- No
newallocations insideUpdate/FixedUpdate/LateUpdate(no GC pressure in hot paths) - Particles are pooled or have Stop Action set to
Destroywith pool backing - DOTween/PrimeTween tweens are killed in
OnDestroyorOnDisable - No
stringconcatenation in hot paths — useGameDebugwith conditional compilation
5. Test Coverage
- Every GDD Gherkin
Given/When/Thenscenario for this feature has a corresponding NUnit test - EditMode tests for pure logic; PlayMode tests for MonoBehaviour lifecycle
- All tests currently passing
6. Game Feel
- If "later" was chosen in
/uw-cmd-implement-featureStep 3:// TODO(gamefeel): [feature] — pendingcomment exists in the main script - If "later" was chosen: a pending row exists in
docs/GFD.mdFeedback Matrix - If "now" was chosen: Rule of Three satisfied (visual + audio + kinesthetic minimum)
Output Format
## Code Review — {FeatureName}
### Rules [Pass | Issues]
### Naming [Pass | Issues]
### Code Quality [Pass | Issues]
### Performance [Pass | Issues]
### Test Coverage [X/Y scenarios | Missing]
### Game Feel [Integrated | TODO filed | Missing]
Issues to fix before commit:
- [list each issue with file and line, or "None"]Do not commit until Issues to fix is "None".
After Review
- Fix issues: Address all flagged items, then re-run this review.
- Debug failures: Use
uw-unity-debuggingfor systematic diagnosis of any issues found. - Missing tests: Use
uw-unity-test-runnerto generate tests for uncovered Gherkin scenarios. - Missing game feel: Use
uw-game-feel-integratorif Rule of Three is not satisfied and "now" was chosen.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

