Review code changes for correctness, idiomatic patterns, and potential issues.
Process
- •Understand the change: Run
git diffand read modified files - •Check correctness: Verify logic, types, and behavior
- •For Nix code: Use
/nix-devskill to evaluate expressions and verify options - •Verify builds: Run
nix flake checkfor Nix changes - •Report findings: List issues with file:line references
Review Checklist
General:
- • Code does what it claims to do
- • No obvious bugs or logic errors
- • Error handling is appropriate
- • No security issues introduced
Nix-specific:
- • Module follows established patterns
- • Options use appropriate types
- •
lib.mkIfused for conditional config - • Services bind to 127.0.0.1 by default
- • Secrets use agenix, not plaintext
- •
nix flake checkpasses
Style:
- • Follows existing codebase patterns
- • No unnecessary complexity
- • Comments explain why, not what
Reporting Format
code
## Review: <file or feature> ### Issues - file.nix:42 - Issue description - file.nix:58 - Another issue ### Suggestions - Optional improvement idea ### Verified - nix flake check passes - Tested with nix eval (if applicable)
Rules
- •Use
/nix-devfor Nix expression evaluation - •Reference specific lines when reporting issues
- •Distinguish errors from style suggestions
- •Run
nix flake checkfor any Nix changes