language-specific-idioms
Installation
SKILL.md
Language-Specific Idioms for Code Review
Overview
Every language has a "grain" — idiomatic patterns aligned with its type system, memory model, and stdlib. Code fighting the grain is harder to read, error-prone, and often slower.
When to use: Reviewing PRs where authors may not know the language idioms, onboarding contributors, or cross-language teams.
Quick Reference
| Language | Core Idiom | Top Red Flag |
|---|---|---|
| TypeScript/JS | Destructuring, optional chaining, readonly types |
var, any, == instead of === |
| Python | Comprehensions, context managers, generators, type hints | C-style for loop, mutable default args, bare except |
| Java | Optional, streams, records, try-with-resources |
null returns, raw types, checked exception abuse |
| Go | Error returns, interfaces, goroutines+channels, defer |
panic for control flow, interface pollution |
| Rust | Ownership, Result/Option chaining (?), iterators |
unwrap() everywhere, defensive clone() |
| C++ | RAII, smart pointers, const correctness, move semantics |
Raw new/delete, C-style casts, void* |