Azure Cosmosdb
alinaqi/maggy
Azure Cosmos DB partition keys, consistency levels, change feed, SDK patterns
Azure Cosmos DB SDK for Java. An agent skill from microsoft/skills.
$ npx skills add microsoft/skills --skill azure-cosmos-java -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/skills azure-cosmos-java --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .claude/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.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/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .claude/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-javaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/skills --skill azure-cosmos-java -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/skills azure-cosmos-java --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .agents/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .agents/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/skills --skill azure-cosmos-java -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/skills azure-cosmos-java --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .cursor/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .cursor/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/skills.git --path .github/plugins/azure-sdk-java/skills/azure-cosmos-java--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/skills --skill azure-cosmos-java -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/skills azure-cosmos-java --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .gemini/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .gemini/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/skills azure-cosmos-javaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/skills --skill azure-cosmos-java -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .github/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .github/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/skills --skill azure-cosmos-java -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/skills azure-cosmos-java --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-cosmos-java .opencode/skills/azure-cosmos-java && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "azure-cosmos-java" agent skill from https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-cosmos-java into .opencode/skills/azure-cosmos-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "azure-cosmos-java", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
azure-cosmos-javaAzure Cosmos DB SDK for Java. An agent skill from microsoft/skills.
Azure Cosmos Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Cosmos DB SDK for Java. NoSQL database operations with global distribution, multi-model support, and reactive patterns. Triggers: "CosmosClient java", "CosmosAsyncClient", "cosmos database java", "cosmosdb java", "document database java".
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).
It sits in Databases, covering NoSQL databases. It works with Azure Cosmos DB, Java and Microsoft Azure. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 354361d. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are java, xml and bash).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
learn.microsoft.comcentral.sonatype.comazuresdkdocs.z19.web.core.windows.netgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
COSMOS_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Azure Cosmos Java loads about 1.9k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 210 words of instructions outside code blocks.
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.
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.
The full file from microsoft/skills at commit 354361d, republished under its MIT licence (© microsoft). 210 words, ~1,874 tokens.
.claude/skills/azure-cosmos-java/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Client library for Azure Cosmos DB NoSQL API with global distribution and reactive patterns.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>LATEST</version>
</dependency>Or use Azure SDK BOM:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-sdk-bom</artifactId>
<version>{bom_version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
</dependency>
</dependencies>COSMOS_ENDPOINT=https://<account>.documents.azure.com:443/
COSMOS_KEY=<your-primary-key>import com.azure.cosmos.CosmosClient;
import com.azure.cosmos.CosmosClientBuilder;
CosmosClient client = new CosmosClientBuilder()
.endpoint(System.getenv("COSMOS_ENDPOINT"))
.key(System.getenv("COSMOS_KEY"))
.buildClient();import com.azure.cosmos.CosmosAsyncClient;
CosmosAsyncClient asyncClient = new CosmosClientBuilder()
.endpoint(serviceEndpoint)
.key(key)
.buildAsyncClient();import com.azure.cosmos.ConsistencyLevel;
import java.util.Arrays;
CosmosClient client = new CosmosClientBuilder()
.endpoint(serviceEndpoint)
.key(key)
.directMode(directConnectionConfig, gatewayConnectionConfig)
.consistencyLevel(ConsistencyLevel.SESSION)
.connectionSharingAcrossClientsEnabled(true)
.contentResponseOnWriteEnabled(true)
.userAgentSuffix("my-application")
.preferredRegions(Arrays.asList("West US", "East US"))
.buildClient();| Class | Purpose |
|---|---|
CosmosClient / CosmosAsyncClient | Account-level operations |
CosmosDatabase / CosmosAsyncDatabase | Database operations |
CosmosContainer / CosmosAsyncContainer | Container/item operations |
// Sync
client.createDatabaseIfNotExists("myDatabase")
.map(response -> client.getDatabase(response.getProperties().getId()));
// Async with chaining
asyncClient.createDatabaseIfNotExists("myDatabase")
.map(response -> asyncClient.getDatabase(response.getProperties().getId()))
.subscribe(database -> System.out.println("Created: " + database.getId()));asyncClient.createDatabaseIfNotExists("myDatabase")
.flatMap(dbResponse -> {
String databaseId = dbResponse.getProperties().getId();
return asyncClient.getDatabase(databaseId)
.createContainerIfNotExists("myContainer", "/partitionKey")
.map(containerResponse -> asyncClient.getDatabase(databaseId)
.getContainer(containerResponse.getProperties().getId()));
})
.subscribe(container -> System.out.println("Container: " + container.getId()));import com.azure.cosmos.models.PartitionKey;
CosmosAsyncContainer container = asyncClient
.getDatabase("myDatabase")
.getContainer("myContainer");
// Create
container.createItem(new User("1", "John Doe", "john@example.com"))
.flatMap(response -> {
System.out.println("Created: " + response.getItem());
// Read
return container.readItem(
response.getItem().getId(),
new PartitionKey(response.getItem().getId()),
User.class);
})
.flatMap(response -> {
System.out.println("Read: " + response.getItem());
// Update
User user = response.getItem();
user.setEmail("john.doe@example.com");
return container.replaceItem(
user,
user.getId(),
new PartitionKey(user.getId()));
})
.flatMap(response -> {
// Delete
return container.deleteItem(
response.getItem().getId(),
new PartitionKey(response.getItem().getId()));
})
.block();import com.azure.cosmos.models.CosmosQueryRequestOptions;
import com.azure.cosmos.util.CosmosPagedIterable;
CosmosContainer container = client.getDatabase("myDatabase").getContainer("myContainer");
String query = "SELECT * FROM c WHERE c.status = @status";
CosmosQueryRequestOptions options = new CosmosQueryRequestOptions();
CosmosPagedIterable<User> results = container.queryItems(
query,
options,
User.class
);
results.forEach(user -> System.out.println("User: " + user.getName()));Choose a partition key with:
| Level | Guarantee |
|---|---|
| Strong | Linearizability |
| Bounded Staleness | Consistent prefix with bounded lag |
| Session | Consistent prefix within session |
| Consistent Prefix | Reads never see out-of-order writes |
| Eventual | No ordering guarantee |
All operations consume RUs. Check response headers:
CosmosItemResponse<User> response = container.createItem(user);
System.out.println("RU charge: " + response.getRequestCharge());import com.azure.cosmos.CosmosException;
try {
container.createItem(item);
} catch (CosmosException e) {
System.err.println("Status: " + e.getStatusCode());
System.err.println("Message: " + e.getMessage());
System.err.println("Request charge: " + e.getRequestCharge());
if (e.getStatusCode() == 409) {
System.err.println("Item already exists");
} else if (e.getStatusCode() == 429) {
System.err.println("Rate limited, retry after: " + e.getRetryAfterDuration());
}
}© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in .github/plugins/azure-sdk-java/skills/azure-cosmos-java of microsoft/skills.
Open the folder on GitHubat commit 354361d
We found 17 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in microsoft/skills, which our catalogue first saw on October 7, 2026.
Azure Cosmos Java 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Azure Cosmos Java this skillmicrosoft/skills | 3.1k | 6 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Azure Cosmosdbalinaqi/maggy | 707 | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Azure Storagemicrosoft/GitHub-Copilot-for-Azure | 255 | 2 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Cosmosdb Best Practicesmicrosoft/vscode-cosmosdb | 200 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Azure Data Tables Pyaiskillstore/marketplace | 430 | 5 repos | ~1.5k | Automated safety check: Pass | None | |
| Extend Commands APIredis/lettuce | 5.8k | — | ~7.7k | Automated safety check: Notes | MIT |
alinaqi/maggy
Azure Cosmos DB partition keys, consistency levels, change feed, SDK patterns
microsoft/GitHub-Copilot-for-Azure
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake.
microsoft/vscode-cosmosdb
Azure Cosmos DB performance optimization and best practices guidelines for NoSQL, partitioning, queries, and SDK usage.
aiskillstore/marketplace
Azure Tables SDK for Python (Storage and Cosmos DB). An agent skill from aiskillstore/marketplace.
redis/lettuce
Add or extend Redis commands in the Lettuce client API end-to-end — a new core command, a family of new commands, an extension to an existing command's options, or a module/area command…
redis/lettuce
A skill your agent uses when writing or editing Javadoc for Lettuce public API — new methods, classes, deprecations, or when a reviewer asks to fix or improve doc comments.
microsoft/skills
Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.
microsoft/skills
Python guidance for the Azure AI Search SDK covering vector, hybrid and semantic search, index management and indexers, with Entra ID authentication preferred over keys.
microsoft/skills
Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.
microsoft/skills
Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.
microsoft/skills
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.
microsoft/skills
Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.
Works with
Categories
Azure Cosmos DB SDK for Java. An agent skill from microsoft/skills. Azure Cosmos Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Cosmos DB SDK for Java.
Azure Cosmos Java fits situations like: tasks that involve NoSQL databases.
Run `npx skills add microsoft/skills --skill azure-cosmos-java -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-cosmos-java in microsoft/skills) into .claude/skills/azure-cosmos-java in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/skills --skill azure-cosmos-java -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-cosmos-java in microsoft/skills) into .agents/skills/azure-cosmos-java in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/skills --skill azure-cosmos-java -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-cosmos-java, .gemini/skills/azure-cosmos-java, .github/skills/azure-cosmos-java and .opencode/skills/azure-cosmos-java in your project.
Going by SKILL.md and its folder, Azure Cosmos Java needs credentials named COSMOS_KEY. Our summary lists: A credential in COSMOS_KEY.
SKILL.md names 4 domains. As links in the text: learn.microsoft.com, central.sonatype.com, azuresdkdocs.z19.web.core.windows.net and github.com. This is read from the text; nothing was executed.
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.
Azure Cosmos Java is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.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 3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Azure Cosmos Java: Azure Cosmosdb (alinaqi/maggy, 707 stars), Azure Storage (microsoft/GitHub-Copilot-for-Azure, 255 stars), Cosmosdb Best Practices (microsoft/vscode-cosmosdb, 200 stars) and Azure Data Tables Py (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,086 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 6, 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.