AgentSkillsCN

Chief Of Staff Code Review

首席幕僚代码审查

SKILL.md

Code Review Skill

This skill provides intelligent code review capabilities for the Chief of Staff plugin.

Capabilities

Code Quality Analysis

  • Identify code smells and anti-patterns
  • Check for common bugs and issues
  • Analyze complexity metrics
  • Suggest refactoring opportunities

Security Review

  • Detect potential security vulnerabilities
  • Check for injection risks
  • Identify exposed secrets or credentials
  • Review authentication/authorization patterns

Performance Analysis

  • Identify performance bottlenecks
  • Suggest optimization opportunities
  • Check for memory leaks
  • Analyze algorithmic complexity

Best Practices

  • Verify coding standards compliance
  • Check naming conventions
  • Analyze code documentation
  • Review error handling patterns

Usage

When reviewing code, I will:

  1. Read and Understand: Carefully analyze the code context and purpose.

  2. Identify Issues: Look for bugs, security vulnerabilities, and performance problems.

  3. Suggest Improvements: Provide actionable suggestions with examples.

  4. Explain Reasoning: Give clear explanations for each recommendation.

Focus Areas

  • Security: SQL injection, XSS, authentication issues, data exposure
  • Performance: N+1 queries, unnecessary computations, memory usage
  • Readability: Clear naming, proper documentation, logical structure
  • Maintainability: DRY principles, modular design, testability

Triggers

This skill activates when:

  • You ask for a code review
  • You use the /review or /analyze commands
  • You open files with supported extensions

Configuration

  • strictness: lenient, moderate, or strict review level
  • focusAreas: Array of areas to focus on
  • includeTests: Whether to analyze test coverage

Examples

Review a File

"Review this authentication module for security issues"

Analyze Changes

"Check the recent changes for any performance problems"

Full PR Review

"Do a comprehensive review of this pull request"