.agents/skills/azure/SKILL.md
Azure cloud services SDK integration. Azure Functions, Cosmos DB, Blob Storage, Service Bus, Azure AD (Entra ID), and Key Vault. Node.js and .NET SDKs. USE WHEN: user mentions "Azure", "Azure Functions", "Cosmos DB", "Blob Storage", "Service Bus", "Azure AD", "Entra ID", "Key Vault", "Azure SDK" DO NOT USE FOR: AWS services - use `aws`; GCP services - use `gcp`; Terraform for Azure - use `terraform`
npx skillsauth add d-subrahmanyam/deno-fresh-microservices azureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
import { app, HttpRequest, HttpResponseInit, InvocationContext } from '@azure/functions';
app.http('getProduct', {
methods: ['GET'],
authLevel: 'anonymous',
route: 'products/{id}',
handler: async (req: HttpRequest, context: InvocationContext): Promise<HttpResponseInit> => {
const id = req.params.id;
const product = await getProduct(id);
return { status: 200, jsonBody: product };
},
});
// Queue trigger
app.serviceBusQueue('processOrder', {
connection: 'ServiceBusConnection',
queueName: 'orders',
handler: async (message: unknown, context: InvocationContext) => {
const order = message as Order;
await processOrder(order);
},
});
// Timer trigger (cron)
app.timer('dailyCleanup', {
schedule: '0 0 2 * * *',
handler: async (timer, context) => {
await cleanupExpiredSessions();
},
});
import { CosmosClient } from '@azure/cosmos';
const client = new CosmosClient(process.env.COSMOS_CONNECTION_STRING!);
const container = client.database('mydb').container('products');
// Create
await container.items.create({ id: '123', name: 'Widget', price: 19.99, category: 'tools' });
// Read
const { resource } = await container.item('123', 'tools').read();
// Query
const { resources } = await container.items
.query({
query: 'SELECT * FROM c WHERE c.category = @cat AND c.price < @maxPrice',
parameters: [
{ name: '@cat', value: 'tools' },
{ name: '@maxPrice', value: 50 },
],
})
.fetchAll();
import { BlobServiceClient } from '@azure/storage-blob';
const blobService = BlobServiceClient.fromConnectionString(process.env.AZURE_STORAGE_CONNECTION!);
const container = blobService.getContainerClient('uploads');
// Upload
const blockBlob = container.getBlockBlobClient(`files/${filename}`);
await blockBlob.uploadData(buffer, {
blobHTTPHeaders: { blobContentType: contentType },
});
// Download
const downloadResponse = await blockBlob.download(0);
const content = await streamToBuffer(downloadResponse.readableStreamBody!);
// Generate SAS URL
import { generateBlobSASQueryParameters, BlobSASPermissions } from '@azure/storage-blob';
const sasUrl = blockBlob.generateSasUrl({
permissions: BlobSASPermissions.parse('r'),
expiresOn: new Date(Date.now() + 3600 * 1000),
});
import { ServiceBusClient } from '@azure/service-bus';
const sbClient = new ServiceBusClient(process.env.SERVICE_BUS_CONNECTION!);
// Send
const sender = sbClient.createSender('orders');
await sender.sendMessages({ body: { orderId: '123', status: 'created' } });
// Receive
const receiver = sbClient.createReceiver('orders');
const messages = await receiver.receiveMessages(10, { maxWaitTimeInMs: 5000 });
for (const msg of messages) {
await processOrder(msg.body);
await receiver.completeMessage(msg);
}
import { DefaultAzureCredential } from '@azure/identity';
// Works in all environments: local dev, Azure VMs, App Service, AKS
const credential = new DefaultAzureCredential();
// Use with any Azure SDK client
const blobService = new BlobServiceClient(
`https://${accountName}.blob.core.windows.net`,
credential,
);
| Anti-Pattern | Fix |
|--------------|-----|
| Connection strings in code | Use DefaultAzureCredential + managed identity |
| Not using partition keys (Cosmos DB) | Design partition key for query patterns |
| Polling Service Bus | Use event-driven triggers or receiveMessages |
| No retry configuration | Azure SDKs retry automatically — configure retryOptions |
| Hardcoded resource names | Use environment variables or App Configuration |
development
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
development
FastAPI modern Python web framework. Covers routing, Pydantic models, dependency injection, and async support. Use when building Python APIs. USE WHEN: user mentions "fastapi", "pydantic", "async python api", "python rest api", asks about "dependency injection python", "python openapi", "python swagger", "async endpoints", "python api validation", "fastapi middleware" DO NOT USE FOR: Django apps - use `django` instead, Flask apps - use `flask` instead, synchronous Python APIs without type hints, GraphQL-only APIs
tools
FastAPI integration testing specialist. Covers synchronous TestClient, async httpx AsyncClient, dependency injection overrides, auth testing (JWT, OAuth2, API keys), WebSocket testing, file uploads, background tasks, middleware testing, and HTTP mocking with respx, responses, and pytest-httpserver. USE WHEN: user mentions "FastAPI test", "TestClient", "httpx async test", "dependency override test", "respx mock", asks about testing FastAPI endpoints, authentication in tests, or HTTP client mocking. DO NOT USE FOR: Django - use `pytest-django`; pytest internals - use `pytest`; Container infrastructure - use `testcontainers-python`
development
Expert in FastAPI Python development with best practices for APIs and async operations