agentleFS
GoogleKnown publishergoogle/filament/skills/code_review/SKILL.md

code-review

Skill21k starsChanged 3 years agoApache-2.0View on GitHub

Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

188 other projects use a version of this.

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 3 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 4 mentionsSep 2026: 6 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the google/filament repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about google/filament

The biggest 5 of 43 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 43

Talked about on GitHub, Bluesky and Hacker News (43 times).

On GitHub · 38

33 more on GitHub

Used with

Projects with it also use starter, media-processing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 11 are distinctive, and 12 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Zero Superficial Feedback: Do not waste review bandwidth on formatting, whitespace, or obvious variable naming unless it actively impairs …

    line 17
  2. Very specific:

    Cross-Function & State-Machine Tracing: Never review functions in isolation.

    line 18
  3. Distinctive:

    False-Positive Elimination: Before reporting a finding, attempt to disprove it by searching for compensating synchronization, refcount …

    line 19
  4. Distinctive:

    Every review must systematically evaluate the change through these six analytical lenses:

    line 25
  5. Very specific:

    Verify barrier directions: memory_order_release prevents *prior* memory writes from sinking below the release store, but does not prevent …

    line 30
  6. Very specific:

    Check if condition variable signals (notify_one() / wakeOne()) or waiting loops (wait()) are gated by unlocked relaxed loads (e.g., relaxed …

    line 32
  7. Distinctive:

    Verify that the happens-before relationship between producer publication and consumer sleep is never bypassed.

    line 33
  8. Distinctive:

    Ensure that slot identity (e.g., thread ID, generation counter) is re-validated *after* copying payload data, not just the slot state, to …

    line 36
  9. Distinctive:

    Verify that plain (non-atomic) fields are never read concurrently with plain writes in other threads without a formal synchronization …

    line 38
  10. Very specific:

    Verify lock acquisition order.

    line 40
  11. Very specific:

    Check all numeric assignments and casts between types of differing bit widths (e.g., uint32_t $\to$ uint16_t, size_t $\to$ uint32_t).

    line 44
  12. Distinctive:

    Ensure budget calculations cannot silently drop minimum guarantees (e.g., combined thread limits reducing worker pool size to 0 without …

    line 49
  13. Very specific:

    Verify that template traits (e.g., SplitterTraits) do not silently ignore legacy interfaces or custom types without a compilation error or …

    line 55
  14. Distinctive:

    Verify that documented thread-safety guarantees (e.g., "wait-free", "thread-safe for concurrent readers") are actually fulfilled by the …

    line 57
  15. Very specific:

    Verify that adopted threads or registered slots properly decrement active counters upon exit/emancipation (emancipate()), preventing …

    line 61
  16. Very specific:

    Ensure captured references ([&]) or raw pointers (this) outlive background job execution.

    line 63
  17. Distinctive:

    Verify that root jobs / parent structures hold an explicit refcount credit during worker dispatch so refcounts cannot hit zero …

    line 65
  18. Distinctive:

    Verify that multi-threaded tests genuinely create contention on the guarded path rather than executing deterministically or passing due to …

    line 71
  19. Very specific:

    Verify new test files are wired into the corresponding CMakeLists.txt.

    line 73
  20. Very specific:

    When introducing a new capability (e.g., adopted worker threads), verify that all sizing, partitioning, and helper calculations (e.g., …

    line 77
  21. Distinctive:

    When instructed to review code, a branch, a commit range, or a PR:

    line 109
  22. Very specific:

    Read the modified files alongside their callers and dependencies using view_file to understand the complete cross-function state machine.

    line 118
  23. Distinctive:

    Verify every potential finding against the codebase to eliminate false positives.

    line 122

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  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.

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:

<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:
    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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.