aidd-churn

Identify high-risk Git files by LoC, churn, and cyclomatic complexity.

377|33|Updated Jul 3, 2025
One-click install
npx skills add https://github.com/paralleldrive/aidd --skill aidd-churn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aidd-churn
Source: https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-churn
Command: npx skills add https://github.com/paralleldrive/aidd --skill aidd-churn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill analyzes code files to identify those with the highest risk of future defects based on their size, change frequency, and complexity, helping developers prioritize their refactoring and review efforts.

Core Features & Use Cases

  • Hotspot Analysis: Scores files by combining their lines of code (LoC), churn (commit count), and cyclomatic complexity.
  • Risk Prioritization: Provides a ranked list of files to review or refactor first.
  • Use Case: Before starting a large code change or code review, use this Skill to quickly identify the files most likely to contain defects.

Quick Start

Run the command 'npx aidd churn' to get a list of the top files with the highest risk scores.

Frequently Asked Questions about aidd-churn

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

FAQPage Schema
How do I identify high-risk code hotspots in a Git repository?

You can identify high-risk code hotspots by running 'npx aidd churn', which analyzes lines of code, commit churn, and cyclomatic complexity to output a ranked list of files for review and refactoring.

How does code churn and cyclomatic complexity help prioritize refactoring?

Code churn and cyclomatic complexity help prioritize refactoring by scoring files based on their change frequency and structural complexity, identifying the areas most likely to contain future defects.

Do I need Node.js to run code churn analysis on my repository?

Yes, you need Node.js 16 or higher and an existing Git repository to run the code churn analysis and generate the ranked list of risky files.

What is the best way to find files with the highest risk of future defects?

The best way to find files with the highest risk of future defects is to use hotspot analysis, which combines size, change frequency, and complexity metrics to rank files for targeted review.

When should I use code hotspot detection before a large code change?

You should use code hotspot detection before a large code change or code review to quickly identify the most complex and frequently modified files, ensuring your refactoring efforts target the highest risk areas.