feat: Add Official Microsoft & Gemini Skills (845+ Total)
🚀 Impact Significantly expands the capabilities of **Antigravity Awesome Skills** by integrating official skill collections from **Microsoft** and **Google Gemini**. This update increases the total skill count to **845+**, making the library even more comprehensive for AI coding assistants. ✨ Key Changes 1. New Official Skills - **Microsoft Skills**: Added a massive collection of official skills from [microsoft/skills](https://github.com/microsoft/skills). - Includes Azure, .NET, Python, TypeScript, and Semantic Kernel skills. - Preserves the original directory structure under `skills/official/microsoft/`. - Includes plugin skills from the `.github/plugins` directory. - **Gemini Skills**: Added official Gemini API development skills under `skills/gemini-api-dev/`. 2. New Scripts & Tooling - **`scripts/sync_microsoft_skills.py`**: A robust synchronization script that: - Clones the official Microsoft repository. - Preserves the original directory heirarchy. - Handles symlinks and plugin locations. - Generates attribution metadata. - **`scripts/tests/inspect_microsoft_repo.py`**: Debug tool to inspect the remote repository structure. - **`scripts/tests/test_comprehensive_coverage.py`**: Verification script to ensure 100% of skills are captured during sync. 3. Core Improvements - **`scripts/generate_index.py`**: Enhanced frontmatter parsing to safely handle unquoted values containing `@` symbols and commas (fixing issues with some Microsoft skill descriptions). - **`package.json`**: Added `sync:microsoft` and `sync:all-official` scripts for easy maintenance. 4. Documentation - Updated `README.md` to reflect the new skill counts (845+) and added Microsoft/Gemini to the provider list. - Updated `CATALOG.md` and `skills_index.json` with the new skills. 🧪 Verification - Ran `scripts/tests/test_comprehensive_coverage.py` to verify all Microsoft skills are detected. - Validated `generate_index.py` fixes by successfully indexing the new skills.
This commit is contained in:
135
skills/official/microsoft/rust/data/azure-cosmos-rust/SKILL.md
Normal file
135
skills/official/microsoft/rust/data/azure-cosmos-rust/SKILL.md
Normal file
@@ -0,0 +1,135 @@
|
||||
---
|
||||
name: azure-cosmos-rust
|
||||
description: |
|
||||
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".
|
||||
package: azure_data_cosmos
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
| Client | Purpose | Get From |
|
||||
|--------|---------|----------|
|
||||
| `CosmosClient` | Account-level operations | Direct instantiation |
|
||||
| `DatabaseClient` | Database operations | `client.database_client()` |
|
||||
| `ContainerClient` | Container/item operations | `database.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
|
||||
|
||||
| Resource | Link |
|
||||
|----------|------|
|
||||
| API Reference | https://docs.rs/azure_data_cosmos |
|
||||
| Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/cosmos/azure_data_cosmos |
|
||||
| crates.io | https://crates.io/crates/azure_data_cosmos |
|
||||
Reference in New Issue
Block a user