Language-specific code review checklists — Python, TypeScript/JS, Go, Rust, Java: idioms, type safety, concurrency, error handling, security, testing, framework tables, consumer-coverage grep patterns. Loaded by reviewer subagents. Triggers: python review checklist, typescript review checklist, go review checklist, rust review checklist, java review checklist.
Install
npx skillscat add darellchua2/civiltekk-skills/language-review-checklists-skill Install via the SkillsCat registry.
Knowledge extracted from language-reviewer-subagent (kept in sync with the
agent's Language Detection & Scope table). Apply only the sections matching
the detected language(s); for multi-language changesets apply each and report
per-language.
Python Review Checklist
PEP 8 & Style
- Line length <= 88 (black default) or 79 (PEP 8 strict)?
- Naming: snake_case for functions/variables, PascalCase for classes, UPPER_SNAKE for constants
- Imports: stdlib → third-party → local, no wildcard imports
- Docstrings present for public functions/classes (PEP 257)?
Type Hints
- Function signatures have type annotations?
- Return types specified?
Optional[T]used instead ofT | Nonefor Python <3.10?typing.Protocolfor structural typing over ABC where appropriate?- Pydantic models for API boundaries?
Pythonic Patterns
- List/dict/set comprehensions over loops where appropriate?
- Context managers (
with) for resources? - Generator expressions for large data (
yield)? dataclassesorattrsinstead of manual__init__?pathlib.Pathinstead ofos.path?- f-strings instead of
.format()or%?
Error Handling
- Specific exceptions, not bare
except:orexcept Exception: - Custom exception hierarchy for the project?
try/except/else/finallyused correctly?- No silent catches (empty
exceptblocks)?
- Specific exceptions, not bare
Security
- No
eval(),exec(), or__import__()with user input? - SQL parameterization (not string formatting)?
- No hardcoded secrets or credentials?
- Input validation at API boundaries?
pickle.loads()avoided for untrusted data?
- No
Async & Concurrency
asynciopatterns correct (no blocking calls in async functions)?async withfor async resources?- Proper task cancellation and cleanup?
- Thread safety for shared state?
Testing
- pytest conventions followed?
- Fixtures used appropriately (not over-mocked)?
- Parametrized tests for edge cases?
- Test isolation (no shared mutable state)?
Python Framework-Specific Checks
| Framework | Key Patterns to Check |
|---|---|
| FastAPI | Dependency injection, Pydantic models, async handlers, proper status codes |
| Django | ORM efficiency (select_related/prefetch_related), middleware, view patterns |
| Flask | Blueprint organization, proper app factory, request context |
| SQLAlchemy | Session management, relationship loading, migration compatibility |
Backend Patterns: use civiltekk-python-backend-skill (scaffold + patterns routes) for SQLAlchemy detached-instance bugs, Pydantic-on-JSONB pitfalls, async SSE durability, enum strategy resolution, two-phase dataclass initialization, and global _service singletons (prefer FastAPI Depends() with app.state lifecycle).
TypeScript/JavaScript Review Checklist
Type Safety
- No
anytypes (useunknownif truly unknown)? - Proper generic constraints?
- Discriminated unions for state modeling?
readonlyfor immutable data?- Proper
null/undefinedhandling (optional chaining, nullish coalescing)? - Type guards and narrowing correct?
- No
Modern ES Patterns
constoverlet,letovervar?- Arrow functions for callbacks?
- Destructuring where appropriate?
- Template literals instead of string concatenation?
async/awaitover raw promises?- ES modules (
import/export) over CommonJS?
React / Next.js (if applicable)
- Component naming: PascalCase?
- Hooks rules followed (no conditional hooks)?
- Proper
useMemo/useCallback(not overused, not missing)? - Server vs Client Components correctly separated?
- Key props on lists (stable, unique)?
- No prop drilling beyond 2 levels (use context or state management)?
Error Handling
- Proper error boundaries in React?
- try/catch around async operations?
- Error types specific (not generic
Error)? - Proper error propagation in async chains?
Security
- No
eval(),Function(), orinnerHTMLwith user input? - XSS prevention (proper escaping/sanitization)?
- No hardcoded API keys or secrets?
- CORS configured correctly?
- Input validation with Zod/schemas at API boundaries?
- No
Performance
- Bundle size awareness (no unnecessary imports)?
- Lazy loading where applicable?
- Proper memoization strategy?
- No unnecessary re-renders in React?
- Efficient data fetching patterns (SWR, React Query)?
Testing
- Jest/Vitest conventions followed?
- Testing Library patterns (user-centric queries)?
- Mock usage appropriate (not over-mocked)?
- Async test patterns correct?
TypeScript/JavaScript Framework-Specific Checks
| Framework | Key Patterns to Check |
|---|---|
| Next.js (verify current major version) | App Router patterns, Server Actions, metadata API, proper "use client" directives |
| React (verify current major version) | Server Components, Suspense boundaries, use() hook, transition patterns |
| Node.js | Stream handling, proper error events, graceful shutdown, no synchronous I/O |
| Express/Fastify | Middleware ordering, error handling middleware, request validation |
React Anti-Pattern: civiltekk-react-quality-skill routes hooks-antipatterns (hooks) + render-antipatterns (render). TypeScript DRY: same skill, route ts-dry.
Go Review Checklist
Go Idioms
- Proper package naming (lowercase, single word, no underscores)?
gofmtcompliant formatting?- Exported names have doc comments?
- Receiver names consistent within a type (not mixing
sandself)? - Error messages lowercase, no trailing punctuation?
go vetclean?
Error Handling
- Explicit error checking (no
_ = someFunc())? - Errors wrapped with context (
fmt.Errorf("doing X: %w", err))? - Custom error types for sentinel errors (
errors.Is/errors.As)? - No
panicin library code (only inmain/tests)?
- Explicit error checking (no
Concurrency
- Goroutines properly managed (no leaked goroutines)?
- Channels vs mutexes chosen correctly?
sync.WaitGroupused for goroutine coordination?context.Contextpassed as first parameter?- No shared mutable state without synchronization?
selectwith proper default/cancel handling?
Interfaces
- Small, focused interfaces (1-2 methods)?
- Interfaces defined by consumer, not producer?
- Implicit satisfaction (no
var _ Interface = (*Type)(nil))? io.Reader/io.Writerpatterns followed?
Data Structures
- Slices pre-allocated when size known (
make([]T, 0, n))? - Maps with proper concurrency protection if shared?
- Structs organized by field size (alignment)?
- Proper use of value vs pointer receivers?
- Slices pre-allocated when size known (
Testing
- Table-driven tests with
t.Runsubtests? - Test files in same package (
_testsuffix)? - Benchmark tests (
BenchmarkXxx) for hot paths? t.Parallel()where safe?- Test helpers use
t.Helper()?
- Table-driven tests with
Performance
- No unnecessary allocations in hot paths?
strings.Builderfor string concatenation?sync.Poolfor reusable allocations?- Proper use of
copy()for slice operations? - Buffered I/O where appropriate?
Go Framework-Specific Checks
| Framework | Key Patterns to Check |
|---|---|
| net/http | Handler signatures, proper response writing, context usage, middleware pattern |
| Gin/Echo | Route grouping, middleware ordering, proper error handling middleware |
| gRPC | Proto file conventions, streaming patterns, interceptors, error codes |
| Cobra | Command structure, flag handling, proper help text |
Rust Review Checklist
Ownership & Borrowing
- Borrow checker satisfied without excessive cloning?
- Lifetimes annotated where needed, elided where possible?
- No unnecessary
Arc<Mutex<T>>whenRc<RefCell<T>>suffices (single-threaded)? - Proper use of
Cow<str>for borrowed/owned string flexibility? Rc/Arccycles avoided (noRc<RefCell>circular references)?
Error Handling
Result<T, E>used instead of panics for recoverable errors?thiserror/anyhowused appropriately (thiserror for libraries, anyhow for apps)?- Error types implement
std::error::Error? ?operator used instead ofmatchon Result?- No
unwrap()orexpect()in library code (only in tests/main)?
Unsafe Safety
unsafeblocks minimized and clearly documented with safety invariants?- Raw pointer dereferences justified?
- No undefined behavior (aliasing violations, uninitialized memory)?
unsafeblocks reviewed with extra scrutiny?
Idiomatic Patterns
- Builder pattern for complex construction?
From/Intotraits for conversions?Iteratortrait implemented for custom iterators?newtypepattern for domain primitives?Deref/DerefMutnot abused (only for smart pointers)?- Proper trait object (
dyn) vs generics trade-off?
Concurrency
Send/Syncbounds respected?- Proper channel usage (
mpsc,crossbeam)? tokio/async-stdpatterns correct (no blocking in async)?parking_lotvsstd::syncchosen appropriately?- Lock ordering consistent to prevent deadlocks?
Performance
- Zero-cost abstractions used (generics, enums, traits)?
- No unnecessary heap allocations (
Stringvs&str,Vecvs slice)? #[inline]only where benchmarks justify?- Proper use of
Cowto avoid allocations? - Stack allocation preferred where possible?
Testing
#[test]unit tests present?#[tokio::test]for async tests?- Property-based testing (
proptest) for complex logic? - Integration tests in
tests/directory? - Doc tests for public API examples?
Rust Framework-Specific Checks
| Framework | Key Patterns to Check |
|---|---|
| Tokio | Runtime configuration, task spawning, proper async/await, channel patterns |
| Axum | Handler signatures, extractor usage, middleware with layers, state management |
| Actix | Actor patterns, message handling, supervisor strategy |
| Clap | Command-line argument parsing, derive vs builder patterns |
Java Review Checklist
Java Idioms
- Effective Java compliance (Bloch's items respected)?
- Naming: camelCase for methods/variables, PascalCase for classes/interfaces, UPPER_SNAKE for constants?
- Package names lowercase, no underscores, reverse-DNS style?
finalused for effectively-final locals, parameters, and fields where appropriate?equals/hashCode/toStringoverridden together (or none)?- Checkstyle/SpotBugs clean?
Exceptions
- Checked vs unchecked chosen correctly (checked for recoverable, unchecked for programmer errors)?
- No swallowed exceptions (empty
catchblocks)? - Custom exception hierarchy follows
RuntimeExceptionbase for most modern code? - Exceptions chained (
new X("msg", cause)) rather than losing the cause? - try-with-resources used for all
AutoCloseable? - No
catch (Exception e)orcatch (Throwable t)over-broad catches?
Generics & Types
- No raw types (
Listinstead ofList<String>)? - Generic bounds used correctly (
<T extends Comparable<T>>)? - PECS principle applied (
<? extends T>for producers,<? super T>for consumers)? - Diamond operator
<>used for instantiation? - Generic methods favored over
Object+ casts?
- No raw types (
Concurrency
java.util.concurrentprimitives preferred oversynchronized/wait/notify?- Proper synchronization of shared mutable state (no data races)?
volatileused only for visibility flags, not atomicity?Atomic*classes for atomic counters/references?CompletableFuturecomposed correctly (no blocking joins in async chains)?ExecutorServiceshut down properly (try-with-resources orshutdown()infinally)?- No shared mutable state across threads without synchronization?
Null Handling
Optional<T>used as return type for methods that may not return a value (never as field/parameter)?Objects.requireNonNullon constructor/method parameters?- Null-annotations (
@NonNull,@Nullable) consistent (JSR-305, JSpecify, or Spring)? - No
Optional.get()withoutisPresent()check? - Stream pipelines null-safe (no
nullin streams)?
Modern Java (11+/17+/21)
recordfor transparent data carriers (vs manual POJO with getters/equals/hashCode)?sealedclasses/interfaces used to restrict subtypes?- Pattern matching for
instanceof(if (o instanceof Foo f))? - Switch expressions with arrow syntax and exhaustiveness (esp. with sealed types)?
- Text blocks (
"""...""") for multi-line strings? varused only where type is obvious from initializer (not for "shorter code")?
Streams & Collections
- Stream chains single-purpose and side-effect-free?
.collect(Collectors.toList())produces mutable copy (or.toUnmodifiableList()for immutable)?EnumSet/EnumMapchosen for enum-keyed collections?List.of()/Map.of()for immutable literals (notCollections.unmodifiableList)?- No mutation of collection elements inside
forEach? - No
.stream()used purely for iteration (use enhancedforloop)?
Resource Management
- try-with-resources for all
Closeable/AutoCloseable(streams, connections, files)? - No
finalizermethods (finalize()) — deprecated for removal (JEP 421, Java 18+) but NOT yet removed; verify current status before asserting removal. Cleanerused only as last resort for native resources?- I/O streams properly chained and closed in correct order?
- Connection pools (
HikariCP) used for database access (not rawDriverManager)?
- try-with-resources for all
Testing
- JUnit 5 conventions followed (
@Test,@BeforeEach/@AfterEach,@ParameterizedTest)? - Mockito patterns clean (no over-mocking; prefer interface mocks over concrete)?
- AssertJ fluent assertions used (
assertThat(x).isEqualTo(y)) over JUnitassertEquals? - Test isolation (no shared mutable state across tests)?
- Test names follow a convention (
methodName_state_expectedorshould_X_when_Y)? - No production code reaching into test internals via reflection?
- JUnit 5 conventions followed (
Security
- Input validation at API boundaries (Bean Validation
@Valid, manual checks)? - SQL via
PreparedStatement/JPA named queries — never string concatenation? - No
Runtime.exec()orProcessBuilderwith user-controlled input? - No hardcoded secrets, API keys, or passwords (use env vars / secret managers)?
- XML parsing hardened against XXE (
XMLConstants.FEATURE_SECURE_PROCESSING)? - Deserialization of untrusted input avoided (no
ObjectInputStreamon untrusted data)?
- Input validation at API boundaries (Bean Validation
Java Framework-Specific Checks
| Framework | Key Patterns to Check |
|---|---|
| Spring Boot | @Transactional boundaries correct (not on private methods), @RestController signatures, @ControllerAdvice exception handlers, DI via constructors (not @Autowired on fields), proper @RequestMapping paths and HTTP methods, @Service/@Repository stereotypes used, configuration properties validated |
| Quarkus | CDI vs Spring DI (no @Autowired), native image compatibility (no runtime reflection), @Blocking/@NonBlocking on reactive paths, @ConfigProperty usage, Panache repository patterns |
| Micronaut | Compile-time DI (no reflection), @Singleton vs @Context scope, AOP via @Around, proper HTTP filters, no @Inject on private fields (compile-time constraints) |
| Jakarta EE | CDI scopes correct (@RequestScoped, @SessionScoped, @ApplicationScoped), JPA session management (no LazyInitializationException), EJB patterns (@Stateless vs @Singleton), Bean Validation on JAX-RS endpoints, proper persistence.xml config |
Java Linting: language-linting-skill for Checkstyle/SpotBugs/PMD command guidance and rule references.
Consumer-Coverage Grep Patterns (no CodeGraph)
Fallback enumeration patterns for the direct-consumer gate, per language:
Python
- Imports:
grep -rn 'from\s\+<module>\s\+import\|import\s\+<module>' --include="*.py" - Symbol usage:
grep -rn '\b<SymbolName>\b' --include="*.py" - Subclass overrides:
grep -rn 'class\s\+\w+\s*(.*<BaseClassName>' --include="*.py" - Decorator usage:
grep -rn '@<decorator>' --include="*.py"
TypeScript/JavaScript
- Imports:
grep -rn 'import\s\+.*from\s\+[''"]\./.*<module>' --include="*.ts" --include="*.tsx" - Type references:
grep -rn ':\s*<TypeName>' --include="*.ts" --include="*.tsx" - Component usage:
grep -rn '<ComponentName' --include="*.tsx" --include="*.jsx" - Hook usage:
grep -rn '<hookName>\(' --include="*.ts" --include="*.tsx"
Go
- Imported packages:
grep -rn '"<pkg/path>"' --include="*.go" - Symbol usage:
grep -rn '\b<SymbolName>\b' --include="*.go" - Interface implementations:
grep -rn 'func\s.*(.*).*<InterfaceName>' --include="*.go"
Rust
- Use statements:
grep -rn 'use\s\+crate::<path>::<Symbol>' --include="*.rs" - Symbol usage:
grep -rn '\b<SymbolName>\b' --include="*.rs" - Trait implementations:
grep -rn 'impl\s\+<TraitName>\s\+for' --include="*.rs" - Macro invocations:
grep -rn '<macro_name>!' --include="*.rs"
Java
- Imports:
grep -rn 'import\s\+.*\.<ClassName>;' --include="*.java" - Method calls:
grep -rn '\.<methodName>(' --include="*.java" - Implementations:
grep -rn 'implements\s\+.*<InterfaceName>' --include="*.java" - Subclasses:
grep -rn 'extends\s\+<BaseClassName>' --include="*.java"