AgentSkillsCN

code-review

在审查 PR 或检测代码质量时,重点关注代码中的缺陷、风格问题以及最佳实践的合规性。

SKILL.md
--- frontmatter
name: code-review
description: Reviews code changes for bugs, style issues, and best practices. Use when reviewing PRs or checking code quality.

Code Review Skill

This skill enables the agent to perform comprehensive code reviews on the current workspace or specific files.

Instructions

  1. Analyze Context: Understand the purpose of the changes by reading related documentation or task descriptions.
  2. Check for Bugs: Look for logical errors, edge cases, and potential runtime issues.
  3. Style & Standards: Ensure code follows established style guides (e.g., Airbnb, Google, or project-specific rules in .agent/rules).
  4. Best Practices: Identify opportunities for refactoring, performance improvements, and security hardening.
  5. Constructive Feedback: Provide clear, actionable comments with examples where possible.

Examples

Reviewing a specific file

"Review the changes in src/utils/auth.ts for any security vulnerabilities."

Broad review

"Perform a code review on the latest commit and summarize major findings."