code-quality-metrics

Measure code complexity and quality metrics across multi-language repositories.

6|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/archibate/archibate-skills --skill code-quality-metrics-archibate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality-metrics
Source: https://github.com/archibate/archibate-skills/tree/main/skills/code-quality-metrics
Command: npx skills add https://github.com/archibate/archibate-skills --skill code-quality-metrics-archibate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps teams and engineers quantify code maintainability and identify risky hotspots by measuring complexity, size, coupling, cohesion, and coverage so they can prioritize refactoring and enforce quality standards.

Core Features & Use Cases

  • Metric Definitions & Thresholds: Clear explanations and practical thresholds for cyclomatic complexity, cognitive complexity, Halstead metrics, maintainability index, LOC, coupling, and cohesion.
  • Tool Guidance: Concrete measurement commands and configuration examples for ESLint, SonarQube, Radon, gocyclo, Checkstyle, and CI integration.
  • Use Case: Use during code review or CI to generate actionable reports that highlight high-risk functions/classes and suggest refactoring targets.

Quick Start

Analyze the repository's source directory and produce a ranked report of files and functions by cyclomatic complexity, cognitive complexity, maintainability index, and recommended refactoring actions.

Frequently Asked Questions about code-quality-metrics

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

FAQPage Schema
How do I measure cyclomatic and cognitive complexity for my codebase?

Measure cyclomatic and cognitive complexity by running tools like radon, gocyclo, or ESLint configured with complexity rules against your source directory to generate ranked reports of high-risk functions and files.

What is a good maintainability index threshold for code review?

A good maintainability index threshold for code review typically falls below 65 to flag risky code. This Skill provides clear metric definitions and practical thresholds to identify refactoring targets during quality assessments.

Can I integrate SonarQube and ESLint complexity checks into CI pipelines?

Yes, you can integrate SonarQube and ESLint complexity checks into CI pipelines. This Skill provides concrete measurement commands and configuration examples for CI integration to produce actionable quality reports.

Does this approach work for multi-language repositories?

Yes, this approach works for multi-language repositories. It applies tool guidance for various ecosystems including ESLint, SonarQube, radon, and gocyclo to evaluate coupling, cohesion, and Halstead metrics across different codebases.

What is the difference between cyclomatic complexity and cognitive complexity?

Cyclomatic complexity counts linearly independent execution paths, while cognitive complexity measures how difficult code is for humans to read. This Skill explains both metrics and provides thresholds to prioritize refactoring effectively.

How do I identify refactoring targets using Halstead metrics and LOC?

Identify refactoring targets by analyzing Halstead metrics, LOC, coupling, and cohesion to pinpoint high-risk classes. Generate ranked reports during code review to suggest actionable refactoring actions for those hotspots.