Official agent skill

Azure Resource Manager Cosmosdb Dotnet

by microsoft in microsoft/skills

Azure Resource Manager SDK for Cosmos DB in .NET. An agent skill from microsoft/skills.

OfficialMITAuto-check passedBackend & APIs

Install Azure Resource Manager Cosmosdb Dotnet

skills CLI
$ npx skills add microsoft/skills --skill azure-resource-manager-cosmosdb-dotnet -a claude-code

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

GitHub CLI
$ gh skill install microsoft/skills azure-resource-manager-cosmosdb-dotnet --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/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-cosmosdb-dotnet .claude/skills/azure-resource-manager-cosmosdb-dotnet && 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
azure-resource-manager-cosmosdb-dotnet
GitHub stars
3.1k
Used in
5 other repos
Token cost
~2.1k tokens
SKILL.md length
231 words
Files
4 (incl. references)
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Azure Resource Manager SDK for Cosmos DB in .NET. An agent skill from microsoft/skills.

  • Works in 5 steps: Create Cosmos DB Account → Create SQL Database → Create SQL Container → …
  • MANAGEMENT PLANE operations: creating/managing Cosmos DB accounts
  • SKILL.md covers Installation, Environment Variables, Authentication and Resource Hierarchy, plus 6 more sections
  • Calls dotnet; reaches learn.microsoft.com; needs AZURE_TOKEN_CREDENTIALS and AZURE_CLIENT_SECRET

What it does

Azure Resource Manager Cosmosdb Dotnet is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Resource Manager SDK for Cosmos DB in .NET. Use for MANAGEMENT PLANE operations: creating/managing Cosmos DB accounts, databases, containers, throughput settings, and RBAC via Azure Resource Manager. NOT for data plane operations (CRUD on documents) - use Microsoft.Azure.Cosmos for that. Triggers: "Cosmos DB account", "create Cosmos account", "manage Cosmos resources", "ARM Cosmos", "CosmosDBAccountResource", "provision Cosmos DB".

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/account-management.md`, `references/sql-resources.md` and `references/throughput.md`).

It sits in Backend & APIs, covering Authorization and RBAC. It works with Microsoft Azure, Azure Cosmos DB, .NET and SQL. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.

When your agent uses it

  • MANAGEMENT PLANE operations: creating/managing Cosmos DB accounts
  • Throughput settings
  • RBAC via Azure Resource Manager

Example prompts

  • “Cosmos DB account”
  • “create Cosmos account”
  • “manage Cosmos resources”
  • “/azure-resource-manager-cosmosdb-dotnet”

Requirements

  • A credential in AZURE_CLIENT_SECRET

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Create Cosmos DB Account
  2. Create SQL Database
  3. Create SQL Container
  4. Configure Throughput
  5. Get Connection Information

What it can do on your machine

Read from SKILL.md and the folder at commit 3898ec8. 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

    Hosts in commands or code, which the agent is likely to contact:

    • learn.microsoft.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_TOKEN_CREDENTIALS
    • AZURE_CLIENT_SECRET

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

Context cost

Azure Resource Manager Cosmosdb Dotnet loads about 2.1k tokens when it runs, and up to ~8.5k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 231 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.5k

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 microsoft/skills at commit 3898ec8, republished under its MIT licence (© microsoft). 231 words, ~2,137 tokens.

Download SKILL.mdSave it as .claude/skills/azure-resource-manager-cosmosdb-dotnet/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
azure-resource-manager-cosmosdb-dotnet
description
Azure Resource Manager SDK for Cosmos DB in .NET. Use for MANAGEMENT PLANE operations: creating/managing Cosmos DB accounts, databases, containers, throughput settings, and RBAC via Azure Resource Manager. NOT for data plane operations (CRUD on documents) - use Microsoft.Azure.Cosmos for that. Triggers: "Cosmos DB account", "create Cosmos account", "manage Cosmos resources", "ARM Cosmos", "CosmosDBAccountResource", "provision Cosmos DB".
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
Azure.ResourceManager.CosmosDB

Azure.ResourceManager.CosmosDB (.NET)

Management plane SDK for provisioning and managing Azure Cosmos DB resources via Azure Resource Manager.

⚠️ Management vs Data Plane

  • This SDK (Azure.ResourceManager.CosmosDB): Create accounts, databases, containers, configure throughput, manage RBAC
  • Data Plane SDK (Microsoft.Azure.Cosmos): CRUD operations on documents, queries, stored procedures execution

Installation

bash
dotnet add package Azure.ResourceManager.CosmosDB
dotnet add package Azure.Identity

Current Versions: Stable v1.4.0, Preview v1.4.0-beta.13

Environment Variables

bash
AZURE_SUBSCRIPTION_ID=<your-subscription-id> # Required: Azure subscription ID
AZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production
AZURE_TENANT_ID=<tenant-id> # For service principal auth (optional)
AZURE_CLIENT_ID=<client-id> # For service principal auth (optional)
AZURE_CLIENT_SECRET=<client-secret> # For service principal auth (optional)

Authentication

csharp
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.CosmosDB;

// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
var credential = new DefaultAzureCredential(
    DefaultAzureCredential.DefaultEnvironmentVariableName
);
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes
// var credential = new ManagedIdentityCredential();
var armClient = new ArmClient(credential);

// Get subscription
var subscriptionId = Environment.GetEnvironmentVariable("AZURE_SUBSCRIPTION_ID");
var subscription = armClient.GetSubscriptionResource(
    new ResourceIdentifier($"/subscriptions/{subscriptionId}"));

Resource Hierarchy

ArmClient
└── SubscriptionResource
    └── ResourceGroupResource
        └── CosmosDBAccountResource
            ├── CosmosDBSqlDatabaseResource
            │   └── CosmosDBSqlContainerResource
            │       ├── CosmosDBSqlStoredProcedureResource
            │       ├── CosmosDBSqlTriggerResource
            │       └── CosmosDBSqlUserDefinedFunctionResource
            ├── CassandraKeyspaceResource
            ├── GremlinDatabaseResource
            ├── MongoDBDatabaseResource
            └── CosmosDBTableResource

Core Workflow

1. Create Cosmos DB Account
csharp
using Azure.ResourceManager.CosmosDB;
using Azure.ResourceManager.CosmosDB.Models;

// Get resource group
var resourceGroup = await subscription
    .GetResourceGroupAsync("my-resource-group");

// Define account
var accountData = new CosmosDBAccountCreateOrUpdateContent(
    location: AzureLocation.EastUS,
    locations: new[]
    {
        new CosmosDBAccountLocation
        {
            LocationName = AzureLocation.EastUS,
            FailoverPriority = 0,
            IsZoneRedundant = false
        }
    })
{
    Kind = CosmosDBAccountKind.GlobalDocumentDB,
    ConsistencyPolicy = new ConsistencyPolicy(DefaultConsistencyLevel.Session),
    EnableAutomaticFailover = true
};

// Create account (long-running operation)
var accountCollection = resourceGroup.Value.GetCosmosDBAccounts();
var operation = await accountCollection.CreateOrUpdateAsync(
    WaitUntil.Completed,
    "my-cosmos-account",
    accountData);

CosmosDBAccountResource account = operation.Value;
2. Create SQL Database
csharp
var databaseData = new CosmosDBSqlDatabaseCreateOrUpdateContent(
    new CosmosDBSqlDatabaseResourceInfo("my-database"));

var databaseCollection = account.GetCosmosDBSqlDatabases();
var dbOperation = await databaseCollection.CreateOrUpdateAsync(
    WaitUntil.Completed,
    "my-database",
    databaseData);

CosmosDBSqlDatabaseResource database = dbOperation.Value;
3. Create SQL Container
csharp
var containerData = new CosmosDBSqlContainerCreateOrUpdateContent(
    new CosmosDBSqlContainerResourceInfo("my-container")
    {
        PartitionKey = new CosmosDBContainerPartitionKey
        {
            Paths = { "/partitionKey" },
            Kind = CosmosDBPartitionKind.Hash
        },
        IndexingPolicy = new CosmosDBIndexingPolicy
        {
            Automatic = true,
            IndexingMode = CosmosDBIndexingMode.Consistent
        },
        DefaultTtl = 86400 // 24 hours
    });

var containerCollection = database.GetCosmosDBSqlContainers();
var containerOperation = await containerCollection.CreateOrUpdateAsync(
    WaitUntil.Completed,
    "my-container",
    containerData);

CosmosDBSqlContainerResource container = containerOperation.Value;
4. Configure Throughput
csharp
// Manual throughput
var throughputData = new ThroughputSettingsUpdateData(
    new ThroughputSettingsResourceInfo
    {
        Throughput = 400
    });

// Autoscale throughput
var autoscaleData = new ThroughputSettingsUpdateData(
    new ThroughputSettingsResourceInfo
    {
        AutoscaleSettings = new AutoscaleSettingsResourceInfo
        {
            MaxThroughput = 4000
        }
    });

// Apply to database
await database.CreateOrUpdateCosmosDBSqlDatabaseThroughputAsync(
    WaitUntil.Completed,
    throughputData);
5. Get Connection Information
csharp
// Get keys
var keys = await account.GetKeysAsync();
Console.WriteLine($"Primary Key: {keys.Value.PrimaryMasterKey}");

// Get connection strings
var connectionStrings = await account.GetConnectionStringsAsync();
foreach (var cs in connectionStrings.Value.ConnectionStrings)
{
    Console.WriteLine($"{cs.Description}: {cs.ConnectionString}");
}

Key Types Reference

TypePurpose
ArmClientEntry point for all ARM operations
CosmosDBAccountResourceRepresents a Cosmos DB account
CosmosDBAccountCollectionCollection for account CRUD
CosmosDBSqlDatabaseResourceSQL API database
CosmosDBSqlContainerResourceSQL API container
CosmosDBAccountCreateOrUpdateContentAccount creation payload
CosmosDBSqlDatabaseCreateOrUpdateContentDatabase creation payload
CosmosDBSqlContainerCreateOrUpdateContentContainer creation payload
ThroughputSettingsUpdateDataThroughput configuration

Best Practices

  1. Use WaitUntil.Completed for operations that must finish before proceeding
  2. Use WaitUntil.Started when you want to poll manually or run operations in parallel
  3. Use DefaultAzureCredential — never hardcode keys
  4. Handle RequestFailedException for ARM API errors
  5. Use CreateOrUpdateAsync for idempotent operations
  6. Navigate hierarchy via Get* methods (e.g., account.GetCosmosDBSqlDatabases())

Error Handling

csharp
using Azure;

try
{
    var operation = await accountCollection.CreateOrUpdateAsync(
        WaitUntil.Completed, accountName, accountData);
}
catch (RequestFailedException ex) when (ex.Status == 409)
{
    Console.WriteLine("Account already exists");
}
catch (RequestFailedException ex)
{
    Console.WriteLine($"ARM Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}");
}

Reference Files

FileWhen to Read
references/account-management.mdAccount CRUD, failover, keys, connection strings, networking
references/sql-resources.mdSQL databases, containers, stored procedures, triggers, UDFs
references/throughput.mdManual/autoscale throughput, migration between modes
SDKPurposeInstall
Microsoft.Azure.CosmosData plane (document CRUD, queries)dotnet add package Microsoft.Azure.Cosmos
Azure.ResourceManager.CosmosDBManagement plane (this SDK)dotnet add package Azure.ResourceManager.CosmosDB

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

Files

SKILL.md and 3 other files (references) in .github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-cosmosdb-dotnet of microsoft/skills.

  • SKILL.md
  • references/account-management.md
  • references/sql-resources.md
  • references/throughput.md

Open the folder on GitHubat commit 3898ec8

Used in 5 other repositories

We found 14 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 5 other GitHub owners. This page covers the copy in microsoft/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Azure Resource Manager Cosmosdb Dotnet 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.

Azure Resource Manager Cosmosdb Dotnet compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Resource Manager Cosmosdb Dotnet this skillmicrosoft/skills3.1k5 repos~2.1kAutomated safety check: PassMIT
Azure Storagemicrosoft/GitHub-Copilot-for-Azure2552 repos~1.3kAutomated safety check: PassMIT
Dev SetupAzure/azure-sdk-tools134—~546Automated safety check: NotesMIT
Azure Synapse AnalyticsMicrosoftDocs/Agent-Skills7771 repos~13kAutomated safety check: PassCC-BY-4.0
Apex Azure Storagejonathan-vella/apex217—~1.7kAutomated safety check: PassMIT
Azure Cache RedisMicrosoftDocs/Agent-Skills777—~2.9kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Azure Storage

    microsoft/GitHub-Copilot-for-Azure

    Official

    Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake.

    255 GitHub starsUsed in 2 repos~1.3k tokens
    DatabasesAuto-check passed
  • Dev Setup

    Azure/azure-sdk-tools

    Official

    Set up the local development environment for APIView Copilot.

    134 GitHub stars~546 tokensUpdated today
    Backend & APIsAuto-check: notes
  • Azure Synapse Analytics

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Synapse Analytics development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration…

    777 GitHub starsUsed in 1 repo~13k tokens
    DevelopmentAuto-check passed
  • Apex Azure Storage

    jonathan-vella/apex

    UTILITY SKILL — Azure Storage: Blob, File Shares, Queue, Table and Data Lake, including access tiers and lifecycle management.

    217 GitHub stars~1.7k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Azure Cache Redis

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Cache for Redis development including troubleshooting, best practices, decision making, architecture & design patterns, security, configuration, and deployment.

    777 GitHub stars~2.9k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Microsoft Skill Creator

    MicrosoftDocs/mcp

    Official

    Create agent skills for Microsoft technologies using official documentation.

    1.9k GitHub starsUsed in 3 repos~2.1k tokens
    Agent WorkflowsAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • Official

    Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.

    3.1k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Official

    Builds podcast-style audio narration from text with Azure OpenAI's GPT Realtime Mini over WebSocket, from a Python FastAPI backend to a React player.

    3.1k GitHub starsUsed in 1 repo~947 tokens
    Auto-check passed
  • Frontend UI Dark TS

    microsoft/skills

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    3.1k GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed
  • Pydantic Models Py

    microsoft/skills

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    3.1k GitHub starsUsed in 5 repos~496 tokens
    Auto-check passed
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Skill Creator

    microsoft/skills

    Official

    Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services.

    3.1k GitHub starsUsed in 5 repos~17k tokens
    Auto-check passed

Questions about Azure Resource Manager Cosmosdb Dotnet

What does Azure Resource Manager Cosmosdb Dotnet do?

Azure Resource Manager SDK for Cosmos DB in .NET. An agent skill from microsoft/skills. Azure Resource Manager Cosmosdb Dotnet is an agent skill from microsoft/skills, published by the product's own GitHub organization.NET.

When should I use Azure Resource Manager Cosmosdb Dotnet?

Azure Resource Manager Cosmosdb Dotnet fits situations like: MANAGEMENT PLANE operations: creating/managing Cosmos DB accounts; throughput settings; RBAC via Azure Resource Manager.

How do I install Azure Resource Manager Cosmosdb Dotnet in Claude Code?

Run `npx skills add microsoft/skills --skill azure-resource-manager-cosmosdb-dotnet -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-cosmosdb-dotnet in microsoft/skills) into .claude/skills/azure-resource-manager-cosmosdb-dotnet in your project. Claude Code loads it when a task matches its description.

How do I install Azure Resource Manager Cosmosdb Dotnet in Codex?

Run `npx skills add microsoft/skills --skill azure-resource-manager-cosmosdb-dotnet -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-cosmosdb-dotnet in microsoft/skills) into .agents/skills/azure-resource-manager-cosmosdb-dotnet in your project. Codex loads it when a task matches its description.

Can I use Azure Resource Manager Cosmosdb Dotnet 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 microsoft/skills --skill azure-resource-manager-cosmosdb-dotnet -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-resource-manager-cosmosdb-dotnet, .gemini/skills/azure-resource-manager-cosmosdb-dotnet, .github/skills/azure-resource-manager-cosmosdb-dotnet and .opencode/skills/azure-resource-manager-cosmosdb-dotnet in your project.

What does Azure Resource Manager Cosmosdb Dotnet need to run?

Going by SKILL.md and its folder, Azure Resource Manager Cosmosdb Dotnet needs the command-line tools its instructions call (dotnet) and credentials named AZURE_TOKEN_CREDENTIALS and AZURE_CLIENT_SECRET. Our summary lists: A credential in AZURE_CLIENT_SECRET.

Does Azure Resource Manager Cosmosdb Dotnet access the network?

SKILL.md names 1 domain. In commands or code: learn.microsoft.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Azure Resource Manager Cosmosdb Dotnet 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 Azure Resource Manager Cosmosdb Dotnet use?

Azure Resource Manager Cosmosdb Dotnet is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure Resource Manager Cosmosdb Dotnet use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.3k tokens, read only when the agent opens those files.

What are the alternatives to Azure Resource Manager Cosmosdb Dotnet?

Skills that share tags, products or a category with Azure Resource Manager Cosmosdb Dotnet: Azure Storage (microsoft/GitHub-Copilot-for-Azure, 255 stars), Dev Setup (Azure/azure-sdk-tools, 134 stars), Azure Synapse Analytics (MicrosoftDocs/Agent-Skills, 777 stars) and Apex Azure Storage (jonathan-vella/apex, 217 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Resource Manager Cosmosdb Dotnet?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,094 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 9, 2026.

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