build-and-test

A guide for building and testing .NET projects in the Agent Framework repository. .NET is Microsoft's platform for building applications in languages such as C#.

In plain words
What is it for?
Use it to restore dependencies, build projects, run unit tests, select individual tests, and format .NET code.
Why use it?
It shows which projects can be tested locally and which commands verify builds, tests, and formatting without relying on unavailable external services.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/agent-framework/build-and-test
Any agent
npx skills add microsoft/agent-framework --skill build-and-test
Clone the repo
git clone --depth 1 https://github.com/microsoft/agent-framework

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.01596
Opus 5 $0.00013 $0.00798
Sonnet 5 $0.00005 $0.00319
Haiku 4.5 $0.00003 $0.00160

Measured 2d ago against content hash 72b9cf14edb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-and-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dotnet/.github/skills/build-and-test/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

  • Only UnitTest projects need to be run locally; IntegrationTests require external dependencies.
  • See ../project-structure/SKILL.md for project structure details.

Build, Test, and Lint Commands

# From dotnet/ directory
dotnet restore --tl:off   # Restore dependencies for all projects
dotnet build --tl:off     # Build all projects
dotnet test               # Run all tests
dotnet format             # Auto-fix formatting for all projects

# Build/test/format a specific project (preferred for isolated/internal changes)
dotnet build src/Microsoft.Agents.AI.<Package> --tl:off
dotnet test --project tests/Microsoft.Agents.AI.<Package>.UnitTests
dotnet format src/Microsoft.Agents.AI.<Package>

# Run a single test
# Replace the filter values with the appropriate assembly, namespace, class, and method names for the test you want to run and use * as a wildcard elsewhere, e.g. "/*/*/HttpClientTests/GetAsync_ReturnsSuccessStatusCode"
# Use `--ignore-exit-code 8` to avoid failing the build when no tests are found for some projects
dotnet test --filter-query "/<assemblyFilter>/<namespaceFilter>/<classFilter>/<methodFilter>" --ignore-exit-code 8

# Run unit tests only
# Use `--ignore-exit-code 8` to avoid failing the build when no tests are found for integration test projects
dotnet test --filter-query "/*UnitTests*/*/*/*" --ignore-exit-code 8

Use --tl:off when building to avoid flickering when running commands in the agent.

Speeding Up Builds and Testing

The full solution is large. Use these shortcuts:

Change type What to do
Isolated/Internal logic Build only the affected project and its *.UnitTests project. Fix issues, then build the full solution and run all unit tests.
Public API surface Build the full solution and run all unit tests immediately.

Example: Building a single code project for all target frameworks

# From dotnet/ directory
dotnet build ./src/Microsoft.Agents.AI.Abstractions

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 131 lines · 26 tokens per session scan A 72b9cf14edb5

Subscribe to this mod's changes

build-and-test is a skill published in the GitHub repository microsoft/agent-framework (13,222 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 1,596 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

swarmclaw

AI agent runtime and multi-agent orchestration platform. Teaches agents how to use SwarmClaw's 6 primitive tools, persistent memory, dreaming, delegation, connectors, credentials, and the skill system. Use when an agent is running on SwarmClaw and needs to understand the platform's capabilities.

swarmclawai/swarmclaw · 67 tokens

agent-collaboration

Use this skill when coordinating multiple AI agents. Covers multi-agent patterns, handoffs, and orchestration strategies.

ApexIQ/skillsmith · 27 tokens

crewai-multi-agent

Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies…

davila7/claude-code-templates · 61 tokens

company-product-context

Compiles comprehensive company product context from PDF documents, web research, and industry knowledge.

lofcz/LLMTornado · 20 tokens

codebase-context-extractor

This skill provides a comprehensive context extraction system for large codebases. It intelligently analyzes code structure, dependencies, and relationships to extract relevant context for understanding, debugging, or modifying code.

lofcz/LLMTornado · 42 tokens

deep-researcher

Performs comprehensive, multi-layered research on any topic with structured analysis and synthesis of information from multiple sources.

lofcz/LLMTornado · 27 tokens