smithery.ai

code-analysis

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

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,411 B
  • docs SUMMARY.md 126 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

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.