AgentSkillsCN

code-review

能够对 Git 提交进行全面的代码审查。分析提交变更,探究代码库中的副作用,并按严重程度(关键、重大、次要、微小)对发现结果进行分类。

SKILL.md
--- frontmatter
name: code-review
description: Capable of performing comprehensive code reviews on git commits. Analyzes commit changes, investigates side effects in the codebase, and categorizes findings by severity levels (critical, major, minor, nit).

Code Review Capabilities

This skill enables the agent to perform structured code reviews on git commits by analyzing changes, tracing side effects, and providing categorized feedback.

Core Capabilities

  • Git Commit Analysis: Retrieves commit metadata, messages, and diffs from git hash
  • Change Classification: Categorizes modified files by type (source, test, config, new, modified, deleted)
  • Side Effect Detection: Traces function/class usage across the codebase to identify potential impacts
  • Severity Classification: Categorizes review findings into four severity levels

Review Flow

PhaseCapabilityOutput
1. Context CollectionGit hash lookup, diff statisticsCommit metadata, change scope
2. Change AnalysisFile-by-file diff inspectionCategorized file changes
3. Impact AnalysisDependency tracing, test coverage checkSide effect report
4. Review ExecutionCode inspection with severity classificationCategorized findings
5. Result SummaryFormatted output generationStructured review report

Severity Levels

LevelScope
CriticalSecurity vulnerabilities, data loss risks, service outage potential
MajorBugs, performance issues, incorrect logic
MinorCode quality, readability, duplication
NitStyle, naming conventions, comment improvements

Domain Knowledge

Supported Analysis Types

  • Single Commit: Review changes in a specific commit hash
  • Commit Range: Review changes across multiple commits
  • File-Scoped: Review specific files within a commit

Constraints

  • Read-Only Operations: Uses only non-destructive git commands
  • Local Repository: Operates on locally available git history