Perform automated code reviews checking for security vulnerabilities, performance issues, and code quality. Use before creating PRs, when reviewing complex changes, checking for security issues, or identifying performance problems.
# Run all automated checks
pnpm biome check .
pnpm tsc --noEmit
pnpm test
# Search for common issues
grep -r "any" apps/ packages/ --include="*.ts" # any usage
grep -r "console.log" apps/ packages/ --include="*.ts" # debug logs
grep -r "TODO" apps/ packages/ --include="*.ts" # TODOs
Functionality: Code works, edge cases handled, no obvious bugs
Code Quality: Readable, small focused functions, descriptive names, no duplication
Type Safety: No any, proper TypeScript types, well-defined interfaces
Testing: New code has tests, tests cover edge cases
Performance: No unnecessary re-renders, optimized queries, no N+1
Security: No SQL injection, XSS, or exposed secrets; input validation present
// ❌ Magic numbers → ✅ Use constants
if (user.age > 18) {} // Bad
if (user.age >= LEGAL_AGE) {} // Good
// ❌ Deep nesting → ✅ Early returns
if (!user || !user.isActive) return;
// ❌ Using any → ✅ Proper typing
function process(data: any) {} // Bad
function process(data: UserData) {} // Good
// ❌ SQL injection → ✅ Parameterized queries
const query = `SELECT * FROM users WHERE id = ${userId}`; // Bad
db.query.users.findFirst({ where: eq(users.id, userId) }); // Good
// ❌ N+1 queries → ✅ Single query with join
for (const post of posts) { post.author = await db.query.users... } // Bad
db.query.posts.findMany({ with: { author: true } }); // Good
// ❌ Missing memoization → ✅ useMemo for expensive ops
const data = expensiveOperation(data); // Bad
const data = useMemo(() => expensiveOperation(data), [data]); // Good
Use these markers for clarity:
git diff main...HEAD # View changes
pnpm biome check --write . # Format/lint
pnpm tsc --noEmit # Type check
pnpm test # Run tests
git diff --stat main...HEAD # Check PR size
React: Check hooks usage, memoization, key props, useEffect deps Next.js: Server vs client components, 'use client' directive, metadata Drizzle: Proper indexing, N+1 queries, transactions
security skill for security auditingperformance skill for performance optimizationSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer