Code Review

Review code for quality, bugs, and best practices

lwmxiaobei 7cc7a8b 980 B Updated

File contents

Code Review Guidelines

When reviewing code, follow these steps:

  1. Read the code thoroughly — understand the intent before critiquing.
  2. Check for bugs — null references, off-by-one errors, race conditions, resource leaks.
  3. Evaluate naming — are variables, functions, and classes named clearly?
  4. Assess structure — is the code modular? Are responsibilities well-separated?
  5. Security — look for injection vulnerabilities, unsafe inputs, hardcoded secrets.
  6. Performance — unnecessary allocations, N+1 queries, blocking calls in async code.
  7. Tests — are edge cases covered? Are tests readable and maintainable?

Output format:

  • Start with a one-line summary (good / needs work / has issues).
  • List findings grouped by severity: 🔴 Critical, 🟡 Warning, 🟢 Suggestion.
  • For each finding, include file, line, and a concrete fix.

lwmxiaobei/xbcode/tree/main/skills/code-review commit 7cc7a8b45c

Frequently asked questions

npx skillmds@latest add lwmxiaobei/code-review