azure-storage-blob-ts
Azure Blob Storage for JavaScript/TypeScript (@azure/storage-blob): block, append and page blobs, SAS tokens and containers.
- Kind
- Skill
- Works with
- Claude Code
- Languages
- TypeScript / JavaScript
- Source
- microsoft/skills @ 2130750147de
- Path
- .github/plugins/azure-sdk-typescript/skills/azure-storage-blob-ts/SKILL.md
- License
- MIT
- Jobs
- Implementation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# @azure/storage-blob (TypeScript/JavaScript)
SDK for Azure Blob Storage operations — upload, download, list, and manage blobs and containers.
## Installation
```bash
npm install @azure/storage-blob @azure/identity
```
**Current Version**: 12.x
**Node.js**: >= 18.0.0
## Environment Variables
```bash
AZURE_STORAGE_ACCOUNT_NAME=<account-name>
AZURE_STORAGE_ACCOUNT_KEY=<account-key>
# OR connection string
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```
## Authentication
### Microsoft Entra Token Credential (Recommended)
```typescript
import { BlobServiceClient } from "@azure/storage-blob";
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:
…