code-reviewlisted
Install: claude install-skill Weaverse/.agents
Perform a comprehensive code review on $ARGUMENTS. This is a **read-only** review - do NOT modify any files. Only output findings.
## Review Categories
### 1. Dead Code Detection
- Unused imports
- Unused variables, functions, components, hooks
- Unreachable code paths
- Commented-out code that should be removed
- Unused type definitions / interfaces
### 2. Code Duplication
- Duplicated logic that could be extracted to a shared utility
- Similar components that could be consolidated
- Repeated patterns that warrant a custom hook
- Copy-pasted code blocks across files
### 3. Coding Pattern Violations
Check against these rules:
- **Collocation > Distribution**: Related code should live together, not scattered
- **`let` > `const`**: Prefer `let` over `const` for variable declarations
- **Named exports > Default exports**: Use `export function Foo` not `export default`
- **Function declarations > Function expressions**: Use `function foo()` not `const foo = () =>`
- **No `useMemo`**: Flag any usage of `useMemo`
- **No `useCallback`**: Flag any usage of `useCallback`
- **`ALL_CAPS` for constants**: Constants should be `SCREAMING_SNAKE_CASE`
### 4. Bugs & Memory Leaks
- Missing cleanup in useEffect
- Event listeners not removed
- Subscriptions not unsubscribed
- Stale closures
- Race conditions in async code
- Missing error handling
- Null/undefined access risks
- Incorrect dependency arrays
### 5. Optimization Opportunities
- Unnecessary re-renders
- Heavy computations in re