maruf-sherikar/antigravity-skills/azure-cosmos-rust

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Azure Cosmos DB SDK for Rust (NoSQL API). Use for document CRUD, queries, containers, and globally distributed data. Triggers: "cosmos db rust", "CosmosClient rust", "container", "document rust", "NoSQL rust", "partition key".

Install

npx vskill@latest install maruf-sherikar/antigravity-skills/azure-cosmos-rust

SKILL.md

The same SKILL.md was published earlier as alexander-kastil/skills-collection/azure-cosmos-rust.

Azure Cosmos DB SDK for Rust

Client library for Azure Cosmos DB NoSQL API — globally distributed, multi-model database.

Installation

sh
cargo add azure_data_cosmos azure_identity

Environment Variables

bash
COSMOS_ENDPOINT=https://<account>.documents.azure.com:443/
COSMOS_DATABASE=mydb
COSMOS_CONTAINER=mycontainer

Authentication

rust
use azure_identity::DeveloperToolsCredential;
use azure_data_cosmos::CosmosClient;
let credential = DeveloperToolsCredential::new(None)?;
let client = CosmosClient::new(
"https://<account>.documents.azure.com:443/",
credential.clone(),
None,
)?;

Client Hierarchy

ClientPurposeGet From
CosmosClientAccount-level operationsDirect instantiation
DatabaseClientDatabase operationsclient.database_client()
ContainerClientContainer/item operationsdatabase.container_client()

Core Workflow

Get Database and Container Clients
rust
let database = client.database_client("myDatabase");
let container = database.container_client("myContainer");
Create Item
rust
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize)]
struct Item {
pub id: String,
pub partition_key: String,
pub value: String,
}
let item = Item {
id: "1".into(),
partition_key: "partition1".into(),
value: "hello".into(),
};
container.create_item("partition1", item, None).await?;
Read Item
rust
let response = container.read_item("partition1", "1", None).await?;
let item: Item = response.into_model()?;
Replace Item
rust
let mut item: Item = container.read_item("partition1", "1", None).await?.into_model()?;
item.value = "updated".into();
container.replace_item("partition1", "1", item, None).await?;
Patch Item
rust
use azure_data_cosmos::models::PatchDocument;
let patch = PatchDocument::default()
.with_add("/newField", "newValue")?
.with_remove("/oldField")?;
container.patch_item("partition1", "1", patch, None).await?;
Delete Item
rust
container.delete_item("partition1", "1", None).await?;

Key Auth (Optional)

Enable key-based authentication with feature flag:

sh
cargo add azure_data_cosmos --features key_auth

Best Practices

  1. Always specify partition key — required for point reads and writes
  2. Use `into_model()?` — to deserialize responses into your types
  3. Derive `Serialize` and `Deserialize` — for all document types
  4. Use Entra ID auth — prefer DeveloperToolsCredential over key auth
  5. Reuse client instances — clients are thread-safe and reusable

Reference Links

ResourceLink
API Referencehttps://docs.rs/azure_data_cosmos
Source Codehttps://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/cosmos/azure_data_cosmos
crates.iohttps://crates.io/crates/azure_data_cosmos

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/maruf-sherikar/antigravity-skills/azure-cosmos-rust/badge)](https://verified-skill.com/skills/maruf-sherikar/antigravity-skills/azure-cosmos-rust)

Something wrong with this skill or its page? Tell us.