dotnet/skills Library Examples: How to Install and Run Agent Skills

The dotnet/skills repository provides a catalog of plug-in skills that extend AI coding agents through self-contained Markdown files, which you can install via the skill-installer CLI or invoke directly from chat interfaces like Copilot and Claude.

The dotnet/skills repository is a curated marketplace of ready-to-run .NET knowledge designed to enhance coding agents such as GitHub Copilot, Claude, Codex, and Cursor. Unlike traditional libraries that require NuGet package references, dotnet/skills operates as a collection of data-only Markdown documents that agents parse and execute as MSBuild or shell commands. This guide provides concrete examples of how to install, configure, and run these skills using the actual source files from the repository.

Architecture and Key Components

Understanding the repository structure is essential before running your first skill. The dotnet/skills library organizes capabilities into three distinct layers:

  • Marketplace manifest – Located at .agents/plugins/marketplace.json, this JSON file tells agents where each plug-in lives and how to resolve skill definitions.
  • Plugin directories – Each domain (e.g., dotnet-msbuild, dotnet-nuget) resides in plugins/<plugin>/ and contains related skills.
  • Skill definitions – Individual capabilities are defined in plugins/<plugin>/skills/<skill-name>/SKILL.md files, which include front-matter metadata and executable command templates.

The SKILL.md files contain a YAML front-matter block (--- name: … description: … ---) followed by a "How to run" section that the agent executes verbatim on the host machine. Because skills are data-only, there is no compiled assembly to reference; you simply invoke the skill’s command line interface.

Installing Skills from dotnet/skills

Registering the Marketplace

Before installing individual skills, you must register the dotnet/skills marketplace with your agent. This enables discovery of all available plug-ins:


# For Codex CLI

codex plugin marketplace add dotnet/skills
codex plugin marketplace upgrade dotnet-agent-skills

For Copilot or Claude, use the chat interface command:

/plugin marketplace add dotnet/skills

Installing Individual Skills via CLI

The skill-installer tool allows you to install specific skills directly from the repository URL. For example, to install the MSBuild target-authoring guidance:

skill-installer install \
  https://github.com/dotnet/skills/tree/main/plugins/dotnet-msbuild/skills/target-authoring

This command downloads the skill definition from plugins/dotnet-msbuild/skills/target-authoring/SKILL.md and registers it locally.

Practical Usage Examples

Running Skills with the skill-installer CLI

Once installed, execute skills directly from your terminal. The following example runs the writing-mstest-tests skill to scaffold a new test project:

#!/usr/bin/env bash
skill-installer install \
  https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests

skill-installer run writing-mstest-tests \
  --project MyApp.csproj \
  --output tests/

The skill’s Markdown contains a PowerShell snippet that the installer forwards to pwsh, creating a skeleton MSTest project in the tests/ directory.

Invoking Skills from Copilot or Claude Chat

In chat-based agents, skills are triggered using the /skill run command followed by parameters defined in the skill's front-matter. To execute the target-authoring guidance:

/skill run target-authoring \
  --project MyApp.csproj \
  --append "$(CompileDependsOn);MyCodeGenTarget"

The agent performs three steps:

  1. Loads the target-authoring definition from plugins/dotnet-msbuild/skills/target-authoring/SKILL.md.
  2. Renders the command template found in the "How to run" section.
  3. Executes the generated MSBuild command on the host machine.

Programmatic Usage with Codex CLI

For automation pipelines using Codex, you can list and run skills after adding the marketplace:


# List available plugins and skills

codex plugins

# Run the convert-to-cpm skill (converts packages.config to PackageReference)

codex skill run convert-to-cpm \
  --solution MySolution.sln \
  --dry-run

Behind the scenes, Codex resolves the skill’s manifest entry in .agents/plugins/marketplace.json and executes the command described in plugins/dotnet-nuget/skills/convert-to-cpm/SKILL.md.

Embedding Skills in Automation Scripts

You can integrate dotnet/skills into CI/CD pipelines without AI agent intermediaries. The skills function as executable documentation:


# Install the NuGet conversion skill

skill-installer install \
  https://github.com/dotnet/skills/tree/main/plugins/dotnet-nuget/skills/convert-to-cpm

# Execute in dry-run mode for validation

skill-installer run convert-to-cpm \
  --solution MySolution.sln \
  --dry-run

Validation and Testing Infrastructure

The repository includes a validation harness for testing skills in continuous integration. Located at eng/skill-validator/src/SkillValidator.csproj, this .NET utility ensures that skills execute correctly against real project files. Maintainers use this tool to verify that commands in SKILL.md files produce valid MSBuild or NuGet operations before merging changes.

Summary

  • dotnet/skills is a data-only catalog where each capability is defined in a SKILL.md Markdown file rather than compiled code.
  • Register the marketplace via .agents/plugins/marketplace.json to enable skill discovery in Copilot, Claude, or Codex.
  • Install individual skills using skill-installer install <url> pointing to specific skill directories like plugins/dotnet-msbuild/skills/target-authoring/.
  • Execute skills via chat commands (/skill run), the skill-installer CLI, or automation scripts that process the Markdown command templates.
  • Reference the validator at eng/skill-validator/src/ when contributing new skills to ensure compatibility.

Frequently Asked Questions

Do I need to compile dotnet/skills as a NuGet package?

No. dotnet/skills is data-only and requires no compilation or assembly references. Skills are Markdown documents containing command templates that agents or the skill-installer CLI execute directly on your host machine. You do not add a NuGet reference; you invoke the skill's command line interface.

How do coding agents parse the skill definitions?

Agents read the SKILL.md files located in paths like plugins/<plugin>/skills/<skill-name>/SKILL.md. Each file contains a YAML front-matter block specifying the skill's name, description, and parameters, followed by a "How to run" section with executable commands. The agent parses the front-matter to build the UI and renders the command section verbatim for execution.

Can I run dotnet/skills without an AI agent?

Yes. While designed for agent integration, you can use the skill-installer CLI to install and run skills independently. This tool downloads the skill definition and executes the contained commands using your local .NET SDK, making it suitable for automation scripts and CI/CD pipelines that do not involve AI chat interfaces.

Where are the skill validation tests located?

The validation infrastructure resides in eng/skill-validator/src/SkillValidator.csproj. This project contains the test harness used by repository maintainers to verify that skills work correctly on continuous integration agents. It validates that the MSBuild and CLI commands defined in various SKILL.md files execute without errors on representative project files.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →