azure-blob-storage
Store and manage unstructured data with Azure Blob Storage. Create containers, upload and organize blobs, configure access tiers (Hot, Cool, Archive) for cost optimization, generate SAS tokens for secure temporary access, and set lifecycle management policies.
What this skill does
# Azure Blob Storage
Azure Blob Storage is Microsoft's object storage solution for the cloud. It stores massive amounts of unstructured data — documents, images, videos, backups, and data lakes. Three access tiers (Hot, Cool, Archive) let you optimize costs based on access patterns.
## Core Concepts
- **Storage Account** — top-level namespace for all Azure Storage services
- **Container** — groups blobs, similar to a directory or S3 bucket
- **Blob** — a file (Block, Append, or Page blob types)
- **Access Tier** — Hot (frequent), Cool (infrequent, 30d min), Archive (rare, 180d min)
- **SAS Token** — Shared Access Signature for time-limited, scoped access
- **Lifecycle Policy** — automatic tier transitions and deletion rules
## Storage Account Setup
```bash
# Create a storage account
az storage account create \
--name myappstorageprod \
--resource-group my-app-rg \
--location eastus \
--sku Standard_LRS \
--kind StorageV2 \
--access-tier Hot \
--min-tls-version TLS1_2 \
--allow-blob-public-access false
```
```bash
# Get connection string
az storage account show-connection-string \
--name myappstorageprod \
--resource-group my-app-rg \
--query connectionString --output tsv
```
## Container Operations
```bash
# Create a container
az storage container create \
--name uploads \
--account-name myappstorageprod \
--auth-mode login
```
```bash
# List containers
az storage container list \
--account-name myappstorageprod \
--auth-mode login \
--query '[].name' --output tsv
```
## Blob Operations
```bash
# Upload a file
az storage blob upload \
--account-name myappstorageprod \
--container-name uploads \
--name releases/v1.2.0/app.zip \
--file ./build/app.zip \
--tier Hot \
--auth-mode login
```
```bash
# Upload a directory
az storage blob upload-batch \
--account-name myappstorageprod \
--destination static \
--source ./dist \
--auth-mode login \
--overwrite
```
```bash
# Download a blob
az storage blob download \
--account-name myappstorageprod \
--container-name uploads \
--name releases/v1.2.0/app.zip \
--file ./app.zip \
--auth-mode login
```
```bash
# List blobs
az storage blob list \
--account-name myappstorageprod \
--container-name uploads \
--prefix releases/ \
--auth-mode login \
--query '[].name' --output tsv
```
```bash
# Set blob access tier
az storage blob set-tier \
--account-name myappstorageprod \
--container-name backups \
--name old-backup.tar.gz \
--tier Archive \
--auth-mode login
```
## SAS Tokens
```bash
# Generate a SAS token for a single blob (read access, 1 hour)
az storage blob generate-sas \
--account-name myappstorageprod \
--container-name uploads \
--name reports/q4.pdf \
--permissions r \
--expiry $(date -u -d '+1 hour' +%Y-%m-%dT%H:%MZ) \
--auth-mode login \
--as-user \
--output tsv
```
```bash
# Generate a container-level SAS (list + read, 24 hours)
az storage container generate-sas \
--account-name myappstorageprod \
--name uploads \
--permissions lr \
--expiry $(date -u -d '+24 hours' +%Y-%m-%dT%H:%MZ) \
--auth-mode login \
--as-user \
--output tsv
```
```python
# Generate SAS token with Python SDK
from azure.storage.blob import BlobServiceClient, generate_blob_sas, BlobSasPermissions
from datetime import datetime, timedelta, timezone
account_name = "myappstorageprod"
account_key = "your-account-key"
sas_token = generate_blob_sas(
account_name=account_name,
container_name="uploads",
blob_name="reports/q4.pdf",
account_key=account_key,
permission=BlobSasPermissions(read=True),
expiry=datetime.now(timezone.utc) + timedelta(hours=1)
)
url = f"https://{account_name}.blob.core.windows.net/uploads/reports/q4.pdf?{sas_token}"
print(f"SAS URL: {url}")
```
```python
# Generate SAS for upload (write permission)
upload_sas = generate_blob_sas(
account_name=account_name,
container_name="uploads",
blob_name="user-uploads/avatar.jpg",
account_key=account_key,
permission=BlobSasPermissions(write=True, create=True),
expiry=datetime.now(timezone.utc) + timedelta(minutes=15)
)
```
## Lifecycle Management
```json
// lifecycle-policy.json — auto-tier and expire blobs
{
"rules": [
{
"name": "archiveLogs",
"enabled": true,
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["logs/"]
},
"actions": {
"baseBlob": {
"tierToCool": {"daysAfterModificationGreaterThan": 30},
"tierToArchive": {"daysAfterModificationGreaterThan": 90},
"delete": {"daysAfterModificationGreaterThan": 365}
}
}
}
},
{
"name": "cleanupSnapshots",
"enabled": true,
"type": "Lifecycle",
"definition": {
"filters": {"blobTypes": ["blockBlob"]},
"actions": {
"snapshot": {
"delete": {"daysAfterCreationGreaterThan": 90}
}
}
}
}
]
}
```
```bash
# Apply lifecycle policy
az storage account management-policy create \
--account-name myappstorageprod \
--resource-group my-app-rg \
--policy @lifecycle-policy.json
```
## Python SDK Usage
```python
# Upload and download with Python SDK
from azure.storage.blob import BlobServiceClient
blob_service = BlobServiceClient.from_connection_string("your-connection-string")
container = blob_service.get_container_client("uploads")
# Upload
with open("report.pdf", "rb") as f:
container.upload_blob(name="reports/2024/q4.pdf", data=f, overwrite=True)
# Download
blob = container.get_blob_client("reports/2024/q4.pdf")
with open("downloaded.pdf", "wb") as f:
stream = blob.download_blob()
f.write(stream.readall())
# List blobs
for blob in container.list_blobs(name_starts_with="reports/"):
print(f"{blob.name} ({blob.size} bytes, tier: {blob.blob_tier})")
```
## AzCopy for Bulk Transfers
```bash
# Sync a local directory to blob storage
azcopy sync './dist' 'https://myappstorageprod.blob.core.windows.net/static?SAS_TOKEN' \
--delete-destination true
```
```bash
# Copy between storage accounts
azcopy copy \
'https://source.blob.core.windows.net/data/*?SAS' \
'https://dest.blob.core.windows.net/data/?SAS' \
--recursive
```
## Best Practices
- Disable public blob access by default; use SAS tokens for temporary sharing
- Use lifecycle management to automatically move cold data to cheaper tiers
- Use AzCopy for large-scale data transfers (parallel, resumable)
- Enable soft delete for accidental deletion recovery (set retention period)
- Use managed identities and RBAC instead of account keys when possible
- Set minimum TLS version to 1.2
- Use Cool tier for data accessed less than once per month
- Enable blob versioning for critical data protection
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.