azure-sdk-for-net
AGENTS.md6.1k starsChanged 8 months agoMITView on GitHub
This document provides guidelines for AI agents (e.g., GitHub Copilot, MCP-based assistants, LLM-based tools) working with the Azure SDK for .NET repository. It defines safe and effective patterns for agent interactions with this codebase, automation workflows, and development processes. The Azure SDK for .NET repository contains: - Data plane client Libraries: SDKs for interacting with Azure services at application runtime - Management plane Libraries: SDKs for provisioning and managing Azure resources - Code Generators: Tools that generate Azure Data Plane…
- Installs packages
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-net
- Azure/Azurite“Add support for Blob Batch operations”GitHub · Nov 26, 2019 · 33 reactions
- microsoft/DockerTools“Cannot authenticate using DefaultAzureCredential when running in container”GitHub · Jul 5, 2022 · 27 reactions
- NixOS/nixpkgs“.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization”GitHub · May 29, 2024 · 15 reactions
- dotnet/msbuild“Using ValueTuple with PackageReference on Azure Cloud Services”GitHub · Jul 27, 2018 · 15 reactions
- A Hacker News story“DocumentDB as not a service”Hacker News · Mar 9, 2015 · 2 points
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub, Bluesky and Hacker News (9 times).
On GitHub · 4
- Nov 26, 2019Add support for Blob Batch operations — Azure/Azurite33 reactions · 15 comments
- Jul 5, 2022Cannot authenticate using DefaultAzureCredential when running in container — microsoft/DockerTools27 reactions · 12 comments
- May 29, 2024.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization — NixOS/nixpkgs15 reactions · 29 comments
- Jul 27, 2018Using ValueTuple with PackageReference on Azure Cloud Services — dotnet/msbuild15 reactions · 8 comments
On Bluesky · 4
- Nov 27, 2024📦 Azure / azure-sdk-for-net ⭐ 5,492 (+1) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Oct 26, 2024📦 Azure / azure-sdk-for-net ⭐ 5,378 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Jun 14, 2024📦 Azure / azure-sdk-for-net ⭐ 5,089 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Apr 30, 2024📦 Azure / azure-sdk-for-net ⭐ 4,985 (+2) This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we… — @github-trending.bsky.social1 likes and repost
On Hacker News · 1
- Mar 9, 2015DocumentDB as not a service2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- agentic-workflowsSkill
- analyze-ci-failuresSkill
- auto-build-repairSkill
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- azure-sdk-mgmt-pr-reviewSkill
- csharp-azure-spector-coverage-gapsSkill
- dpg-migrationSkill
- find-package-skillSkill
- mgmt-review-comment-resolutionSkill
- mitigate-breaking-changesSkill
- ownersSkill
- pre-commit-checksSkill
- provisioning-library-generationSkill
- refresh-arm-sdk-releaseSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 1 is common, 3 are distinctive, and 8 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Common: line 55
Commit Secrets: Never commit credentials, API keys, or sensitive configuration
- Distinctive: line 59
Delete Test Coverage: Remove or disable existing tests unless explicitly instructed
- Distinctive: line 148
When making public API changes:
- Very specific: line 222
Client Libraries: Use $(RequiredTargetFrameworks) from eng/Directory.Build.Data.props
- Very specific: line 223
Management Libraries: Use $(SdkTargetFx) from AzSdk.reference.props
- Very specific: line 228
Ensure an <Update> reference with version exists in Packages.Data.props
- Very specific: line 229
Add <Include> reference without version in your .csproj
- Distinctive: line 235
Live Tests: Should be recorded using Azure.Core.TestFramework.
- Very specific: line 236
Test Categories: Use TestCategory!=Live filter to skip live tests
- Very specific: line 237
Code Coverage: Run with /p:CollectCoverage=true
- Very specific: line 247
CI Updates: Run eng/scripts/Update-Mgmt-CI.ps1 after adding management libraries
- Very specific: line 260
Use generate.cmd or generate.ps1 to regenerate
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Azure SDK for .NET - AI Agent Guidelines
This document provides guidelines for AI agents (e.g., GitHub Copilot, MCP-based assistants, LLM-based tools) working with the Azure SDK for .NET repository. It defines safe and effective patterns for agent interactions with this codebase, automation workflows, and development processes.
Repository Overview
Purpose and Scope
The Azure SDK for .NET repository contains:
- Data plane client Libraries: SDKs for interacting with Azure services at application runtime
- Management plane Libraries: SDKs for provisioning and managing Azure resources
- Code Generators: Tools that generate Azure Data Plane and Management Plane SDKs
- Build Infrastructure: Common engineering systems and tooling for SDK development
Repository Structure
/sdk # Individual Azure service SDKs
/eng/packages/http-client-csharp # Azure Data Plane SDK generator
/eng/packages/http-client-csharp-mgmt # Azure Management Plane SDK generator
/eng # Build, test, and automation infrastructure
/doc # DocumentationFor detailed developer instructions, see CONTRIBUTING.md.
Agent Interaction Guidelines
Supported Agent Actions
AI agents may assist with the following activities:
Code Development
- Reading and Understanding Code: Navigating source files, understanding SDK patterns, and explaining implementations
- Code Generation Support: Assisting with SDK code generation using AutoRest and TypeSpec
- Test Creation: Writing unit tests and integration tests following existing patterns
- Bug Fixes: Identifying and fixing issues in SDK code
- API Review: Preparing code for API reviews and ensuring adherence to design guidelines
Documentation
- README Updates: Improving SDK documentation and code samples
- Code Comments: Adding inline documentation
- Migration Guides: Creating guides for breaking changes
Automation and Workflows
- Build Verification: Running builds and interpreting results
- Test Execution: Running test suites and analyzing failures
- PR Triage: Summarizing changes and checking CI status
- Issue Analysis: Interpreting bug reports and feature requests
Safety Boundaries
AI agents must not:
- Commit Secrets: Never commit credentials, API keys, or sensitive configuration
- Bypass Security: Skip security checks or modify security-critical code without human review
- Auto-merge PRs: Merge pull requests without proper human approval
- Modify CI/CD Pipelines: Change GitHub Actions workflows without explicit permission
- Delete Test Coverage: Remove or disable existing tests unless explicitly instructed
- Break API Compatibility: Introduce breaking changes in GA libraries without explicit design approval
AI agents should be cautious when:
- Modifying generated code — never update generated code without running the generator to regenerate it
- Making changes to shared infrastructure in
/eng— never do this unless explicitly asked - Updating package dependencies (requires dependency management approval)
- Changing public APIs (requires API review)
Key Workflows
Building and Testing
Client Libraries
# Build a specific service
cd sdk/eventhub
dotnet build
# Run tests (live tests are excluded by default)
dotnet test
# Run tests (explicitly skip live tests)
dotnet test --filter TestCategory!=Live
# Build and test via service.proj
dotnet build eng/service.proj /p:ServiceDirectory=eventhub
dotnet test eng/service.proj /p:ServiceDirectory=eventhub --filter TestCategory!=LiveManagement Libraries
# Build a specific management library
msbuild eng/mgmt.proj /p:scope=Compute
# Run tests
msbuild eng/mgmt.proj /t:RunTests /p:scope=Compute
# Create NuGet package
msbuild eng/mgmt.proj /t:CreateNugetPackage /p:scope=ComputeFull Repository Build
# Build entire repository
dotnet build build.proj
# Build specific scope
dotnet build build.proj /p:Scope=servicebusCode Generation
Data Plane SDK Generation (AutoRest)
# Generate code for a data plane SDK
cd sdk/<service>/<project>/src
dotnet build /t:GenerateCode -v dAzure Generator (TypeSpec)
# Install dependencies
cd eng/packages/http-client-csharp
npm install
# Generate test projects
./eng/scripts/Generate.ps1Azure Management Generator
# Install dependencies
cd eng/packages/http-client-csharp-mgmt
npm install
# Generate test projects
./eng/scripts/Generate.ps1API Review and Public API Changes
When making public API changes:
# Export API for review
eng/scripts/Export-API.ps1 <service-directory>
# Example
eng/scripts/Export-API.ps1 tablesThis generates API listing files in the format: sdk/<service>/<project>/api/<project>.<framework>.cs
Updating Code Snippets
# Update snippets in markdown documentation
eng/scripts/Update-Snippets.ps1 <service-directory>
# Example
eng/scripts/Update-Snippets.ps1 keyvaultSDK Release Workflows
Check Package Release Readiness
# Verify package is ready for release
# Checks: API review status, changelog, package name approval, release date
CheckPackageReleaseReadiness -PackageName <package-name>Release Package
# Trigger release pipeline
ReleasePackage -PackageName <package-name> -Language dotnetPrepare Release
# Update version and changelog for release
./eng/common/scripts/Prepare-Release.ps1 <PackageName> [<ServiceDirectory>] [<ReleaseDate>]Development Prerequisites
Required Tools
- .NET 10.0.401 SDK (or higher within 10.0.* band)
- PowerShell 7+ for scripts and code generation
- Node.js 22.x.x for TypeSpec and code generation
- Git with proper line ending configuration (see Configuration section below)
Configuration
Line Endings
- Windows:
core.autocrlf=true(Checkout Windows-style, commit Unix-style) - Linux/macOS:
core.autocrlf=input(Checkout as-is, commit Unix-style)
Path Length (Windows)
Clone to short paths (e.g., C:\git) to avoid 260-character path limit. Paths in the repo are kept under 210 characters.
Common Patterns and Conventions
Package Naming
- Client Libraries:
Azure.<NamespaceGroup>.<ServiceName>(e.g.,Azure.Storage.Blobs. See the guidelines for approved group names) - Management Libraries:
Azure.ResourceManager.<ResourceProvider>(e.g.,Azure.ResourceManager.Compute) - Legacy Libraries:
Microsoft.Azure.*(previous generation; also includes current bridge/integration packages and libraries with unusual dependencies)
Target Frameworks
- Client Libraries: Use
$(RequiredTargetFrameworks)fromeng/Directory.Build.Data.props - Management Libraries: Use
$(SdkTargetFx)fromAzSdk.reference.props
Dependency Management
Package versions are centrally managed in eng/Packages.Data.props. When adding dependencies:
- Ensure an
<Update>reference with version exists inPackages.Data.props - Add
<Include>reference without version in your.csproj - Contact azuresdkengsysteam@microsoft.com for version changes
Testing Standards
- Unit Tests: Required for all code changes
- Live Tests: Should be recorded using Azure.Core.TestFramework. Note: Newer libraries based on System.ClientModel use the unbranded generator and Microsoft.ClientModel.TestFramework instead.
- Test Categories: Use
TestCategory!=Livefilter to skip live tests - Code Coverage: Run with
/p:CollectCoverage=true
Note: The AutoRest/TypeSpec code generation workflow described in this document applies primarily to HTTP/REST-based client libraries. AMQP or MQTT-based libraries (e.g., Event Hubs, Service Bus, SignalR) do not use this generation process and have different development patterns.
SDK-Specific Automation
Continuous Integration
- Client Libraries:
sdk/service/ci.ymlfiles define CI for each service - Management Libraries:
sdk/resourcemanager/ci.mgmt.ymlfor management plane - CI Updates: Run
eng/scripts/Update-Mgmt-CI.ps1after adding management libraries
API Compatibility Verification
GA libraries use ApiCompat tool to enforce API compatibility:
- Set
ApiCompatVersionproperty to last GA version - Tool automatically verifies no breaking changes on build
- Breaking changes fail CI for GA libraries
Generated Code
- Generated code resides in
Generated/folders - Customizations go in
Customizations/folders - Use
generate.cmdorgenerate.ps1to regenerate - Never manually edit generated code - fix the generator or add customizations
Source Link and Debugging
Libraries have source link enabled:
- Enable Microsoft Symbol Servers in Visual Studio
- Disable "Just My Code" to step into SDK code
- Useful for debugging Azure.Core and other dependencies
Agent-Specific Tools and MCP
MCP Server Requirements
To use MCP (Model Context Protocol) tool calls:
- PowerShell must be installed (Installation Guide)
- Restart IDE after installation to use MCP server
Available MCP Tools
CheckPackageReleaseReadiness: Verify package release readinessReleasePackage: Trigger package release pipelineazsdk_package_generate_code: Generate SDK from TypeSpec locallyazsdk_package_build_code: Build/compile SDK locally
See eng/common/instructions/azsdk-tools/ for detailed tool documentation.
Additional Resources
Key Documentation
- CONTRIBUTING.md: Complete contribution guide
- README.md: Repository overview and getting started
- Azure SDK Design Guidelines for .NET: Design principles
- Versioning: Versioning strategy
- Breaking Change Rules: Breaking change policy
Agent Instructions
This repository includes agent-specific instructions in .github/copilot-instructions.md for GitHub Copilot integration. For the most current Copilot-specific guidance, refer to:
.github/copilot-instructions.md
Community and Support
- GitHub Issues: Report bugs or request features
- Stack Overflow: Tag questions with
azureand.net - Gitter Chat: azure/azure-sdk-for-net
Security and Privacy
Reporting Security Issues
Never open public GitHub issues for security vulnerabilities. Report privately to:
- Email: secure@microsoft.com
- MSRC Portal: https://www.microsoft.com/msrc/faqs-report-an-issue
Data Collection and Telemetry
The Azure SDK collects telemetry by default:
- Disable per-client: Set
IsTelemetryEnabled=falsein client options - Disable globally: Set environment variable
AZURE_TELEMETRY_DISABLED=true - See Telemetry Guidelines
Code of Conduct
This project follows the Microsoft Open Source Code of Conduct.
For questions, contact opencode@microsoft.com.
License
This repository is licensed under the MIT License. See LICENSE.txt.
Note: This document follows the AGENTS.md standards for AI agent documentation in open source repositories.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

