Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-cosmos-ts
Azure Cosmos DB JavaScript/TypeScript SDK (@azure/cosmos) for data plane operations.
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
and 10 more in the full report
8 fixed13 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am implementing an inventory management layer with the `@azure/cosmos` library using Azure AD authentication. I need two features: a function to search items by category and price threshold using safe SQL parameters, and a safe update function that prevents overwriting modifications made by parallel requests using standard entity tags. Please produce a TypeScript class snippet that implements both methods and includes error handling for concurrency collisions.
| Checked | Without skill | With skill |
|---|---|---|
| The DefaultAzureCredential instantiation includes requiredEnvVars set to AZURE_TOKEN_CREDENTIALS. | Missed | Passed |
| Error handling checks whether caught errors are instances of ErrorResponse. | Missed | Passed |
| The update operation sets accessCondition with type IfMatch and condition matching the ETag. | Passed | Passed |
The instructions your model reads when the skill loads.
Data plane SDK for Azure Cosmos DB NoSQL API operations — CRUD on documents, queries, bulk operations.
⚠️ Data vs Management Plane
- This SDK (@azure/cosmos): CRUD operations on documents, queries, stored procedures
- Management SDK (@azure/arm-cosmosdb): Create accounts, databases, containers via ARM
npm install @azure/cosmos @azure/identity
Current Version: 4.9.0
Node.js: >= 20.0.0
COSMOS_ENDPOINT=https://<account>.documents.azure.com:443/
COSMOS_DATABASE=<database-name>
COSMOS_CONTAINER=<container-name>
# For key-based auth only (prefer AAD)
COSMOS_KEY=<account-key>
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
import { CosmosClient } from "@azure/cosmos";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";
// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes
test cases passed, vs 13 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.