code-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol.
Skill by googleOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/google-code-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-review
What's inside
- Skill name
code-review- Description
- Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
- License
- Apache-2.0
- Instructions
- 119 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "code-review" does not match folder "code_review"
Files (1)
- SKILL.md
SKILL.md (first lines)
# Systems & Concurrency Code Review Protocol
This skill defines the mandatory protocol for conducting rigorous, adversarial code reviews on Filament source code. Standard single-pass reviews focusing on style or superficial idioms are strictly prohibited. Reviews must prioritize **correctness, concurrency invariants, memory models, lifecycle safety, API contracts, arithmetic boundaries, and test integrity**.
---
## 1. Core Review Philosophy
1. **Adversarial Stance**: Assume the code contains subtle race conditions, memory ordering errors, and unhandled edge cases until proven otherwise.
2. **Zero Superficial Feedback**: Do not waste review bandwidth on formatting, whitespace, or obvious variable naming unless it actively impairs correctness or violates [CODE_STYLE.md](../../CODE_STYLE.md).
3. **Cross-Function & State-Machine Tracing**: Never review functions in isolation. Concurrency bugs (e.g., lost wakeups, ABA races) live at the intersection of multiple functions (e.g., `put()`, `wakeOne()`, `waitForWork()`, `loop()`). Trace full execution state machines across caller/callee boundaries.
4. **False-Positive Elimination**: Before reporting a finding, attempt to disprove it by searching for compensating synchronization, refcount credits, or structural invariants elsewhere in the file or call chain.
---
## 2. Mandatory Analytical Lenses (The 6 Pillars)
Every review must systematically evaluate the change through these six analytical lenses:
### Pillar 1: Concurrency, Synchronization & Memory Models
* **Atomic Memory Ordering & Barrier Direction**:
* Inspect every `std::atomic` operation and its `std::memory_order` (`relaxed`, `acquire`, `release`, `acq_rel`, `seq_cst`).
* Verify barrier directions: `memory_order_release` prevents *prior* memory writes from sinking below the release store, but does **not** prevent *subsequent* non-atomic writes from floating above it. `memory_order_acquire` prevents *subsequent* reads from floating above the acquire load, but does **not** protect prior reads.
* **Lost Wakeups & Condition Variable Invariants**:
* Check if condition variable signals (`notify_one()` / `wakeOne()`) or waiting loops (`wait()`) are gated by unlocked relaxed loads (e.g., relaxed check of waiter counts).
* Verify that the happens-before relationship between producer publication and consumer sleep is never bypassed.
* **ABA, Slot-Reuse & Torn Reads**:
* In wait-free, lock-free, or seqlock data structures, trace multi-step read-then-validate patterns.
* Ensure that slot identity (e.g., thread ID, generation counter) is re-validated *after* copying payload data, not just the slot state, to prevent returning payload data read during an erase/re-emplace.
* **Data Races in Lock-Free / Wait-Free APIs**:
* Verify that plain (non-atomic) fields are never read concurrently with plain writes in other threads without a formal synchronization barrier.
* **Deadlock & Lock Invariants**:
* Verify lock acquisition order. Ensure code uses `utils::Mutex` / `utils::Condition` with `LockGuard const` as mandated by [skills/cpp_static_thread_safety](../cpp_static_thread_safety/SKILL.md).
### Pillar 2: Arithmetic, Narrowing & Numerical Boundaries
* **Integer Truncation & Narrowing Conversions**:
* Check all numeric assignments and casts between types of differing bit widths (e.g., `uint32_t` $\to$ `uint16_t`, `size_t` $\to$ `uint32_t`).
* Determine what happens when values equal or exceed the narrower type's capacity (e.g., exact multiples of 65,536 truncating to 0 and inducing infinite loops).
* **Boundary Conditions**:
* Evaluate behavior at `count == 0`, `count == 1`, $2^{16}$, $2^{32}$, `INT_MAX`, and overflow/underflow points.
* **Resource & Pool Budgets**:
* Ensure budget calculations cannot silently drop minimum guarantees (e.g., combined thread limits reducing worker pool size to 0 without assertion or fallback).
### Pillar 3: API Contracts & Behavioral Deltas
* **Semantic Regressions**:
* Compare old vs. new contracts. Did zero-sized inputs (`count == 0`), empty containers, or null arguments change behavior (e.g., skipping a functor that previously ran once)?
* **Trait Specializations & SFINAE / Concepts**:
* Verify that template traits (e.g., `SplitterTraits`) do not silently ignore legacy interfaces or custom types without a compilation error or fallback.
* **Doc-Comment vs. Reality**:
* Verify that documented thread-safety guarantees (e.g., "wait-free", "thread-safe for concurrent readers") are actually fulfilled by the implementation.
### Pillar 4: Object Lifetime, Teardown & RAII
* **Thread Lifecycle & Cleanup**:
* Verify that adopted threads or registered slots properly decrement active counters upon exit/emancipation (`emancipate()`), preventing capacity degradation.
* **Asynchronous Lambda Captures**:
* Ensure captured references (`[&]`) or raw pointers (`this`) outlive background job execution.
* **Refcount Draining & Destruction Races**:
* Verify that root jobs / parent structures hold an explicit refcount credit during worker dispatch so refcounts cannot hit zero mid-execution on worker failure.
### Pillar 5: Test Integrity & False-Pass Audits
* **Tautological Assertions**:
* Inspect test assertions to ensure they are not tautologies (e.g., assertions that can never evaluate to false).
* **Concurrency Stress & Race Coverage**:
* Verify that multi-threaded tests genuinely create contention on the guarded path rather than executing deterministically or passing due to timing coincidence.
* **Build Wiring**:
* Verify new test files are wired into the corresponding `CMakeLists.txt`.
### Pillar 6: Architectural Completeness & Scaling
* **Feature Completeness**:
* When introducing a new capability (e.g., adopted worker threads), verify that all sizing, partitioning, and helper calculations (e.g., `parallel_for` helper job counts) scale with the new capability rather than only querying legacy state.
---
## 3. Standard Review Output Format
Reviews must be structured using the following format:
```markdown
<File Path>
- <line> [<category>] <Concise finding description detailing the exact failure mechanism.>
...
Review Summary:
- **The Blocker**: Identify the single most critical blocking issue, explaining the thread interleaving or failure sequence.
- **Intent vs. Code**: Assess whether the PR achieves its architectural goals and note any systematic omissions.
- **Explicitly Checked & Ruled Out**: List non-obvious complex areas investigated and verified as safe/correct (proves thorough inspection and eliminates false positives).
- **Minor Cleanups**: Note dead code, minor un-decremented tracking counters, or triplicated logic below the blocking finding bar.
```
### Category Tags:
* `[correctness]` — Logic errors, data races, memory ordering bugs, lost wakeups, narrowing bugs, crashes.
* `[efficiency]` — Scaling bottlenecks, false sharing, unnecessary allocations, missed parallelism.
* `[api-contract]` — Broken traits, dropped interface support, violated preconditions/postconditions.
* `[behavior-change]` — Silent changes to edge-case behavior (e.g., `count == 0`).
* `[test-coverage]` — Tautological tests, missing failure checks, unwired tests.
---
## 4. Review Execution Workflow for AI Agents
When instructed to review code, a branch, a commit range, or a PR:
1. **Discover Changes**:
```bash
git diff <base_branch>...<target_branch>
# or
git log -n <count> --stat
```
2. **Read Related Context**:
Read the modified files alongside their callers and dependencies using `view_file` to understand the complete cross-function state machine.
3. **Execute the 6 Analytical Pillars**:
Systematically audit the diff against each pillar.
4. **Draft & Filter Findings**:
Verify every potential finding against the codebase to eliminate false positives.
5. **Format Report**:
Output the structured findings following the format in Section 3.From google/filament, Apache-2.0.
More from google/filament
- 0.690score
cpp-header-inclusion
googleOfficial
Enforce the strict topological header inclusion layering and reordering rules in Filament.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.690score
filament-desktop-testing
googleOfficial
Execute unit tests and performance benchmarks for Filament on desktop platforms.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.690score
filament-android-development
googleOfficial
Build, deploy, run, and benchmark Filament binaries on connected Android devices or emulators.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.690score
cpp-static-thread-safety
googleOfficial
Enforce C++ static thread safety annotations and correct synchronization primitives.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.687score
bindings-synchronization
googleOfficial
Guidelines and SOP for synchronizing public C++ API changes (methods, enums, options structs) to Java (Android JNI) and JavaScript/TypeScript (Web/WASM Embind).
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.687score
filament-build-clean
googleOfficial
Clean and build Filament targets for development, debugging, and production.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.685score
verification-protocols
googleOfficial
Standard verification pipeline to execute after modifying C++ source or header files.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.685score
preprocessor-guard-hygiene
googleOfficial
Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++.
SkillAFreshness: A★ 20.6KClaude Code +9 - 0.685score
header-self-containment
googleOfficial
Enforce strict header self-containment so that every header file compiles independently.
SkillAFreshness: A★ 20.6KClaude Code +9
Signals
- Stars
- 20,648
- Forks
- 2,283
- Open issues
- 174
- Last commit (this folder)
- Aug 19, 2026 (2 months ago)
- Last release
- Oct 21, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/google/filament
- Website
- google.github.io/filament/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from google
- 0.699score
retrieving-developer-knowledge
googleOfficial
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
data-manager-api-setup
googleOfficial
Guides developers through client library installation and authentication setup steps for the Data Manager API.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-migrate-from-ai-studio
googleOfficial
Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI).
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
gcloud
googleOfficial
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
google-cloud-recipe-onboarding
googleOfficial
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-deploy
googleOfficial
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up…
SkillAFreshness: A★ 21.5KClaude Code +9
Cite this page
code-review skill. Agent Mart. https://agentmart.dev/skills/google-code-review (last updated 2026-10-24)