How to Set Up a Local Development Environment for dotnet/skills: Step-by-Step Guide
To set up a local development environment for dotnet/skills, clone the repository, install the .NET 6 SDK version pinned in global.json, run dotnet restore, build the validator project at eng/skill-validator/src/skill-validator.csproj, and execute the test suite to verify your installation.
The dotnet/skills repository hosts a collection of "skill" plugins and a skill-validator engine that evaluates those plugins against real-world code scenarios. To contribute new skills or modify existing ones, you need a local environment that can compile the validator, parse plugin manifests, and run the extensive fixture-based tests. This guide covers the minimal, dependency-free setup using only the .NET SDK and repository scripts.
Prerequisites and Repository Architecture
Before executing build commands, understand the three-layer architecture that determines how components interact during local development.
The Three-Layer Architecture
The repository splits into three logical layers:
-
Plugin Packages – Each folder under
plugins/contains a self-contained skill (e.g.,dotnet11,dotnet-msbuild). These plugins expose aplugin.jsonmanifest and aSKILL.mddescription that the validator consumes. For example, thedotnet11skill defines its capabilities inplugins/dotnet11/skills/system-text-json-net11/SKILL.md. -
Skill-Validator Engine – The core command-line tool lives in
eng/skill-validator/. The entry point ateng/skill-validator/src/Program.csparses manifests, discovers external dependencies, and runs evaluation pipelines defined in the workflow files. The core orchestration logic resides ineng/skill-validator/src/Evaluate/EvaluateCommand.cs. -
Test Fixtures – Integration tests and mock code bases live under
tests/. These fixtures model scenarios like mock-usage-analysis and SIMD vectorization, allowing the validator to run realistic evaluations locally. An example fixture is located attests/dotnet-experimental/exp-mock-usage-analysis/well-placed-mocks/AppointmentSchedulerTests.cs.
SDK Version Requirements
The build system requires the .NET 6 SDK, with the specific version pinned in global.json at the repository root. Using the exact version ensures compatibility with the CI pipelines defined in .github/workflows/skill-validator.yml and the validator project itself.
Step-by-Step Local Development Setup
Follow these six steps to configure your environment. These steps rely only on the .NET SDK and repository scripts, avoiding external services or secrets.
Step 1: Clone the Repository
Download the source, workflows, and test data:
git clone https://github.com/dotnet/skills.git
cd skills
Step 2: Install the .NET 6 SDK
Install the SDK version specified in global.json. For example, using the official install script:
curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --version 6.0.400
Alternatively, use your system's package manager, ensuring the version matches the global.json specification.
Step 3: Restore NuGet Packages
From the repository root, restore dependencies for both the plugins and the validator engine:
dotnet restore
Step 4: Build the Skill-Validator Engine
Compile the command-line tool that drives evaluations:
dotnet build eng/skill-validator/src/skill-validator.csproj
This produces the validator executable that parses plugin.json manifests and executes evaluation pipelines.
Step 5: Run the Test Suite
Execute the extensive fixture-based tests to confirm your local environment mirrors CI behavior:
dotnet test tests/
This command runs the integration tests located in directories like tests/dotnet-experimental/, validating that the validator correctly processes the test fixtures.
Step 6: Validate a Single Skill Locally
Demonstrate the end-to-end flow by running the validator against a specific skill. This executes discovery, evaluation, and JSON result emission for a single plugin:
dotnet run --project eng/skill-validator/src/skill-validator.csproj -- evaluate --skill plugins/dotnet11
The validator reads the plugins/dotnet11/plugin.json manifest, locates the skill description, and outputs evaluation results to standard output.
Key Source Files for Troubleshooting
Understanding these files helps debug setup issues:
global.json– Pins the SDK version (e.g., 6.0.400) to ensure build consistency across environments.eng/skill-validator/src/Program.cs– The CLI entry point that initializes the validator.eng/skill-validator/src/Evaluate/EvaluateCommand.cs– Contains the core evaluation orchestration logic.plugins/dotnet11/plugin.json– Example manifest showing how skills declare dependencies and entry points..github/workflows/skill-validator.yml– Reference for the CI pipeline that builds and runs the validator on every pull request.
Summary
- Clone the dotnet/skills repository to access the plugin source, validator engine, and test fixtures.
- Install the .NET 6 SDK version specified in
global.jsonto match the build requirements. - Restore all dependencies with
dotnet restorebefore compiling any projects. - Build the skill-validator using
dotnet build eng/skill-validator/src/skill-validator.csprojto compile the evaluation engine. - Test your setup by running
dotnet test tests/to execute the fixture-based integration tests. - Validate individual skills using the CLI to verify the end-to-end evaluation pipeline works locally.
Frequently Asked Questions
What version of the .NET SDK is required to build dotnet/skills locally?
The repository requires the .NET 6 SDK, with the specific version pinned in global.json (typically 6.0.x). Using the exact version specified in this file ensures compatibility with the build scripts and the skill-validator project located in eng/skill-validator/src/.
Can I run a single skill evaluation without executing the full test suite?
Yes. After building the validator, you can target a specific plugin by running dotnet run --project eng/skill-validator/src/skill-validator.csproj -- evaluate --skill <path>. This command executes the discovery and evaluation pipeline defined in eng/skill-validator/src/Evaluate/EvaluateCommand.cs for that single skill without processing all test fixtures under tests/.
Where does the skill-validator store evaluation results when running locally?
By default, the validator emits JSON results to standard output. The evaluation logic in eng/skill-validator/src/Evaluate/EvaluateCommand.cs processes the plugin.json manifests and generates structured output that you can redirect to a file or pipe to downstream dashboards.
Do I need external services or secrets to set up the local development environment?
No. The setup relies only on the .NET SDK and repository scripts. All dependencies are restored via NuGet, and the test fixtures under tests/ (such as tests/dotnet-experimental/exp-mock-usage-analysis/well-placed-mocks/AppointmentSchedulerTests.cs) provide mock data for evaluations, eliminating the need for external services or configuration secrets.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →