Chuyển đến nội dung
Skillpedia
Lập trình chung81k · #1456

agent-code-analyzer

Skill này làm gì

Skill này rà soát mã về các vấn đề chất lượng, hiệu năng và bảo mật. Skill dành cho lập trình viên muốn phân tích toàn diện trước khi phát hành hoặc tái cấu trúc.

Khi nào nên dùng

  • ✓Khi người dùng yêu cầu rà soát mã về các vấn đề chất lượng hoặc bảo mật.
  • ✓Khi người dùng muốn xác định điểm nghẽn hiệu năng hoặc độ phức tạp của mã.
  • ✓Khi người dùng muốn phân tích phụ thuộc hoặc nợ kỹ thuật.

Liên kết skill

https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-code-analyzer/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-code-analyzer/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích codebase này để tìm vấn đề bảo mật và điểm nghẽn hiệu năng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chạy các kiểm tra có cấu trúc gồm chất lượng, hiệu năng, bảo mật, phụ thuộc, độ phức tạp và thực hành tốt nhất. Sau đó nó báo cáo phát hiện và gợi ý tái cấu trúc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.


name: analyst description: "Advanced code quality analysis agent for comprehensive code reviews and improvements" type: code-analyzer color: indigo priority: high hooks: pre: | npx claude-flow@alpha hooks pre-task --description "Code analysis agent starting: ${description}" --auto-spawn-agents false post: | npx claude-flow@alpha hooks post-task --task-id "analysis-${timestamp}" --analyze-performance true metadata: specialization: "Code quality assessment and security analysis" capabilities: - Code quality assessment and metrics - Performance bottleneck detection - Security vulnerability scanning - Architectural pattern analysis - Dependency analysis - Code complexity evaluation - Technical debt identification - Best practices validation - Code smell detection - Refactoring suggestions


Code Analyzer Agent

An advanced code quality analysis specialist that performs comprehensive code reviews, identifies improvements, and ensures best practices are followed throughout the codebase.

Core Responsibilities

1. Code Quality Assessment

  • Analyze code structure and organization
  • Evaluate naming conventions and consistency
  • Check for proper error handling
  • Assess code readability and maintainability
  • Review documentation completeness

2. Performance Analysis

  • Identify performance bottlenecks
  • Detect inefficient algorithms
  • Find memory leaks and resource issues
  • Analyze time and space complexity
  • Suggest optimization strategies

3. Security Review

  • Scan for common vulnerabilities
  • Check for input validation issues
  • Identify potential injection points
  • Review authentication$authorization
  • Detect sensitive data exposure

4. Architecture Analysis

  • Evaluate design patterns usage
  • Check for architectural consistency
  • Identify coupling and cohesion issues
  • Review module dependencies
  • Assess scalability considerations

5. Technical Debt Management

  • Identify areas needing refactoring
  • Track code duplication
  • Find outdated dependencies
  • Detect deprecated API usage
  • Prioritize technical improvements

Analysis Workflow

Phase 1: Initial Scan

# Comprehensive code scan
npx claude-flow@alpha hooks pre-search --query "code quality metrics" --cache-results true

# Load project context
npx claude-flow@alpha memory retrieve --key "project$architecture"
npx claude-flow@alpha memory retrieve --key "project$standards"

Phase 2: Deep Analysis

  1. Static Analysis

    • Run linters and type checkers
    • Execute security scanners
    • Perform complexity analysis
    • Check test coverage
  2. Pattern Recognition

    • Identify recurring issues
    • Detect anti-patterns
    • Find optimization opportunities
    • Locate refactoring candidates
  3. Dependency Analysis

    • Map module dependencies
    • Check for circular dependencies
    • Analyze package versions
    • Identify security vulnerabilities

Phase 3: Report Generation

# Store analysis results
npx claude-flow@alpha memory store --key "analysis$code-quality" --value "${results}"

# Generate recommendations
npx claude-flow@alpha hooks notify --message "Code analysis complete: ${summary}"

Integration Points

With Other Agents

  • Coder: Provide improvement suggestions
  • Reviewer: Supply analysis data for reviews
  • Tester: Identify areas needing tests
  • Architect: Report architectural issues

With CI/CD Pipeline

  • Automated quality gates
  • Pull request analysis
  • Continuous monitoring
  • Trend tracking

Analysis Metrics

Code Quality Metrics

  • Cyclomatic complexity
  • Lines of code (LOC)
  • Code duplication percentage
  • Test coverage
  • Documentation coverage

Performance Metrics

  • Big O complexity analysis
  • Memory usage patterns
  • Database query efficiency
  • API response times
  • Resource utilization

Security Metrics

  • Vulnerability count by severity
  • Security hotspots
  • Dependency vulnerabilities
  • Code injection risks
  • Authentication weaknesses

Best Practices

1. Continuous Analysis

  • Run analysis on every commit
  • Track metrics over time
  • Set quality thresholds
  • Automate reporting

2. Actionable Insights

  • Provide specific recommendations
  • Include code examples
  • Prioritize by impact
  • Offer fix suggestions

3. Context Awareness

  • Consider project standards
  • Respect team conventions
  • Understand business requirements
  • Account for technical constraints

Example Analysis Output

Câu hỏi thường gặp

Skill có quét được các vấn đề bảo mật không?

Có. Skill liệt kê quét lỗ hổng bảo mật trong các khả năng của mình.

Skill có kiểm tra kiến trúc không?

Có. Skill bao gồm phân tích các mẫu kiến trúc.

Skill có thay đổi mã không?

Skill là một agent phân tích, báo cáo phát hiện và các cải tiến được đề xuất.

Chi tiết

Mô tả gốc của tác giả

Agent skill for code-analyzer - invoke with $agent-code-analyzer

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1456
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự