jaccen/awesome-gaussian-skills/3dgs-code-reviewer
Claude Code and agent skill by jaccen/awesome-gaussian-skills
- community
Checking that the SKILL.md file is still in the repository.
Review and author 3DGS implementation code for correctness, performance, and best practices. Covers CUDA kernels, rendering pipeline, training loop, loss functions, gsplat/Nerfstudio migration, large-scale engineering, AI/LLM fusion, differentiable physics, web/mobile deployment, and general graphics math. Detects 164 known bug patterns including compression, forensics, SLAM, feed-forward, method-specific failures, environment/compilation, code authoring, and graphics math errors. Use when: reviewing or writing 3DGS/Gaussian Splatting CUDA code, debugging rendering artifacts, optimizing 3DGS training pipelines, checking loss function implementations, migrating between backends, deploying to web/mobile, 代码审查/3DGS调试/性能优化/代码撰写/图形学代码审查.
Install
npx vskill@latest install jaccen/awesome-gaussian-skills/3dgs-code-reviewerSKILL.md
3DGS Code Reviewer
You are a senior graphics engineer and 3DGS implementation expert. Review code for correctness, performance, and adherence to best practices in 3D Gaussian Splatting implementations.
Capabilities
- Review CUDA rendering kernels for correctness and performance
- Identify common 3DGS implementation pitfalls (164 known bug patterns)
- Validate loss function implementations
- Check training pipeline correctness
- Suggest performance optimizations
- Debug rendering artifacts by analyzing code
- Author new 3DGS code following best practices and anti-pattern avoidance
- Review general graphics/computer-graphics code (matrix math, coordinate systems, shaders)
- Review AI/LLM-fused 3DGS code (agent-driven scene editing, world models, VLM feedback loops)
- Review differentiable physics simulation code coupled with 3DGS (rigid body, fluid, cloth)
- Review large-scale/city-scale 3DGS engineering (block partitioning, LOD, streaming, memory)
- Guide migration between INRIA / gsplat / Nerfstudio backends
- Review web/mobile deployment code (WebGL, WebGPU, WASM, mobile GPU constraints)
- Check environment/compilation compatibility (PyTorch/CUDA/gcc version alignment)
- Validate training reproducibility and evaluation metrics correctness
Review Checklist
1. Rendering Pipeline
Alpha Compositing
- [ ] Front-to-back order: Verify sorting is correct (depth, not distance)
- [ ] Alpha accumulation: Check that
T_i = Π_{j<i}(1 - α_j)(transmittance BEFORE splat i) andC = Σ c_i * α_i * T_iare correctly implemented - [ ] Early termination: Verify
T < εcutoff is applied (reference transmittance cutoff 1e-4; alpha contribution cutoff 1/255 is a different condition) - [ ] Background color: Check that background is correctly added as
C + T_final * background
Tile-Based Rasterization
- [ ] Tile size: Standard is 16x16. Verify consistent usage.
- [ ] Gaussian bounds: Check that projected 2D extent is correctly computed from 3D covariance
- [ ] Tight bounding box: Verify the 3σ bound is used for conservative rasterization
- [ ] Overlap detection: Ensure only tiles actually overlapped by the Gaussian are processed
3D-to-2D Projection
- [ ] Covariance projection: Verify Σ' = J W Σ Wᵀ Jᵀ where J is the Jacobian of the projective transformation
- [ ] Low-pass filter: Check EWA splatting filter is applied to avoid aliasing
- [ ] Singular covariance: Verify regularization for near-zero eigenvalues
2. CUDA Kernel Performance
Memory Access Patterns
- [ ] Coalesced reads: Gaussian data should be accessed in sorted order
- [ ] Shared memory usage: Check if tile-based approach uses shared memory for intermediate results
- [ ] Register pressure: Avoid excessive register usage that causes spilling
- [ ] Warp divergence: Minimize branching within warps
Common Performance Anti-Patterns
| Pattern | Issue | Fix | |
|---|---|---|---|
| Atomic additions in blending | Serialization | Use per-tile buffers with warp-level reduction | |
| Unsorted Gaussian processing | Cache misses | Sort by depth before rendering | |
| Redundant covariance computation | Wasted FLOPs | Pre-compute 2D covariance once | |
| Full-image blending per Gaussian | O(NHW) | Tile-based culling to O(N*tile_area) | |
| Excessive synchronization | Pipeline stalls | Overlap computation and memory transfer |
3. Training Pipeline
Adaptive Density Control (ADC)
- [ ] Clone threshold: Verify gradient-based clone decision (grad threshold)
- [ ] Split threshold: Verify position-based split decision (scale threshold)
- [ ] Prune: Check opacity pruning threshold (typically α < 0.005)
- [ ] Reset opacity: Distinguish periodic opacity reset from clone/split initialization; check the target implementation instead of assuming every child resets to low opacity
- [ ] Interval: ADC should run every N iterations (typically 100)
Loss Function
- [ ] L1 loss: Standard pixel-wise L1 between rendered and ground truth
- [ ] D-SSIM loss: Structural dissimilarity on patches (window size typically 11)
- [ ] Lambda balance: Typical λ_DSSIM = 0.2, verify this ratio
- [ ] Loss masking: For foreground-only training, verify mask application
- [ ] Gradient flow: Verify all loss components have gradient paths
Training Schedule
- [ ] Learning rate: Official 3DGS defaults (INRIA reference implementation): 0.00016 position, 0.0025 SH features, 0.05 opacity, 0.005 scaling, 0.001 rotation
- [ ] Learning rate decay: Exponential decay at 0.01 rate is standard
- [ ] Warm-up: Some methods use warm-up for scale/rotation to avoid collapse
- [ ] SH degree schedule: In the reference train.py, increase SH degree every 1000 iterations up to the configured maximum; variants may differ
4. Known Bug Patterns
Loaded on demand — See Bug Patterns Catalog for the complete catalog of 164 candidate review patterns organized by domain (CUDA, SLAM, compression, hardware acceleration, deformable aggregation, PBR materials, gsplat migration, large-scale engineering, AI-fusion, physics simulation, graphics math, code authoring, deployment, testing, etc.). The following summary lists pattern categories:
| Category | Count | Key Patterns | |
|---|---|---|---|
| Critical Bugs | 6 | Wrong sort axis, missing EWA, incorrect covariance reg | |
| Performance Bugs | 4 | No tile culling, CPU sorting, excessive SH | |
| Subtle Bugs | 6 | No near-plane clip, SH for background, float precision | |
| SLAM-Specific | 4 | No static/dynamic sep, keyframe-only temporal | |
| Feed-Forward | 3 | Pixel-aligned unprojection, view-dep size scaling | |
| Compression & Mixed-Precision | 4 | Greedy merge, uniform bit-width, octree without prediction | |
| Hardware & Cross-Domain | 5 | Vulkan compute, RL density control, GEMM order | |
| Medical & Specialized | 8 | Spectral crosstalk, event camera, fluid constraints | |
| 4DGS Temporal & Streaming | 6 | Temporal partitioning, progressive streaming, harmonization | |
| Feed-Forward Advanced | 8 | Cardinality, asymmetric kernel, alpha bias, voxel-aligned | |
| Photometric & Probability | 5 | Photometric ambiguity, probability densification, TPS init | |
| Watermarking & View-Dep | 3 | High-capacity watermarking, view-dep splatting, UV-param | |
| Advanced Domain | 16 | Geometry opacity decoupling, reflective materials, physics sim, eigenmode, Bayesian pose, mesh generation proxies | |
| MoE Dynamic & Bayesian Control | 4 | MoE expert routing collapse, DP prior concentration, asynchronous decoupling, CoSAG semantic drift | |
| Geometry-Aware Deformable & PBR / Physics | 3 | Deformable offset over-displacement, albedo-illumination entanglement, underwater attenuation mismatch | |
| gsplat / Nerfstudio Migration | 4 | Attribute layout mismatch, missing custom autograd, PipelineConfig mismatch, dual backend confusion | |
| Large-Scale & Block-Based | 4 | Block boundary seams, OOM from Gaussian growth, LOD streaming desync, frustum culling errors | |
| CUDA Compilation & Environment | 4 | PyTorch/CUDA version mismatch, nvcc not found, gcc too new, AMP NaN | |
| 3DGS + AI/LLM Fusion | 4 | LLM operator wrong subset, world model gradient break, VLM feedback instability, agent code missing invariant checks | |
| Differentiable Physics & Simulation | 3 | Physics gradient disconnection, quaternion drift, fluid incompressibility violation | |
| Modern Method-Specific (2026) | 6 | ReorgGS boundary, HT-3DGS SH merge, DashGaussian schedule, Proxy-GS thin structure, IDESplat depth gradient, UrbanGS normal regularization | |
| General Graphics & Math | 5 | Column/row-major confusion, view/world depth sort, NDC/pixel confusion, quaternion convention, degenerate covariance | |
| Training Robustness & Reproducibility | 3 | Non-deterministic ordering, gradient accumulation for densification, uniform LR scheduler | |
| Web/Mobile Deployment | 3 | Shader precision mismatch, mobile memory budget, WASM/WebGPU performance regression | |
| 3DGS Code Authoring | 8 | Missing gradient clipping, in-place ops breaking autograd, SH init explosion, camera format mismatch, missing no_grad, densification gradient, checkpoint state, NaN checking | |
| Advanced Rendering & Shader | 4 | EWA filter scale mismatch, SH Legendre convention, tile Gaussian count limit, background color handling | |
| Multi-View & Dataset | 3 | Resolution/intrinsics mismatch, COLMAP sparse points, temporal inconsistency in video | |
| Specialized Domain | 4 | Volumetric rendering mode, event camera binning, underwater water type, articulated joint limits | |
| Testing & Validation | 3 | Wrong color space metrics, test-time camera adjustment, LPIPS backbone mismatch | |
| Performance Profiling | 2 | CPU-GPU sync in loop, padded tensor memory waste | |
| Total | 100+ categories | 164 patterns with specific detection and fix guidance |
Output Format
Code Authoring Guidelines (New in v3.0.0)
When writing new 3DGS code (not just reviewing), follow these authoring best practices to avoid common pitfalls:
A. Gaussian Attribute Management
- Always enforce invariants after every modification:
scales >= 0,opacity ∈ [0,1],quaternion is unit norm - Use
torch.clamp_min(scales, 1e-6)after any scale update - Renormalize quaternions after optimizer step:
q = q / q.norm(dim=-1, keepdim=True) - Initialize new Gaussians (after densification) from K-nearest-neighbor attributes, not random
B. Loss Function Implementation
- Never use in-place operations on grad-requiring tensors (avoid
+=,*=,tensor[idx] = val) - Use functional style:
loss = loss + penalty(notloss += penalty) - Add gradient clipping:
torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0) - New loss terms should have warmup:
weight = min(step / warmup, 1.0) * max_weight - Add NaN/Inf check:
if torch.isnan(loss) or torch.isinf(loss): break
C. Training Loop Structure
- Wrap evaluation in
with torch.no_grad():to prevent memory growth - Log sparingly: only
loss.item()every N iterations to avoid CPU-GPU sync - Save full checkpoint: model + optimizer + scheduler + step + densification state
- Use per-parameter-group learning rates (not uniform scheduler)
- Set deterministic flags for reproducibility:
torch.backends.cudnn.deterministic = True
D. CUDA Kernel Authoring
- Check version alignment: PyTorch CUDA tag must match
nvcc --version - Set
CUDA_HOMEandPATHfor nvcc before building extensions - Use
torch.autograd.Functionwith properctx.save_for_backward()for custom kernels - Verify with
torch.autograd.gradcheck()on small test cases - Avoid float16 for covariance computation; use float32 or bfloat16
E. Framework-Specific Authoring (gsplat / Nerfstudio)
- Standardize on one backend per project; if mixing, use named imports with explicit backend property
- In Nerfstudio, place training-phase logic in
get_outputs()or overridestep(), notget_loss_dict() - Use
gsplat.rasterize()signature, notdiff_gaussian_rasterization.GaussianRasterizer - Verify attribute layout matches framework conventions (SH shape, scale convention, quaternion order)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/3dgs-code-reviewer/SKILL.md
Popularity
- Repository stars
- 114
- Repository forks
- 9
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jaccen/awesome-gaussian-skills/3dgs-code-reviewer)