mcpbeat Sign in

Azure Storage Queue Rust Agent Skill

| Azure Queue Storage library for Rust. Send, receive, and manage queue messages.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
51 d ago
last touched
this folder, not the whole repository

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/skills --skill azure-storage-queue-rust

The instruction itself

13 sections, as written by the author

Azure Queue Storage library for Rust

Client library for Azure Queue Storage — send, receive, and manage queue messages.

Use this skill when:

  • An app needs to send or receive messages from Azure Queue Storage in Rust
  • You need to create or manage queues
  • You need to peek, receive, or delete queue messages
  • You need RBAC-based auth for queue operations

> IMPORTANT: Only use the official azure_storage_queue crate published by the azure-sdk crates.io user. Do NOT use unofficial or community crates. Official crates use underscores in names and none have version 0.21.0.

Installation

cargo add azure_storage_queue azure_identity azure_core tokio

> If your code uses azure_core types directly, add azure_core to Cargo.toml. If you only use azure_storage_queue re-exports, direct azure_core dependency is optional.

Environment Variables

AZURE_STORAGE_QUEUE_ENDPOINT=https://<account>.queue.core.windows.net/ # Required for all operations

Authentication

Rust Azure SDK code must not use DefaultAzureCredential. The Rust identity crate does not provide that type.

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::QueueServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Local dev: DeveloperToolsCredential. Production: use ManagedIdentityCredential.
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;

    // Derive a queue client by name.
    let queue_client = service_client.queue_client("<queue_name>")?;
    Ok(())
}

Do not infer public SDK types from generated internal model names. Prefer the crate README/examples when checking queue client method signatures and message/result shapes.

Client Types

| Client | Purpose | Access |

| -------------------- | ------------------------------------- | ---------------------------------------- |

| QueueServiceClient | Account-level operations, list queues | QueueServiceClient::new() |

| QueueClient | Queue operations, send/receive/delete | service_client.queue_client("<name>")? |

Core Workflow

Send a Message

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::{models::QueueMessage, QueueServiceClient};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;
    let queue_client = service_client.queue_client("<queue_name>")?;

    #[allow(clippy::needless_update)]
    let message = QueueMessage {
        message_text: Some("hello world".to_string()),
        ..Default::default()
    };
    queue_client.send_message(message.try_into()?, None).await?;
    Ok(())
}

Receive Messages

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::QueueServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;
    let queue_client = service_client.queue_client("<queue_name>")?;

    let response = queue_client.receive_messages(None).await?;
    let messages = response.into_model()?;
    for msg in messages.items.unwrap_or_default() {
        println!("{}", msg.message_text.as_deref().unwrap_or("<empty>"));
    }
    Ok(())
}

Delete a Message

After receiving a message, delete it using the message ID and pop receipt:

let response = queue_client.receive_messages(None).await?;
let messages = response.into_model()?;
for msg in messages.items.unwrap_or_default() {
    if let (Some(id), Some(pop_receipt)) = (&msg.message_id, &msg.pop_receipt) {
        queue_client.delete_message(id, pop_receipt, None).await?;
    }
}

Peek Messages

Peek at messages without removing them from the queue:

let response = queue_client.peek_messages(None).await?;
let messages = response.into_model()?;
for msg in messages.items.unwrap_or_default() {
    println!("Peeked: {}", msg.message_text.as_deref().unwrap_or("<empty>"));
}

RBAC Roles

For Entra ID auth, assign one of these roles to the identity:

| Role | Access |

| -------------------------------------- | ---------------------- |

| Storage Queue Data Reader | Read and peek messages |

| Storage Queue Data Contributor | Read/write messages |

| Storage Queue Data Message Sender | Send messages only |

| Storage Queue Data Message Processor | Receive and delete |

Best Practices

  • Use cargo add to manage dependencies, never edit Cargo.toml directly. Add and remove Rust SDK dependencies with cargo commands instead of manual manifest edits.
  • Add azure_core only when importing azure_core types directly. If your code imports azure_core::http::Url, azure_core::http::RequestContent, or azure_core::error::ErrorKind, include azure_core; otherwise a direct dependency is optional.
  • Use DeveloperToolsCredential for local dev, ManagedIdentityCredential for production — Rust does not provide a single DefaultAzureCredential type
  • Never hardcode credentials — use environment variables or managed identity
  • Assign RBAC roles — ensure appropriate queue data roles for the identity
  • Use QueueServiceClient as the entry point and derive QueueClient from it via queue_client()
  • Delete messages after processing — use the message ID and pop receipt from receive_messages
  • Reuse clients — clients are thread-safe; create once, share across tasks
  • Run cargo clippy -- -D warnings when the prompt, eval, or CI expects lint-clean output

10. Future-proof #[non_exhaustive] SDK models — end model-struct initializers (e.g. QueueMessage) with ..Default::default() (add #[allow(clippy::needless_update)]) and use a _ wildcard arm when matching SDK enums, so new service-added fields/variants don't break your build

| Resource | Link |

| ------------- | ------------------------------------------------------------------------------------- |

| API Reference | https://docs.rs/crate/azure_storage_queue/latest |

| crates.io | https://crates.io/crates/azure_storage_queue |

| Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_queue |

Other skills for the same job

different authors, same section of the catalogue
Modal
by christophacham
×3

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

17k tokens
Github Workflow Automation
by ComeOnOliver
×3

Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management

9k tokens
Gcloud
by Dicklesworthstone
×2

Google Cloud Platform CLI - manage GCP resources including Compute Engine, Cloud Run, GKE, Cloud Functions, Storage, BigQuery, and more.

2k tokens
Backend Architect
by ComeOnOliver
×2

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.

7k tokens
Modal
by ComeOnOliver
×2

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

37k tokens
Aspire
by github
vendor ×1

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

21k tokens
Bigquery Pipeline Audit
by github
vendor ×1

Audits Python + BigQuery pipelines for cost safety, idempotency, and production readiness. Returns a structured report with exact patch locations.

1k tokens
Msstore CLI
by github
vendor ×1

Microsoft Store Developer CLI (msstore) for publishing Windows applications to the Microsoft Store. Use when asked to configure Store credentials, list Store apps, check submission status, publish submissions, manage package flights, set up CI/CD for Store publishing, or integrate with Partner Center. Supports Windows App SDK/WinUI, UWP, .NET MAUI, Flutter, Electron, React Native, and PWA applications.

4k tokens

How to use it

Copy the folder

Take microsoft/azure-storage-queue-rust from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.