dotnet-cloc

Measure lines of code and language mix in .NET repositories with cloc.

466|35|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/managedcode/dotnet-skills --skill dotnet-cloc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-cloc
Source: https://github.com/managedcode/dotnet-skills/tree/main/skills/dotnet-cloc
Command: npx skills add https://github.com/managedcode/dotnet-skills --skill dotnet-cloc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides precise line-count, language-mix, and branch-to-branch statistics for .NET codebases, helping to understand code size, composition, and changes over time.

Core Features & Use Cases

  • Codebase Metrics: Generate reports on lines of code (LOC), blank lines, and comment lines.
  • Language Analysis: Detail the mix of languages within a repository (e.g., C#, MSBuild, JSON, YAML).
  • Change Tracking: Compare code size and composition between different Git branches or commits.
  • Use Case: Before a major refactor, use this Skill to establish a baseline code size and then compare it after the refactor to quantify the impact.

Quick Start

Use the dotnet-cloc skill to count the C# lines of code in the current repository.

Frequently Asked Questions about dotnet-cloc

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

FAQPage Schema
How do I count lines of code in a .NET repository?

Count lines of code in a .NET repository by running the cloc tool to measure total LOC, blank lines, and comment lines across the entire codebase. This generates detailed footprint analysis and solution composition reports for local workflows and CI.

Can I compare lines of code between Git branches in .NET?

Compare lines of code between Git branches in .NET using branch-to-branch LOC comparison and diff statistics. This tracks code size and composition changes across different commits or branches to quantify the impact of refactoring.

Do I need cloc installed to analyze my .NET codebase metrics?

You need the cloc tool installed to analyze .NET codebase metrics, as the Skill requires this dependency to function. It respects repository-specific agent commands while measuring code size, language mix, and diff statistics.

What languages does .NET codebase analysis support for composition reporting?

Codebase analysis supports composition reporting for the language mix within .NET repositories, detailing languages such as C#, MSBuild, JSON, and YAML. It provides a breakdown of lines of code distributed across each detected language.

How do I establish a baseline code size before a major .NET refactor?

Establish a baseline code size before a major .NET refactor by measuring lines of code and language mix in your repository, then comparing these metrics after the refactor to quantify the impact and track changes over time.