AgentSkillsCN

code-analyzer

分析代码质量,识别潜在问题并提出改进建议。在审查代码结构、查找 Bug 或评估代码可维护性时使用。

SKILL.md
--- frontmatter
name: code-analyzer
description: Analyze code quality, identify potential issues, and suggest improvements. Use when reviewing code structure, finding bugs, or evaluating maintainability.

/analyze-code Command

Analyze code quality, identify potential issues, and suggest improvements.

What This Command Does

  1. Reviews code structure and patterns
  2. Identifies potential bugs and anti-patterns
  3. Suggests refactoring opportunities
  4. Checks for security vulnerabilities
  5. Evaluates code maintainability

Usage

/analyze-code [path or current file]

Output

Provides structured analysis with:

  • Code quality score
  • List of issues found with severity
  • Specific suggestions for improvement
  • References to best practices

Best Practices

  • Run before code reviews
  • Use when refactoring legacy code
  • Apply to critical code paths regularly