Agent skill

GitVersion .NET Development

by GitTools in GitTools/GitVersion

Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

MITAuto-check passedDevelopment

Install GitVersion .NET Development

skills CLI
$ npx skills add GitTools/GitVersion --skill dotnet-dev -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install GitTools/GitVersion dotnet-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/GitTools/GitVersion.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/dotnet-dev .claude/skills/dotnet-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dotnet-dev
GitHub stars
3.1k
Token cost
~1.7k tokens
SKILL.md length
299 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

  • Works in 4 steps: When adding new public APIs, they… → When modifying existing APIs, move the… → Only remove entries from… → …
  • Building and testing the GitVersion solution
  • SKILL.md covers Build & Test Commands, Package Management, Project Structure and Coding Conventions, plus 5 more sections
  • Calls dotnet

What it does

The skill is tied to the GitVersion repository. It lists the `dotnet build` and test commands for the `src` solution, explains that package versions are managed centrally in `src/Directory.Packages.props` rather than in individual project files, and shows how to add a package while keeping the version central.

It also maps the repository: `src` for production code and tests, `new-cli` as a separate solution, `build` for Cake-based automation and `docs`, plus a table of key projects such as the core version calculation, the CLI app, configuration, output formatters, build agents, MSBuild integration and the Git abstraction layer. Coding conventions cover primary constructors with readonly fields, constructor injection with logger dependencies, Microsoft.Extensions.Logging with Serilog, and explicit handling of nullable reference types.

When your agent uses it

  • Building and testing the GitVersion solution
  • Adding or updating a package under central package management
  • Finding which GitVersion project owns a piece of behavior
  • Writing C# that follows the repository's constructor and logging conventions

Example prompts

  • “Build the GitVersion solution and run its tests.”
  • “Add a new package to the output project and set its version the way this repo expects.”
  • “Which project handles the CI build agent integrations?”

Requirements

  • .NET SDK able to build `src/GitVersion.slnx`

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. When adding new public APIs, they automatically get flagged and should be added to PublicAPI.Unshipped.txt
  2. When modifying existing APIs, move the old entry from PublicAPI.Shipped.txt to PublicAPI.Unshipped.txt (marked as
  3. Only remove entries from PublicAPI.Shipped.txt when an API is being deleted
  4. During release, unshipped APIs get moved to shipped via the mark-shipped.ps1 script

What it can do on your machine

Read from SKILL.md and the folder at commit 92e2456. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitVersion .NET Development loads about 1.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 299 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from GitTools/GitVersion at commit 92e2456, republished under its MIT licence (© GitTools). 299 words, ~1,720 tokens.

Download SKILL.mdSave it as .claude/skills/dotnet-dev/SKILL.md (or your agent's skills folder).
name
dotnet-dev
description
Expert guidance for .NET development in this repository. Use this skill for building, testing, debugging, and understanding project structure, coding conventions, dependency injection patterns, and testing practices.

.NET Development Skills

Expert guidance for .NET development in this repository.

Build & Test Commands

bash
# Build the solution
dotnet build ./src/GitVersion.slnx

# Build a single project
dotnet build --project ./src/GitVersion.Core/GitVersion.Core.csproj

# Run all tests
dotnet test --solution ./src/GitVersion.slnx

# Run tests for a specific project
dotnet test --project ./src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj

# Run tests with specific framework
dotnet test --project ./src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj --framework net10.0

# Run specific test by filter
dotnet test --project ./src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj --filter "FullyQualifiedName~TestClassName"

# Format code
dotnet format ./src/GitVersion.slnx

# Verify formatting (CI-friendly)
dotnet format --verify-no-changes ./src/GitVersion.slnx

Package Management

This repository uses Central Package Management via Directory.Packages.props.

Adding/Updating Packages
bash
# Add a package (version managed centrally)
dotnet add ./src/ProjectName/ProjectName.csproj package PackageName

# Update central package version in src/Directory.Packages.props

Important: Always update versions in src/Directory.Packages.props, not in individual .csproj files.

Directory.Packages.props Structure
xml

<Project>
    <PropertyGroup>
        <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
    </PropertyGroup>
    <ItemGroup>
        <PackageVersion Include="PackageName" Version="1.0.0" />
    </ItemGroup>
</Project>

Project Structure

  • src/ - Main solution with production code and tests
  • new-cli/ - New CLI implementation (separate solution)
  • build/ - Build automation (Cake-based)
  • docs/ - Documentation
Key Projects
ProjectPurpose
GitVersion.CoreCore version calculation logic
GitVersion.AppCLI application
GitVersion.ConfigurationConfiguration file handling
GitVersion.OutputOutput formatters (JSON, BuildServer)
GitVersion.BuildAgentsCI/CD platform integrations
GitVersion.MsBuildMSBuild task integration
GitVersion.LibGit2SharpGit repository abstraction

Coding Conventions

Primary Constructors

Prefer primary constructors with readonly field assignments:

csharp
internal class BuildAgentResolver(IEnumerable<IBuildAgent> buildAgents, ILogger<BuildAgentResolver> logger) : IBuildAgentResolver
{
    private readonly IEnumerable<IBuildAgent> buildAgents = buildAgents.NotNull();
    private readonly ILogger<BuildAgentResolver> logger = logger.NotNull();

    public IBuildAgent? Resolve()
    {
        // Use this.buildAgents and this.logger
    }
}
Dependency Injection

Use constructor injection with ILogger<T> for logging:

csharp
public class MyService
{
    private readonly ILogger<MyService> logger;

    public MyService(ILogger<MyService> logger)
    {
        this.logger = logger;
    }
}
Logging

Use Microsoft.Extensions.Logging with Serilog:

csharp
// Information level
this.logger.LogInformation("Processing {BranchName}", branch.Name);

// Warning level
this.logger.LogWarning("Configuration not found, using defaults");

// Error level
this.logger.LogError(ex, "Failed to calculate version");

// Debug level (verbose)
this.logger.LogDebug("Cache hit for {CacheKey}", key);
Nullable Reference Types

All projects use nullable reference types. Handle nullability explicitly:

csharp
public string? OptionalProperty { get; set; }

public string RequiredProperty { get; set; } = string.Empty;
File-Scoped Namespaces

Use file-scoped namespaces:

csharp
namespace GitVersion;

public class MyClass
{
    // ...
}

Testing

Test Project Naming
  • Test projects mirror source projects: GitVersion.Core → GitVersion.Core.Tests
Test Frameworks
  • NUnit - Primary test framework
  • NSubstitute - Mocking framework
  • Shouldly - Assertion library
Test Patterns
csharp
[TestFixture]
public class MyServiceTests
{
    [Test]
    public void MethodName_Scenario_ExpectedResult()
    {
        // Arrange
        var service = new MyService();

        // Act
        var result = service.DoSomething();

        // Assert
        result.ShouldBe(expected);
    }

    [TestCase("input1", "expected1")]
    [TestCase("input2", "expected2")]
    public void MethodName_WithParameters_ReturnsExpected(string input, string expected)
    {
        var result = service.Process(input);
        result.ShouldBe(expected);
    }
}

Configuration Files

Supported Names
  • GitVersion.yml
  • GitVersion.yaml
  • .GitVersion.yml
  • .GitVersion.yaml
Schema Location

JSON schemas are in schemas/ directory for validation.

Build Agents

Build agent integrations write environment variables with GitVersion_ prefix:

csharp
// Example: GitHub Actions
Environment.SetEnvironmentVariable($"GitVersion_{name}", value);

Common Tasks

Running the CLI Locally
bash
dotnet run --project src/GitVersion.App
Debugging Tests
bash
# Run with detailed output
dotnet test --project ./src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj -v detailed

# Run specific test
dotnet test --filter "FullyQualifiedName=GitVersion.Core.Tests.MyTest"
Checking for Errors
bash
# Build with warnings as errors
dotnet build ./src/GitVersion.slnx -warnaserror

Public API Management

This repository uses Microsoft.CodeAnalysis.PublicApiAnalyzers to track public API surface.

Rules
  • PublicAPI.Unshipped.txt: All new or modified public APIs go here
  • PublicAPI.Shipped.txt: Only deletions are allowed; never add or modify entries directly
Workflow
  1. When adding new public APIs, they automatically get flagged and should be added to PublicAPI.Unshipped.txt
  2. When modifying existing APIs, move the old entry from PublicAPI.Shipped.txt to PublicAPI.Unshipped.txt (marked as removed) and add the new signature to PublicAPI.Unshipped.txt
  3. Only remove entries from PublicAPI.Shipped.txt when an API is being deleted
  4. During release, unshipped APIs get moved to shipped via the mark-shipped.ps1 script

© GitTools, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/dotnet-dev of GitTools/GitVersion.

Open the folder on GitHubat commit 92e2456

Compare with similar skills

GitVersion .NET Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitVersion .NET Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitVersion .NET Development this skillGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT
Akka.Hosting Actor PatternsAaronontheweb/dotnet-skills1.2k1 repos~5kAutomated safety check: PassMIT
Git HooksProrise-cool/Claude-Code-Multi-Agent305—~3.6kAutomated safety check: NotesNone
Update Dotty Docsnewrelic/newrelic-dotnet-agent117—~2.1kAutomated safety check: PassApache-2.0
Dotnet Patternsaffaan-m/ECC275k1 repos~2.3kAutomated safety check: PassMIT
Dotnet Best Practicesgithub/awesome-copilot40k3 repos~808Automated safety check: PassMIT

Similar skills

  • Akka.Hosting Actor Patterns

    Aaronontheweb/dotnet-skills

    Shows how to build entity actors with Akka.Hosting so the same code runs in local unit tests and in a sharded cluster in production.

    1.2k GitHub starsUsed in 1 repo~5k tokens
    DevelopmentAuto-check passed
  • Git Hooks

    Prorise-cool/Claude-Code-Multi-Agent

    Central authority on git hook implementations, modern best practices, and tooling for .NET/C, JavaScript/TypeScript, Python, and polyglot repositories.

    305 GitHub stars~3.6k tokensUpdated 22 days ago
    DevelopmentAuto-check: notes
  • Update Dotty Docs

    newrelic/newrelic-dotnet-agent

    A skill your agent uses when the user mentions a Dotty PR, dotty (package/dependency) updates, or asks to update the .NET agent compatibility docs / net-agent-compatibility-requirements after tested…

    117 GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Dotnet Patterns

    affaan-m/ECC

    Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.

    275k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Dotnet Best Practices

    github/awesome-copilot

    Official

    Ensure .NET/C code meets best practices for the solution/project.

    40k GitHub starsUsed in 3 repos~808 tokens
    DevelopmentAuto-check passed
  • Dotnet Design Pattern Review

    github/awesome-copilot

    Official

    Review the C/.NET code for design pattern implementation and suggest improvements.

    40k GitHub starsUsed in 3 repos~821 tokens
    DevelopmentAuto-check passed

More from GitTools/GitVersion

  • Semantic Code Search

    GitTools/GitVersion

    Searches a codebase by meaning with the jbcontext CLI when you do not know which file or symbol holds the behavior you are looking for.

    3.1k GitHub stars~465 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about GitVersion .NET Development

What does GitVersion .NET Development do?

Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions. The skill is tied to the GitVersion repository.props` rather than in individual project files, and shows how to add a package while keeping the version central.

When should I use GitVersion .NET Development?

GitVersion .NET Development fits situations like: building and testing the GitVersion solution; adding or updating a package under central package management; finding which GitVersion project owns a piece of behavior; writing C# that follows the repository's constructor and logging conventions.

How do I install GitVersion .NET Development in Claude Code?

Run `npx skills add GitTools/GitVersion --skill dotnet-dev -a claude-code`. Or copy the skill folder (.github/skills/dotnet-dev in GitTools/GitVersion) into .claude/skills/dotnet-dev in your project. Claude Code loads it when a task matches its description.

How do I install GitVersion .NET Development in Codex?

Run `npx skills add GitTools/GitVersion --skill dotnet-dev -a codex`. Or copy the skill folder (.github/skills/dotnet-dev in GitTools/GitVersion) into .agents/skills/dotnet-dev in your project. Codex loads it when a task matches its description.

Can I use GitVersion .NET Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GitTools/GitVersion --skill dotnet-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-dev, .gemini/skills/dotnet-dev, .github/skills/dotnet-dev and .opencode/skills/dotnet-dev in your project.

What does GitVersion .NET Development need to run?

Going by SKILL.md and its folder, GitVersion .NET Development needs the command-line tools its instructions call (dotnet). Our summary lists: .NET SDK able to build `src/GitVersion.slnx`.

Does GitVersion .NET Development access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is GitVersion .NET Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does GitVersion .NET Development use?

GitVersion .NET Development is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitVersion .NET Development use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GitVersion .NET Development?

Skills that share tags, products or a category with GitVersion .NET Development: Akka.Hosting Actor Patterns (Aaronontheweb/dotnet-skills, 1.2k stars), Git Hooks (Prorise-cool/Claude-Code-Multi-Agent, 305 stars), Update Dotty Docs (newrelic/newrelic-dotnet-agent, 117 stars) and Dotnet Patterns (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitVersion .NET Development?

GitTools (a GitHub organization) maintains it in GitTools/GitVersion, which has 3,149 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: GitTools/GitVersion on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.