$npx skillfedfor your agent

cloc

cloc delivers line-count, language composition, and branch-diff statistics for .NET codebases through repeatable, configurable commands. Use it to measure solution footprint, compare code deltas across refs, and track codebase composition—not to assess developer productivity or replace design review.

cloc generates repeatable line-count and language-mix reports for .NET repositories with configurable scope and machine-readable output.

AI-generated summary based on this skill's SKILL.md

★ 463  35 MITupdated by managedcode

Decision gist · record as of 2026-07-25

cloc generates repeatable line-count and language-mix reports for .NET repositories with configurable scope and machine-readable output. cloc delivers line-count, language composition, and branch-diff statistics for .NET codebases through repeatable, configurable commands. Use it to measure solution footprint, compare code deltas across refs, and track codebase composition—not to assess developer productivity or replace design review.

manual: git clone https://github.com/managedcode/dotnet-skills → cp -r dotnet-skills/catalog/Tools/cloc/skills/cloc ~/.claude/skills/cloc
catalog/Tools/cloc/skills/cloc/SKILL.md · version d22a644d

Use it when

  • Yes.
  • cloc breaks down your .NET codebase by language—C#, XAML, JSON, XML, and others—reporting lines of code, comments, and blanks for each.

Verify before relying

Read SKILL.md below before installing (5 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

managedcode/dotnet-skills/cloc · repository language: C#

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I count lines of code in my C# project with cloc?

cloc scans your C# project and reports line counts by language, including code, comments, and blank lines. Run `cloc .` in your solution root to generate a summary table. cloc identifies .NET file types automatically and produces repeatable statistics suitable for tracking codebase size over time or across branches.

Can cloc compare code size and composition between Git branches?

Yes. cloc supports branch-diff analysis through `cloc --git-diff-main` or by comparing two refs directly. This lets you measure code deltas between branches or releases, showing which languages grew and by how much. Branch comparisons are useful for sizing decisions and understanding code composition shifts across development cycles.

What is cloc's language mix analysis for .NET solutions?

cloc breaks down your .NET codebase by language—C#, XAML, JSON, XML, and others—reporting lines of code, comments, and blanks for each. This composition view helps you understand solution footprint and identify dominant languages, making it easier to assess codebase complexity and plan maintenance or refactoring efforts.

How do I integrate cloc into my CI pipeline for automated reporting?

cloc outputs JSON, CSV, and plain text formats via command-line flags like `--json` and `--csv`. Pipe output to files in your CI job, then archive or publish results. This enables automated code statistics collection across builds, letting you track metrics over time and detect unexpected code growth or composition changes.

Can cloc exclude bin and obj directories from .NET line counts?

cloc respects `.gitignore` rules and excludes common build artifacts by default, including bin and obj folders. You can also use `--exclude-dir` to skip specific directories. This ensures your line counts reflect source code only, not compiled or generated output, for accurate footprint measurement.

What does cloc measure and what should it not be used for?

cloc delivers repeatable line-count, language composition, and branch-diff statistics for .NET codebases. Use it to measure solution footprint, compare code deltas, and track codebase composition. Do not use cloc to assess developer productivity or replace design review—line counts alone do not reflect code quality or effort.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

CLOC for .NET Repositories

Trigger On

  • the repo wants cloc
  • the team needs repeatable LOC, language, or branch diff statistics for a .NET repo
  • the user asks about C# codebase size, solution composition, or code-count deltas between refs

Value

  • produce a concrete project delta: code, docs, config, tests, CI, or review artifact
  • reduce ambiguity through explicit planning, verification, and final validation skills
  • leave reusable project context so future tasks are faster and safer

Do Not

(truncated - see the full file via the links below)

File tree — 5 files
catalog/Tools/cloc/skills/cloc/SKILL.md
catalog/Tools/cloc/skills/cloc/manifest.json
catalog/Tools/cloc/skills/cloc/references/cloc.md
catalog/Tools/cloc/skills/cloc/references/commands.md
catalog/Tools/cloc/skills/cloc/references/examples.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Generate repeatable line-count and language-mix reports for .NET repositories”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

csharpier
by managedcode · managedcode/dotnet-skills

CSharpier establishes a single, opinionated formatting standard for C# and XML in .NET projects. It detects current formatter state, installs the tool locally for reproducible CI, and documents ownership to avoid conflicts with dotnet format. Use this when your team values consistent formatting decisions over extensive configuration options.

MITupdated Jul 2026
★ 463repo stars
format
by managedcode · managedcode/dotnet-skills

format configures the SDK-provided dotnet format tool for .NET projects, enabling reproducible code formatting and analyzer fixes across local and CI environments. It respects .editorconfig as the source of truth for style preferences and helps avoid formatter conflicts by clarifying ownership when multiple tools are in use.

MITupdated Jul 2026
★ 463repo stars
meziantou-analyzer
by managedcode · managedcode/dotnet-skills

This skill installs and configures Meziantou.Analyzer, a comprehensive rule set for .NET codebases covering design, usage, security, performance, and style concerns. It manages package setup, severity configuration in `.editorconfig`, and avoids duplication with SDK or Roslynator analyzers. Use it when your team wants broader diagnostic coverage without managing multiple analyzer packages.

MITupdated Jul 2026
★ 463repo stars
complexity
by managedcode · managedcode/dotnet-skills

complexity sets up .NET's built-in maintainability analyzers to enforce cyclomatic complexity and coupling limits across your codebase. It configures CA1502, CA1505, and CA1506 rules in .editorconfig and CodeMetricsConfig.txt, then validates thresholds through the build pipeline.

MITupdated Jul 2026
★ 463repo stars
analyzer-config
by managedcode · managedcode/dotnet-skills

This skill establishes a single source of truth for .NET analyzer severity and code-style rules by creating or normalizing a repo-root .editorconfig file. It detects your current configuration state, structures rule ownership explicitly, and validates that settings are reproducible across local and CI builds.

MITupdated Jul 2026
★ 463repo stars
resharper-clt
by managedcode · managedcode/dotnet-skills

This skill deploys the free JetBrains ReSharper Command Line Tools to inspect and refactor .NET repositories using `jb inspectcode` and `jb cleanupcode`. It manages durable team settings through solution-level configuration, enforces quality gates by surfacing and fixing issues rather than ignoring them, and integrates with your build and test pipeline.

MITupdated Jul 2026
★ 463repo stars

More skills msvc-cl (MIT) · roslynator (MIT)

Tags
code-metricsrepository-analysiscodebase-sizingbranch-comparisondotnet-toolingci-integrationlanguage-breakdownrefactoring-baselineproject-footprintautomated-reporting