# Azure Blob Storage

> Azure Blob Storage API Skill

- Skill: `ashish7802/azure-blob-storage` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add ashish7802/azure-blob-storage`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ashish7802/azure-blob-storage/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: ashish7802 (https://skillmd.com/u/ashish7802)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/ashish7802/azure-blob-storage

---

# Azure Blob Storage API Skill

## Quick Start
Azure Blob Storage handles massive amounts of unstructured data. The `@azure/storage-blob` SDK provides powerful abstractions for Block, Append, and Page blobs.

```bash
npm install @azure/storage-blob
```

## Common Workflows
### SAS (Shared Access Signature) Tokens
Generate a User Delegation SAS Token to grant temporary, tightly-scoped access to a specific blob without exposing the account key.

## Production Patterns
### Block Blobs vs Append Blobs
Use Block Blobs for standard files (images, documents). Use Append Blobs explicitly for log files where data is continuously written to the end of the blob.

## Error Recovery
The SDK automatically handles transient failures using built-in retry policies (exponential backoff). Catch `RestError` to handle fatal authorization or missing resource failures.

## Security Notes
Prioritize Azure AD (Entra ID) authentication via `DefaultAzureCredential` over using connection strings containing the Account Key.

## Performance Considerations
For high-throughput uploads, tune the `maxSingleShotSize` and `blockSize` parameters in the `uploadFile` method to parallelize chunk uploads efficiently across multiple threads.

## Testing Guidance
Use Azurite, the official local emulator for Azure Storage, to run integration tests entirely locally without an Azure subscription.

## Troubleshooting
If CORS errors occur when using SAS URLs in the browser, ensure CORS rules are explicitly defined on the Storage Account setting `AllowedOrigins` and `AllowedMethods` (PUT).

## References
- [Azure Blob SDK](https://learn.microsoft.com/en-us/javascript/api/@azure/storage-blob)

## Related Skills
- [AWS S3](/skills/aws s3)
- [Google Cloud Storage](/skills/google cloud storage)

## Why use this skill
Use this when your agent works with **azure-blob-storage** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Using outdated SDK or API versions from training data
- Inventing environment variable names
- Omitting error handling and retry logic

## Production checklist
- [ ] Secrets in environment variables, not source code
- [ ] Error handling and logging in place
- [ ] Rate limits and timeouts configured

## Related skills
- [`aws s3`](../aws s3/SKILL.md) — related to
- [`google cloud storage`](../google cloud storage/SKILL.md) — related to

---
> **Last Verified:** 2026-07-02

