c4model-c4

Identify code elements and compute complexity metrics for C4 component analysis.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Cubical6/melly --skill c4model-c4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: c4model-c4
Source: https://github.com/Cubical6/melly/tree/main/skills/c4model-c4
Command: npx skills add https://github.com/Cubical6/melly --skill c4model-c4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gaining a granular understanding of code elements (classes, functions, interfaces) within components, including their signatures, complexity, and relationships, is critical for deep analysis but extremely time-consuming and often overlooked.

Core Features & Use Cases

  • Code Element Identification: Automatically identifies classes, functions, async functions, interfaces, types, constants, and enums within specified components.
  • Signature Analysis: Extracts detailed signatures including parameters (name, type, optional), return types, and modifiers (async, generics, visibility).
  • Complexity Metrics Calculation: Computes Lines of Code (LOC), Cyclomatic Complexity, Cognitive Complexity, Parameter Count, and Nesting Depth for each code element.
  • Use Case: A team needs to identify high-complexity functions in a critical component to prioritize refactoring efforts. This skill can generate a C4-level report with complexity metrics, pinpointing areas that require immediate attention.

Quick Start

Analyze the 'user-service' component to identify its C4 code elements, their signatures, and complexity metrics.