code-analysis

Provides methodologies, metrics, and best practices for analyzing code structure, complexity, and quality

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-analysis" with this command: npx skills add bejranonda/llm-autonomous-agent-plugin-for-claude/bejranonda-llm-autonomous-agent-plugin-for-claude-code-analysis

Overview

This skill provides comprehensive knowledge for code analysis including complexity metrics, anti-pattern detection, refactoring strategies, and code quality assessment across multiple programming languages.

Complexity Metrics

Cyclomatic Complexity

  • Low: 1-10 (simple, easy to test)
  • Medium: 11-20 (moderate complexity, acceptable)
  • High: 21-50 (complex, needs refactoring)
  • Very High: 51+ (critical, must refactor)

Cognitive Complexity

Measures how difficult code is to understand based on nesting, control flow breaks, and recursion.

Code Smells to Detect

  • Long Methods: >50 lines
  • Large Classes: >300 lines
  • Duplicate Code: Repeated blocks
  • Long Parameter Lists: >5 parameters
  • Deep Nesting: >4 levels
  • God Objects: Classes doing too much
  • Dead Code: Unused functions/variables

Refactoring Strategies

  • Extract Method: Break long methods into smaller ones
  • Extract Class: Split large classes by responsibility
  • Replace Conditional with Polymorphism
  • Simplify Conditional Expressions
  • Remove Duplicate Code

When to Apply

Use when analyzing codebase structure, identifying refactoring opportunities, or assessing code quality.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

autonomous-development

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

pattern-learning

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

web-validation

No summary provided by upstream source.

Repository SourceNeeds Review