← Catalog

code-analysis-skill

A skill for analyzing code quality, identifying patterns, and suggesting improvements. Use this skill when you need to review code for issues, analyze coding patterns, identify refactoring opportunities, or check adherence to coding standards.

MIT 3 tools Source

Code Analysis Skill

This skill helps analyze code quality, identify patterns, and suggest improvements in codebases.

When to Use This Skill

Use this skill when you need to:

  • Review code for potential issues or improvements
  • Analyze coding patterns and practices
  • Identify areas for refactoring
  • Check adherence to coding standards
  • Understand complex code sections

How to Use

  1. Identify the code section or files to analyze
  2. Specify the type of analysis needed (quality, patterns, refactoring suggestions)
  3. Provide context about the codebase and objectives
  4. Request specific types of feedback or improvements

Examples

  • “Analyze this Python script for code quality issues”
  • “Review this JavaScript function for potential refactoring opportunities”
  • “Check if this code follows SOLID principles”
  • “Identify any anti-patterns in this React component”
  • “Suggest improvements for this database query implementation”

Guidelines

  • Focus on actionable feedback that improves code quality
  • Consider the context and constraints of the project
  • Balance between theoretical best practices and practical applicability
  • Prioritize critical issues over minor stylistic preferences
  • Provide explanations for suggestions to aid learning

Troubleshooting

If analysis seems off-target:

  1. Provide more context about the code’s purpose and constraints
  2. Clarify the specific aspects you want analyzed
  3. Share relevant documentation or requirements
  4. Specify the priority of different quality factors (performance, maintainability, etc.)