dotnet-cloc

Count and analyze .NET repository code footprint with cloc, producing JSON or YAML outputs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams quantify the size and composition of .NET codebases by using the open-source cloc tool to generate line counts, language mixes, and repository-wide metrics.

Core Features & Use Cases

  • Footprint reporting: produce C# production vs. test code, solution footprint, and diff statistics across refs.
  • Configurable scope: count bounded subtrees, exclude noisy directories, and filter languages relevant to .NET.
  • Repeatable outputs: generate machine-readable results (JSON, YAML, MD) for CI, docs, or governance.
  • Use Case: When you need a stable baseline or PR size assessment for a .NET repository.

Quick Start

Run cloc on your repository to generate a structured code-footprint report and capture the results in JSON or YAML.

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 for CI metrics?

You can count .NET code size by running cloc to produce structured line counts and language mix statistics. It generates machine-readable JSON or YAML outputs suitable for CI pipelines and governance reporting.

What is the best way to compare code footprint between git branches?

To compare code footprint across refs, apply cloc diff statistics to analyze branch differences in a .NET repository. This produces repeatable metrics showing production versus test code changes between branches.

Can I exclude noisy directories when measuring .NET solution footprint?

Yes, you can configure the repository scope to exclude noisy directories and filter languages relevant to .NET. This ensures accurate solution-level metrics by bounding subtrees and removing generated code noise.

How do I generate a language mix report for C# production and test code?

Generate a language mix report by running cloc on your .NET repository to separate C# production versus test code. The tool produces structured outputs in JSON, YAML, or MD formats for documentation and analysis.

Does cloc work with .NET CI workflows for PR size assessment?

Yes, cloc integrates into .NET CI workflows to provide PR size assessment and stable baselines. It produces machine-readable code-footprint reports that capture diff statistics and repository-wide metrics for automated pipelines.