improve

Analyze code and provide specific improvement suggestions with code examples.

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill functions as an automated code auditor that analyzes source code to provide actionable improvement suggestions. It focuses on four critical pillars: performance optimization, code readability, security hardening, and adherence to industry best practices. By delivering side-by-side code examples and clear justifications, it helps developers refactor complex logic, eliminate technical debt, and ensure high-quality software delivery.

Use Cases

  • Automated Pull Request Reviews: Streamline the development workflow by automatically scanning code changes for performance bottlenecks and style inconsistencies before human review.
  • Legacy Code Refactoring: Analyze older modules to identify deeply nested logic or outdated patterns and replace them with modern, readable, and maintainable language idioms.
  • Security Vulnerability Detection: Proactively identify risks such as improper input validation or insecure API usage within the codebase to prevent potential exploits.
  • Performance Tuning: Detect inefficient algorithms and redundant computations, providing optimized alternatives like list comprehensions or batch processing to improve execution speed.
nameimprove
descriptionAnalyze code and provide specific improvement suggestions with code examples.
version1.0.0

Code Improve Skill

Task

Analyze code changes and provide specific improvement suggestions with code examples.

Improvement Categories

Performance

  • Algorithm optimization
  • Reduce unnecessary computation
  • Cache utilization
  • Batch processing

Readability

  • Naming improvements
  • Code simplification
  • Extract functions/methods
  • Reduce nesting

Security

  • Input validation
  • Secure API usage
  • Sensitive data handling

Best Practice

  • Language idioms
  • Design patterns
  • Error handling
  • Type safety

Output Format

suggestions:
  - relevant_file: "src/example.py"
    language: "python"
    relevant_lines_start: 10
    relevant_lines_end: 15
    label: "performance"
    severity: "medium"
    one_sentence_summary: "Use list comprehension instead of loop"
    suggestion_content: |
      Current code uses for loop to build list, can be simplified with list comprehension.
    existing_code: |
      result = []
      for i in range(100):
          result.append(i * 2)
    improved_code: |
      result = [i * 2 for i in range(100)]

Principles

  • Only suggest improvements with real value
  • existing_code must be actual code from the PR
  • improved_code must be directly usable as replacement
  • Prioritize high-impact improvements