
Code Metrics Analysis
This is your standard code quality metrics toolkit wrapped up for Claude. It measures cyclomatic complexity, cognitive complexity, maintainability index, and code churn across TypeScript and Python codebases. You'd reach for this during code reviews, when setting up CI/CD quality gates, or when you need to justify refactoring that gnarly legacy module to your team lead. The reference guides cover practical implementations including radon integration for Python and ESLint plugins for JavaScript. One thing to appreciate here is the emphasis on tracking trends over time rather than obsessing over absolute numbers, which is the right mindset. Works best when you combine multiple metrics instead of fixating on a single complexity score.
- skills.sh installs
- 462
- GitHub stars
- 379
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill code-metrics-analysis --agent claude-codeInstalls into .claude/skills of the current project.
Files
Code Metrics Analysis
Table of Contents
Overview
Measure and analyze code quality metrics to identify complexity, maintainability issues, and areas for improvement.
When to Use
- Code quality assessment
- Identifying refactoring candidates
- Technical debt monitoring
- Code review automation
- CI/CD quality gates
- Team performance tracking
- Legacy code analysis
Quick Start
Minimal working example:
import * as ts from "typescript";
import * as fs from "fs";
interface ComplexityMetrics {
cyclomaticComplexity: number;
cognitiveComplexity: number;
linesOfCode: number;
functionCount: number;
classCount: number;
maxNestingDepth: number;
}
class CodeMetricsAnalyzer {
analyzeFile(filePath: string): ComplexityMetrics {
const sourceCode = fs.readFileSync(filePath, "utf-8");
const sourceFile = ts.createSourceFile(
filePath,
sourceCode,
ts.ScriptTarget.Latest,
true,
);
Sponsors
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- DevOps & CI/CD, Code Review & Quality, AI & Agent Building, Marketing & SEO
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Health Check Endpoints461
- Serverless Architecture461
- Transaction Management461
- Webhook Integration461
- Secrets Rotation459
- Runbook Creation458
- Deployment Documentation457
- Stored Procedures457
- Autoscaling Configuration456
- Profiling Optimization456
- Cpu Profiling455
- Security Documentation455
- Frontend Routing454
- Load Balancer Setup454
- Property Based Testing454
- Aws Rds Database453
- Log Aggregation453
- Documentation Site Setup452
- Monorepo Management451
- Retrospective Facilitation451
- Api Filtering Sorting450
- Cloud Migration Planning450
- Design Handoff450
- Git Hooks Setup450