complexity

Analyze C# workspace complexity hotspots with CC, LCOM4, and nesting depth metrics.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill complexity-darylmcd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: complexity
Source: https://github.com/darylmcd/Roslyn-Backed-MCP/tree/main/skills/complexity
Command: npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill complexity-darylmcd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complexity hotspot analysis helps identify and prioritize maintainability risks in a C# solution by locating complex methods, god classes, and high-risk patterns, enabling targeted refactoring.

Core Features & Use Cases

  • Detect high cyclomatic complexity and nesting depth across the workspace.
  • Identify god classes (LCOM4 > 1) and map shared member clusters for potential splitting.
  • Produce actionable refactoring plans and trend indicators for CI checks.

Quick Start

Run a complexity scan against the loaded workspace or specify an optional project name to scope the analysis.

Frequently Asked Questions about complexity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is LCOM4 and how does it identify god classes for refactoring?

To check cyclomatic complexity and nesting depth across a C# workspace, run a complexity scan using Roslyn MCP capabilities. It identifies maintainability hotspots and suggests targeted refactorings for complex methods.

What is LCOM4 and how does it identify god classes for refactoring?

LCOM4 is a cohesion metric used to identify god classes by measuring shared member clusters within a class. An LCOM4 value greater than 1 indicates low cohesion, suggesting the class should be split for better maintainability.

Can I scope complexity hotspot analysis to a specific C# project?

Yes, you can scope complexity hotspot analysis to a specific C# project by specifying an optional project name. This restricts the Roslyn MCP metrics collection and refactoring suggestions to that project's boundaries.

What's the best way to generate refactoring plans from C# maintainability metrics?

The best way to generate refactoring plans from C# maintainability metrics is to run an end-to-end complexity scan. It evaluates CC, LCOM4, and nesting depth to produce actionable refactoring plans and trend indicators for CI checks.

Do I need a Roslyn MCP server to detect complexity hotspots?

Yes, you need a Roslyn MCP server to detect complexity hotspots. The analysis relies on Roslyn MCP capabilities to perform server readiness checks and collect maintainability metrics directly from the loaded C# workspace.