Code Quality Metrics

Measure code complexity, maintainability, and testability across multiple languages.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/shabaraba/shabaraba-cc-plugins --skill code-quality-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Code Quality Metrics
Source: https://github.com/shabaraba/shabaraba-cc-plugins/tree/main/packages/dev-org/skills/code-quality-metrics
Command: npx skills add https://github.com/shabaraba/shabaraba-cc-plugins --skill code-quality-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Code quality metrics provide objective measurements to identify maintenance risks and guide refactoring decisions.

Core Features & Use Cases

  • Complexity analysis: Cyclomatic, cognitive, and Halstead metrics to gauge complexity and effort.
  • Maintainability & thresholds: MI, LOC, and coupling metrics to establish quality gates across languages.
  • Cross-language applicability: Applies to TypeScript/JavaScript, Python, Java, Go, and more for consistent quality standards.

Quick Start

  • Install language-appropriate measurement tools (e.g., ESLint for JS/TS, Radon for Python, Checkstyle for Java) as described in references.
  • Run metrics analysis on your codebase and review thresholds to identify hotspots.
  • Integrate these checks into CI to enforce quality gates.

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 code complexity and maintainability across multiple languages?

Measure code complexity and maintainability across multiple languages by applying consistent quality standards using external analysis tools. Tools like ESLint for JavaScript and Radon for Python evaluate cyclomatic complexity, cognitive effort, and maintainability indices to identify maintenance risks.

What code quality metrics should I track to reveal maintenance risks?

Track cyclomatic complexity, cognitive complexity, Halstead metrics, and Maintainability Index (MI) to reveal maintenance risks. These code quality metrics gauge effort and complexity, while lines of code (LOC) and coupling metrics help establish quality gates for refactoring decisions.

Can I use SonarQube and ESLint to enforce code quality gates in CI?

Yes, you can use SonarQube and ESLint to enforce code quality gates in CI. Run metrics analysis on your codebase, review established thresholds to identify hotspots, and integrate these checks into your continuous integration pipeline to block high-risk code.

Does code quality analysis work for both Python and TypeScript projects?

Code quality analysis works for both Python and TypeScript projects, alongside Java and Go. It targets multiple languages to evaluate complexity, maintainability, and testability, applying cross-language applicability for consistent quality standards across your codebase.

How do I calculate cyclomatic and cognitive complexity for refactoring decisions?

Calculate cyclomatic and cognitive complexity for refactoring decisions by running external measurement tools like Radon or Checkstyle. These tools analyze your codebase to generate reports quantifying code quality, revealing maintenance risks and highlighting specific hotspots needing attention.