{"data":{"slug":"github-donchitos-claude-code-game-studios-claude-skills-code-review-182e48048e1e","title":"Code Review","summary":"Architectural review of written code: coding standards, SOLID, testability, performance.","url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-code-review-182e48048e1e","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-donchitos-claude-code-game-studios-claude-skills-code-review-182e48048e1e","markdown_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-code-review-182e48048e1e.md","download_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-code-review-182e48048e1e\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"The review requires the presence of a project.yaml file with specialists configuration. If absent, the review will fall back to default technical preferences.","instructions":"---\nname: code-review\ndescription: \"Architectural review of written code: coding standards, SOLID, testability, performance.\"\nargument-hint: \"[path-to-file-or-directory]\"\nuser-invocable: true\nallowed-tools: Read, Glob, Grep, Bash(git log *), Agent, AskUserQuestion, Bash(bash \"*\/.claude\/skills\/code-review\/..\/..\/hooks\/yaml-helper.sh\" resolve_config *)\nmodel: sonnet\n---\n\n!`bash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" resolve_config --keys automation`\n\n# Code Review\n\n\n\nEvery question follows `.claude\/docs\/automation-modes.md`\n(collaborative asks always \u00b7 guided major-only \u00b7 autonomous logs and proceeds;\n`automation_always_ask` categories always prompt).\n\n## Insufficient input \u2014 check this before producing any report\n\n**If the inputs this skill needs do not exist, the answer is \"could not run\" \u2014\nnot a filled-in report.** Check first, and stop if the check fails.\n\n1. List the inputs this skill reads (data files, prior reports, profiler output,\n   test results, registries, source code).\n2. For each, record `FOUND` or `ABSENT` \u2014 not \"assumed present\".\n3. If any input required for a section is ABSENT, that section is\n   **`NOT ASSESSED \u2014 NO DATA`**. Do not estimate it, do not infer it from an\n   adjacent artifact, and do not leave a mandated cell to be filled by whoever\n   reads the template next.\n4. If **every** required input is ABSENT, stop and report\n   **`NOT ASSESSED \u2014 NO DATA`** as the whole verdict, naming what was missing and\n   which skill produces it.\n\n**A verdict of `NOT ASSESSED` is a success.** It is the correct, useful answer to\n\"what does the data say?\" when there is no data. The failure mode this prevents is\nspecific: a report whose verdict enum has no \"could not run\" state produces\n**false clean passes** \u2014 an asset audit returning COMPLIANT on a project with no\nassets and no standards, or a performance profile reporting \">99% headroom against\na 16.67ms budget\" with zero profiler data and no budget ever set.\n\n**Absence of evidence is never evidence of absence.** A scan that finds no\nmatches because there are no files to scan has not verified anything. Say which of\nthe two happened \u2014 a reader cannot tell from a green result.\n\n---\n\n## Phase 1: Load Target Files\n\nRead the target file(s) in full. Read CLAUDE.md for project coding standards.\n\n---\n\n## Phase 2: Identify Engine Specialists\n\nRead the `specialists` block from `project.yaml`; if it is absent, fall back to the `## Engine Specialists` section of `.claude\/docs\/technical-preferences.md`. Note:\n\n- The **Primary** specialist \u2014 `<engine>-specialist` derived from `engine.name` (Godot\u2192`godot-specialist`, Unity\u2192`unity-specialist`, Unreal\u2192`unreal-specialist`, Web\u2192`lead-programmer`); used for architecture and broad engine concerns\n- The **Language\/Code Specialist** \u2014 `specialists.code` \u2014 used when reviewing the project's primary language files\n- The **Shader Specialist** \u2014 `specialists.shader` \u2014 used when reviewing shader files\n- The **UI Specialist** \u2014 `specialists.ui` \u2014 used when reviewing UI code\n\n**A value of `null` means UNSET \u2014 treat that key as absent and skip its\nspecialist. Never start it as an agent name.** The v1.0 migration writes `null`\nfor any specialist the legacy file did not name, and it writes the whole block\nwhenever *one* member is set \u2014 so a project that configured only its code\nspecialist carries `shader: null` and `ui: null`. The config reader returns the\nfour-character string `\"null\"` for these, which is not empty and therefore reads\nas configured. `null`, empty, and missing are the same state here.\n\nIf no engine is configured (no `engine.name` in `project.yaml`, and `technical-preferences.md` reads `[TO BE CONFIGURED]` or is missing), skip engine specialist steps. **Record ``Engine validation: NOT ASSESSED \u2014 no engine configured (`engine.name` unset in `project.yaml`)`` in this run's output.** A skipped check that says nothing is indistinguishable from a check that passed; the reader cannot tell engine guidance was never sought.\n\n---\n\n## Phase 3: ADR Compliance Check\n\n**Argument:** `\/code-review [file(s)]` may optionally include a story file path as the last argument (e.g., `\/code-review Assets\/Scripts\/Combat\/Attack.cs production\/epics\/combat\/story-001.md`). If a story path is provided, read it to extract the governing ADR reference.\n\nSearch for ADR references in, in priority order:\n1. The story file (if provided as argument)\n2. Header comments at the top of the implementation files\n3. Commit messages referencing these files (`git log --oneline -- [file]`)\n\nLook for patterns like `ADR-NNNN` or `docs\/architecture\/adr-` (either case).\n\nIf no ADR references found, note: \"No ADR references found \u2014 ADR compliance check skipped. For full ADR compliance review, provide the story path: `\/code-review [files] [story-path]`.\"\n\nFor each referenced ADR, load **only the sections this check needs \u2014 never an unbounded full read.** A substantial ADR exceeds the 25k-token read cap, and a capped read's only recovery is paging the remainder \u2014 the most expensive way to read a file. Use the same pattern as `\/dev-story` and `\/create-stories`:\n\n1. **Map the headings** (cheap \u2014 line numbers only): grep the ADR for `^## ` with line numbers\n2. **Bounded-read only `## Decision` and `## Consequences`**, using the line numbers to set offset-and-limit read spans that end where the next heading begins. If the heading map is empty (a nonstandard ADR predating the template), fall back to one full read; if that truncates at the cap, grep for the decision\/consequence content directly rather than paging the remainder.\n\nA referenced ADR whose file is missing, or that cannot be read, makes ADR\nCompliance `NOT ASSESSED \u2014 [ADR] could not be read`: name it. No reference at\nall is `NO ADRS FOUND`, a different result.\n\nFrom those two sections, classify any deviation:\n\n- **ARCHITECTURAL VIOLATION** (BLOCKING): Uses a pattern explicitly rejected in the ADR\n- **ADR DRIFT** (WARNING): Meaningfully diverges from the chosen approach without using a forbidden pattern\n- **MINOR DEVIATION** (INFO): Small difference from ADR guidance that doesn't affect overall architecture\n\n---\n\n## Phase 4: Standards Compliance\n\nIdentify the system category (engine, gameplay, AI, networking, UI, tools) and evaluate:\n\n- [ ] Public methods and classes have doc comments\n- [ ] Cyclomatic complexity under 10 per method\n- [ ] No method exceeds 40 lines (excluding data declarations)\n- [ ] Dependencies are injected (no static singletons for game state)\n- [ ] Configuration values loaded from data files\n- [ ] Systems expose interfaces (not concrete class dependencies)\n\n---\n\n## Phase 5: Architecture and SOLID\n\n**Architecture:**\n- [ ] Correct dependency direction (engine <- gameplay, not reverse)\n- [ ] No circular dependencies between modules\n- [ ] Proper layer separation (UI does not own game state)\n- [ ] Events\/signals used for cross-system communication\n- [ ] Consistent with established patterns in the codebase\n\n**SOLID:**\n- [ ] Single Responsibility: Each class has one reason to change\n- [ ] Open\/Closed: Extendable without modification\n- [ ] Liskov Substitution: Subtypes substitutable for base types\n- [ ] Interface Segregation: No fat interfaces\n- [ ] Dependency Inversion: Depends on abstractions, not concretions\n\n---\n\n## Phase 6: Game-Specific Concerns\n\n- [ ] Frame-rate independence (delta time usage)\n- [ ] No allocations in hot paths (update loops)\n- [ ] Proper null\/empty state handling\n- [ ] Thread safety where required\n- [ ] Resource cleanup (no leaks)\n\n---\n\n## Phase 7: Engine Review and Testability\n\nThis phase starts **one** helper agent at most: the engine reviewer below.\nTestability is yours; never start `qa-tester` or a second specialist.\n\n### Engine review (one fresh-context helper)\n\nIf an engine is configured, start **one** helper agent of the Primary\nspecialist's type from Phase 2. It reviews in a context that did not write the\ncode; that is why it stays a helper. Its brief names, as fields:\n\n- `files`: every file under review, each with its type (code, shader, UI, engine architecture)\n- `lens`: this skill's `references\/lens-engine.md` as a full path (the base\n  directory this skill was started with, then that path), and the configured\n  specialists whose blocks apply (`specialists.code`, `.shader`, `.ui`; a `null`\n  one is left out and its files go to the Primary block). The helper reads the\n  lens file: do not load it here\n- `engine`: `engine.name` and `engine.version`\n- `return`: `helper-result\/1` \u2014 `status` (done \/ blocked \/ not_assessed),\n  `conclusion`, `evidence` (one entry per finding: file:line, quoted code,\n  why), `actions_taken` (empty: it writes nothing), `confidence`, `caveats`\n\nCheck the result has those fields before reading it; an empty or malformed\nresult means the engine review did not run.\n\n> **Verify every engine finding before reporting it. Do not pass findings\n> through unchecked.** For each finding, record in the report:\n>\n> - **File and line** it refers to.\n> - **Evidence** \u2014 the quoted code, or the concrete input\/state that triggers it.\n> - **Confidence** \u2014 `VERIFIED` (you checked it yourself) or `UNVERIFIED \u2014\n>   reviewer claim` (you could not).\n>\n> A finding you could not verify is reported as unverified or dropped, never\n> promoted to a defect on the strength of confident phrasing.\n>\n> **Why this is mandatory.** Reviewers are reliable when deriving and unreliable when\n> diagnosing existing code: a **wrong** claim about a short function can be fluent\n> enough to pass a skim, and a claimed bug can fall apart once you enumerate the\n> inputs.\n\n### Testability (you do this yourself)\n\nFor Logic and Integration stories, check the implementation against the story's\n`## QA Test Cases` and `## Acceptance Criteria`:\n- [ ] Are all test hooks and interfaces exposed (not hidden behind private\/internal access)? Name the method a test would need and where it is hidden.\n- [ ] Does each QA test case map to a testable code path? Name any that does not.\n- [ ] Are any acceptance criteria untestable as implemented (e.g., hardcoded values, no seam for injection)?\n- [ ] Does the implementation introduce edge cases the QA test cases do not cover?\n- [ ] Are there observable side effects that should have a test but don't?\n\nFor Visual\/Feel and UI stories: check that the manual verification steps in\n`## QA Test Cases` are achievable with the implementation as written \u2014 for each\nstep, is the state the manual checker needs to reach actually reachable, and how?\n\n---\n\n## Phase 8: Output Review\n\n```\n## Code Review: [File\/System Name]\n\n### Engine Specialist Findings: [N\/A \u2014 no engine configured \/ CLEAN \/ ISSUES FOUND]\n[Findings from the engine review, or \"No engine configured.\" if skipped]\n\n### Testability: [N\/A \u2014 no story path given \/ N\/A \u2014 Visual\/Feel or Config story \/ TESTABLE \/ GAPS \/ BLOCKING]\n[Testability findings: test hooks, coverage gaps, untestable paths, new edge cases]\n[If BLOCKING: implementation must expose [X] before tests in ## QA Test Cases can run]\n\n### ADR Compliance: [NOT ASSESSED \/ NO ADRS FOUND \/ COMPLIANT \/ DRIFT \/ VIOLATION]\n[List each ADR checked, result, and any deviations with severity]\n\n### Standards Compliance: [X\/6 passing]\n[List failures with line references; a missing doc comment names the method or class]\n\n### Architecture: [NOT ASSESSED \/ CLEAN \/ MINOR ISSUES \/ VIOLATIONS FOUND]\n[List specific architectural concerns]\n\n### SOLID: [NOT ASSESSED \/ COMPLIANT \/ ISSUES FOUND]\n[List specific violations]\n\n### Game-Specific Concerns\n[List game development specific issues]\n\n### Positive Observations\n[What is done well -- always include this section]\n\n### Required Changes\n[Must-fix items before approval \u2014 ARCHITECTURAL VIOLATIONs always appear here]\n\n### Suggestions\n[Nice-to-have improvements]\n\n### Verdict: [NOT ASSESSED \/ APPROVED \/ APPROVED WITH SUGGESTIONS \/ CHANGES REQUIRED]\n```\n\nChoose the verdict, first match wins:\n- **CHANGES REQUIRED** \u2014 anything under Required Changes\n- **NOT ASSESSED** \u2014 nothing to review (the no-data path above), the engine\n  specialist review did not run \u2014 no engine configured, or an engine helper\n  result that was empty or malformed \u2014 or any report section reads `NOT ASSESSED` (ADR\n  Compliance with a referenced ADR that could not be read, Architecture, SOLID);\n  name which. NOT ASSESSED ranks below CHANGES REQUIRED, because a known\n  defect is more actionable than a skipped check, and above both approvals: a\n  review that skipped the engine check has not approved the code. (`NO ADRS\n  FOUND` is not NOT ASSESSED: with no ADR to check, it does not stop an\n  approval.)\n- **APPROVED WITH SUGGESTIONS** \u2014 only Suggestions\n- **APPROVED** \u2014 no required changes and no suggestions\n\nThis skill is read-only \u2014 no files are written.\n\n---\n\n## Phase 9: Next Steps\n\nAsk:\n- Prompt: \"Code review complete \u2014 verdict: [NOT ASSESSED \/ APPROVED \/ APPROVED WITH SUGGESTIONS \/ CHANGES REQUIRED]. How would you like to proceed?\" (the Phase 8 verdict, word for word)\n- Options (adjust based on verdict):\n  - If APPROVED:\n    - `[A] Run \/story-done to mark the story complete`\n    - `[B] Stop here`\n  - If APPROVED WITH SUGGESTIONS:\n    - `[A] Apply the suggestions, then run \/story-done`\n    - `[B] Run \/story-done now \u2014 suggestions noted for later`\n    - `[C] Stop here`\n  - If CHANGES REQUIRED:\n    - `[A] Fix the issues and re-run \/code-review`\n    - `[B] Run \/story-done anyway with noted exceptions`\n    - `[C] Stop here`\n  - If NOT ASSESSED:\n    - `[A] Fix what stopped the review (point me at the code, run \/setup-engine, or fix the unreadable ADR reference), then re-run \/code-review`\n    - `[B] Stop here`\n\nIf an ARCHITECTURAL VIOLATION is found:\n- If the violation contradicts an **existing ADR**: fix the implementation to comply with `docs\/architecture\/[adr-file].md`. If the design has legitimately changed, run `\/architecture-decision` to formally *revise* the existing ADR \u2014 do not create a competing one.\n- If **no ADR exists** for the pattern that was violated: run `\/architecture-decision` to document the correct approach before fixing the code.\n","use_cases":["Reviewing a C# script for coding standards and SOLID principles","Checking for dependency injection and system interfaces in a Unity project","Evaluating method length and cyclomatic complexity in a game script"],"limitations":["Does not support multiple file types in a single review","Does not analyze shader or UI code separately","Requires a valid project configuration file"],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Donchitos\/Claude-Code-Game-Studios\/blob\/abc0de79d6ceb0b5d7aa693945849b3937afbe6a\/.claude\/skills\/code-review\/SKILL.md","source_commit":"abc0de79d6ceb0b5d7aa693945849b3937afbe6a","license":null,"version":null,"listing_approved_at":"2026-11-15","created_at":"2026-11-14T15:44:53.000000Z","updated_at":"2026-11-15T17:10:31.000000Z","seo_title":"Code Review Tool","seo_description":"Review code for coding standards, SOLID principles, testability, and performance. Check for doc comments, cyclomatic complexity, method length, dependency injection, and","seo_keywords":["code review tool","SOLID principles check","dependency injection review","method length analysis","cyclomatic complexity check"]}}