AgentSkillsCN

code-review

依据 NovaTech 标准进行全面的代码审查。在评审拉取请求、审计代码质量,或为生产部署做准备时,可使用此技能。

SKILL.md
--- frontmatter
name: code-review
description: Comprehensive code review following NovaTech standards. Use when reviewing pull requests, auditing code quality, or preparing code for production deployment.
allowed-tools:
  - Read
  - Grep
  - Glob
  - Bash

NovaTech Code Review

This skill guides comprehensive code reviews covering security, performance, and style standards.

When to Use This Skill

  • Reviewing pull requests before merge
  • Auditing existing code for quality issues
  • Preparing features for production deployment
  • Onboarding reviews for new team members' code

Review Workflow

  1. Security Review — Check for vulnerabilities first
  2. Performance Review — Identify bottlenecks and inefficiencies
  3. Style Review — Ensure consistency with team standards
  4. Validation — Run automated linters for final check

Security Review

For detailed security checks, see SECURITY.md.

Key areas to examine:

  • Input validation and sanitization
  • Authentication and authorization
  • Data exposure risks
  • Dependency vulnerabilities

Performance Optimization

Reference PERFORMANCE.md for performance patterns.

Focus on:

  • Unnecessary re-renders and computations
  • Network request optimization
  • Memory leaks and resource cleanup
  • Asset loading strategies

Style Guidelines

See STYLE.md for the complete style reference.

Priorities:

  • BEM naming conventions for CSS
  • Consistent code formatting
  • Clear naming and documentation
  • Accessibility compliance

Validation

To validate code, run ./scripts/run-linters.sh against the target files. Do not read the script contents — just execute it and process the output.

bash
./scripts/run-linters.sh path/to/file.js

The script runs ESLint for JavaScript and Stylelint for CSS, reporting issues in compact format.

Review Checklist Summary

Before approving any code:

  • No security vulnerabilities identified
  • Performance patterns followed
  • Style guidelines met
  • All linter checks pass
  • Accessibility requirements satisfied
  • Documentation is adequate