code-metrics

Measure code quality metrics for JavaScript, Python, and Java projects.

Updated May 13, 2026
One-click install
npx skills add https://github.com/Mekann2904/mekann --skill code-metrics-mekann2904
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-metrics
Source: https://github.com/Mekann2904/mekann/tree/main/.pi/lib/skills/code-metrics
Command: npx skills add https://github.com/Mekann2904/mekann --skill code-metrics-mekann2904

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires eslint, radon, pmd, jscpd, coverage.py, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of objectively assessing and improving the quality of software code by providing quantitative metrics for complexity, cohesion, and test coverage.

Core Features & Use Cases

  • Complexity Analysis: Measures Cyclomatic and Cognitive Complexity to identify difficult-to-understand code sections.
  • Cohesion & Coupling: Analyzes fan-in/fan-out to understand dependencies and module cohesion.
  • Test Coverage: Reports on the percentage of code exercised by tests.
  • Code Duplication Detection: Identifies copy-pasted code segments.
  • Maintainability Index: Provides an overall score for code maintainability.
  • Use Case: A development team can use this skill to identify the riskiest modules in their codebase, prioritize refactoring efforts, and ensure new code meets quality standards before merging.

Quick Start

Analyze the code quality of the 'src/' directory using the code-metrics skill.

Frequently Asked Questions about code-metrics

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

FAQPage Schema
How do I measure code complexity and identify areas for refactoring?

Code duplication detection identifies copy-pasted code segments across JavaScript, Python, and Java projects. By utilizing tools like jscpd and PMD, it reports duplicated patterns to help teams reduce redundancy and maintain cleaner codebases.

Can I analyze code quality metrics for Python, JavaScript, and Java projects?

A maintainability index provides an overall score for code maintainability by combining complexity metrics and code coverage data. It helps teams objectively assess software health and track quality improvements over time.

Do I need ESLint and Radon installed to measure test coverage and cohesion?

Yes, you need dependencies like ESLint, Radon, PMD, and coverage.py installed. These tools are required to execute the analysis that reports on test coverage, cohesion, coupling, and code duplication metrics.

What is the best way to detect code duplication and measure coupling in my codebase?

The best way to detect code duplication and measure coupling is to run a comprehensive analysis using tools like jscpd and PMD. This identifies copy-pasted segments and evaluates fan-in and fan-out dependencies to understand module cohesion.