azure-storage-blob-rust
Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust".
Install / Use
npx skills add microsoft/skills --skill azure-storage-blob-rustInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of azure-storage-blob-rust
azure-storage-blob-rust scores 93/100 on our quality scale, 568th of 3,481 Development & Engineering skills we index (top 17%).
Its SKILL.md is 11 KB long, well organised into 15 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.
With 3,051 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 5 days ago, so azure-storage-blob-rust is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
azure-storage-blob-rust compared with similar skills
All 4 of these similar skills score higher than azure-storage-blob-rust; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| azure-storage-blob-rust (this skill)by microsoft | 93 | 3.1k | 5d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.4k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 2d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install azure-storage-blob-rust?
- Run
npx skills add microsoft/skills --skill azure-storage-blob-rust. The install tabs above show the steps for each supported agent. - Which AI agents does azure-storage-blob-rust work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is azure-storage-blob-rust safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is azure-storage-blob-rust still maintained?
- The repository was last updated 5 days ago, so azure-storage-blob-rust is actively maintained.
Skill content
View source on GitHubname: azure-storage-blob-rust description: | Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust". license: MIT metadata: author: Microsoft package: azure_storage_blob
Azure Blob Storage library for Rust
Client library for Azure Blob Storage — upload, download, and manage blobs and containers.
Use this skill when:
- An app needs to upload or download blobs from Azure Storage in Rust
- You need to create or manage blob containers
- You need to list blobs with pagination
- You need RBAC-based auth for blob operations
IMPORTANT: Only use the official
azure_storage_blobcrate published by the azure-sdk crates.io user. Do NOT use the unofficialazure_storage,azure_storage_blobs, orazure_sdk_for_rustcommunity crates. Official crates use underscores in names and none have version 0.21.0.
Installation
cargo add azure_storage_blob azure_identity azure_core tokio futures
If your code uses
azure_coretypes directly (for example,azure_core::http::Urlorazure_core::http::RequestContent), addazure_coretoCargo.toml. If you only useazure_storage_blobre-exports, directazure_coredependency is optional.
Environment Variables
AZURE_STORAGE_ACCOUNT=<account-name> # Preferred when the caller gives an account name
AZURE_STORAGE_ENDPOINT=https://<account>.blob.core.windows.net/ # Optional alternative when the caller gives a full endpoint
When both are available, prefer constructing the endpoint from AZURE_STORAGE_ACCOUNT so the code matches common evaluation prompts.
Authentication
Rust Azure SDK code must not use DefaultAzureCredential. The Rust identity crate does not provide that type.
// Correct for local development
use azure_identity::DeveloperToolsCredential;
let credential = DeveloperToolsCredential::new(None)?;
// Incorrect in Rust: this type does not exist in azure_identity
use azure_identity::DefaultAzureCredential;
use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_blob::BlobServiceClient;
#[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>.blob.core.windows.net/")?;
let service_client = BlobServiceClient::new(
service_url,
Some(credential),
None,
)?;
// Derive container and blob clients by name.
let container_client = service_client.blob_container_client("<container_name>");
let blob_client = container_client.blob_client("<blob_name>");
Ok(())
}
Client Types
| Client | Purpose |
| --------------------- | ----------------------------------------- |
| BlobServiceClient | Account-level operations, list containers |
| BlobContainerClient | Container operations, list blobs |
| BlobClient | Individual blob operations |
Core Workflow
Upload Blob
use azure_core::http::{RequestContent, Url};
use azure_identity::DeveloperToolsCredential;
use azure_storage_blob::BlobServiceClient;
#[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>.blob.core.windows.net/")?;
let service_client = BlobServiceClient::new(service_url, Some(credential), None)?;
let blob_client = service_client.blob_client("<container_name>", "<blob_name>");
let data = b"hello world";
blob_client.upload(RequestContent::from(data.to_vec()), None).await?;
Ok(())
}
Download Blob / Get Properties
// Get blob properties
let props = blob_client.get_properties(None).await?;
// Download blob content
let response = blob_client.download(None).await?;
let content = String::from_utf8(response.body.collect().await?.into())?;
Delete Blob
blob_client.delete(None).await?;
Container Operations
use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_blob::BlobServiceClient;
use futures::TryStreamExt as _;
let credential = DeveloperToolsCredential::new(None)?;
let service_url = Url::parse("https://<storage_account_name>.blob.core.windows.net/")?;
let service_client = BlobServiceClient::new(service_url, Some(credential), None)?;
let container_client = service_client.blob_container_client("<container_name>");
// Create container
container_client.create(None).await?;
// List blobs (the pager yields BlobItem values directly for this client pattern)
let mut pager = container_client.list_blobs(None)?;
while let Some(blob) = pager.try_next().await? {
let name = blob.name.as_deref().unwrap_or("<unnamed>");
let size = blob
.properties
.as_ref()
.and_then(|properties| properties.content_length);
match size {
Some(size) => println!("Blob: {name} ({size} bytes)"),
None => println!("Blob: {name}"),
}
}
For azure_storage_blob 1.x, do not assume you need a nested page loop like for item in &page.blob_items. In this usage pattern, try_next() already yields the blob item you want to print.
Error Handling
Use StorageError for programmatic access to storage-specific error codes:
use azure_core::error::ErrorKind;
use azure_storage_blob::StorageError;
use azure_storage_blob::models::StorageErrorCode;
let result = blob_client.download(None).await;
match result {
Ok(response) => {
let content: Vec<u8> = response.body.collect().await?.into();
println!("Downloaded {} bytes", content.len());
}
Err(error) => {
if matches!(error.kind(), ErrorKind::HttpResponse { .. }) {
// Convert to StorageError for programmatic access
let storage_error: StorageError = error.try_into()?;
println!("HTTP Status: {}", storage_error.status_code);
if let Some(error_code) = &storage_error.error_code {
match error_code {
StorageErrorCode::BlobNotFound => {
println!("The blob does not exist.");
}
StorageErrorCode::ContainerNotFound => {
println!("The container does not exist.");
}
StorageErrorCode::AuthorizationFailure => {
println!("Authorization failed. Check RBAC roles.");
}
_ => println!("Storage error: {error_code}"),
}
}
if let Some(request_id) = &storage_error.request_id {
println!("Request ID (for Azure support): {request_id}");
}
} else {
println!("Non-HTTP error: {:?}", error);
}
}
}
Note:
StorageError::try_intorequires an owned error object — it will not compile if handed a reference to an error.
RBAC Roles
For Entra ID auth, assign one of these roles to the identity:
| Role | Access |
| ------------------------------- | -------------------------- |
| Storage Blob Data Reader | Read-only |
| Storage Blob Data Contributor | Read/write |
| Storage Blob Data Owner | Full access including RBAC |
Best Practices
- Use
cargo addto manage dependencies, never editCargo.tomldirectly. Add and remove Rust SDK dependencies with cargo commands instead of manual manifest edits. - Add
azure_coreonly when importingazure_coretypes directly. If your code importsazure_core::http::Url,azure_core::http::RequestContent, orazure_core::error::ErrorKind, includeazure_core; otherwise a direct dependency is optional. - Use
DeveloperToolsCredentialfor local dev,ManagedIdentityCredentialfor production — Rust does not provide a singleDefaultAzureCredentialtype - Never hardcode credentials — use environment variables or managed identity
- Use
RequestContent::from()to wrap data for blob uploads — ensures proper content handling by the SDK - Assign RBAC roles — ensure "Storage Blob Data Contributor" for write access
- Reuse clients — clients are thread-safe; create once, share across tasks
- Prefer
BlobServiceClientas the entry point and derive container/blob clients from it - Treat many storage model fields as optional.
blob.nameis anOption<String>and content length is accessed viablob.properties.as_ref().and_then(|p| p.content_length). - Run
cargo clippy -- -D warningsbefore considering the task complete when the prompt or CI expects strict lint compliance; fix style lints such as collapsibleifblocks, not just compiler errors. - Prefer crate README/examples over generated internal type names when validating public API shapes such as pagination results
- Future-proof
#[non_exhaustive]SDK models — when constructing SDK model/options structs, end the initializer 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
Common Rust Blob Pitfalls
- Do not import
azure_identity::DefaultAzureCredential; useDeveloperToolsCredentialor another real Rust credential type. - Do not assume generated internal model names describe the public pager item type; follow the documented
list_blobsexample for this crate. - Do not print
blob.namewith{}directly; unwrap or provide a fallback because it is optional. - Do not stop after
cargo buildpasses when the task also requirescargo clippy -- -D warnings.
Reference Links
| Resource | Link | | ------------- | ------------------------------------------------------------------------------------ | | API Reference | https://docs.rs/crate/azure_storage_blob/latest | | crates.io | https://crates.io/crates/azure_storage_blob | | Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_blob |
Related Skills
ai-job-search
44.4kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
