rootcastleco/rei-skills/azure-cosmos-java
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install rootcastleco/rei-skills/azure-cosmos-javaSKILL.md
Azure Cosmos DB SDK for Java
Client library for Azure Cosmos DB NoSQL API with global distribution and reactive patterns.
Installation
Or use Azure SDK BOM:
Environment Variables
Authentication
Key-based Authentication
Async Client
With Customizations
Client Hierarchy
| Class | Purpose | |
|---|---|---|
CosmosClient / CosmosAsyncClient | Account-level operations | |
CosmosDatabase / CosmosAsyncDatabase | Database operations | |
CosmosContainer / CosmosAsyncContainer | Container/item operations |
Core Workflow
Create Database
Create Container
CRUD Operations
Query Documents
Key Concepts
Partition Keys
Choose a partition key with:
- High cardinality (many distinct values)
- Even distribution of data and requests
- Frequently used in queries
Consistency Levels
| 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 |
Request Units (RUs)
All operations consume RUs. Check response headers:
Best Practices
- Reuse CosmosClient — Create once, reuse throughout application
- Use async client for high-throughput scenarios
- Choose partition key carefully — Affects performance and scalability
- Enable content response on write for immediate access to created items
- Configure preferred regions for geo-distributed applications
- Handle 429 errors with retry policies (built-in by default)
- Use direct mode for lowest latency in production
Error Handling
Reference Links
| Resource | URL | |
|---|---|---|
| Maven Package | https://central.sonatype.com/artifact/com.azure/azure-cosmos | |
| API Documentation | https://azuresdkdocs.z19.web.core.windows.net/java/azure-cosmos/latest/index.html | |
| Product Docs | https://learn.microsoft.com/azure/cosmos-db/ | |
| Samples | https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples | |
| Performance Guide | https://learn.microsoft.com/azure/cosmos-db/performance-tips-java-sdk-v4-sql | |
| Troubleshooting | https://learn.microsoft.com/azure/cosmos-db/troubleshoot-java-sdk-v4-sql |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
🏰 Rei Skills — Curated by Rootcastle Engineering & Innovation | Batuhan AyrıbaşEngineering Beyond Boundaries | admin@rootcastle.com
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/azure-cosmos-java/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 2
- 7-day trend score
- 15
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
[](https://verified-skill.com/skills/rootcastleco/rei-skills/azure-cosmos-java)