code-review

# Run all automated checks pnpm biome check . pnpm tsc --noEmit pnpm test

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-review" with this command: npx skills add sgcarstrends/sgcarstrends/sgcarstrends-sgcarstrends-code-review

Code Review Skill

Quick Checks

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

Review Checklist

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

Common Anti-Patterns

// ❌ 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

Review Comments

Use these markers for clarity:

  • 🔴 Must Fix: Critical issues blocking merge (security, bugs)

  • 🟡 Should Fix: Important but not blocking

  • 🟢 Suggestion: Nice to have

  • 💡 Learning: Educational context

  • ❓ Question: Requesting clarification

Self-Review Before PR

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

Framework-Specific Checks

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

Best Practices

  • Be Constructive: Focus on improvement, not criticism

  • Explain Why: Provide context for suggestions

  • Prioritize: Mark critical vs nice-to-have

  • Be Timely: Review PRs promptly

References

  • See security skill for security auditing

  • See performance skill for performance optimization

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Claude Code Controller

控制和管理 Claude Code 编码助手,支持项目感知编码、代码审查、重构和功能实现。使用 ACP 运行时在隔离会话中执行 Claude Code 任务,或在主会话中管理配置和项目上下文。

Registry SourceRecently Updated
0119
Profile unavailable
Coding

QA Reviewer

提供代码审查、单元测试、覆盖率分析和问题追踪,支持C++/Python/JavaScript,确保项目质量和文档完整度。

Registry SourceRecently Updated
2185
Profile unavailable
Coding

ReviewEvo

Self-improving code reviewer that learns your codebase over time. Analyzes git history, spots patterns, identifies risk — and gets smarter every run.

Registry SourceRecently Updated
1250
Profile unavailable