Command Palette

Search for a command to run...

Назад к скиллам
скилл № 52720

cloud-native-azure-functions

Use when the user asks about Azure Functions, Durable Functions orchestrator or activity functions, durable entities, fan-out/fan-in, Event Grid triggers…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить cloud-native-azure-functions в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Azure Functions and Durable Functions

Purpose

Build event-driven Azure Functions and stateful Durable Functions workflows correctly. The key mechanics are the Durable Task Framework's event-sourced replay (which dictates strict orchestrator coding rules) and Event Grid's push delivery with retries (which dictates idempotent handlers).

Agent Protocol

Trigger

"azure functions", "durable functions", "orchestrator function", "activity function", "durable entities", "event grid trigger", "flex consumption", "hosting plan", "fan-out fan-in".

Input Context

  • Language/worker model (.NET isolated worker, Node.js v4 model, Python v2 model, Java, PowerShell).
  • Trigger sources (HTTP, Queue, Service Bus, Event Grid, Event Hubs, Timer, Blob).
  • Execution length, VNet needs, cold-start tolerance, expected scale.

Output Artifact

Function code and host/plan configuration. No file unless requested.

Response Format

Hosting plan: {Flex Consumption|Premium|Dedicated|Container Apps} (why)
Pattern: {function chaining|fan-out/fan-in|async HTTP API|monitor|human interaction|aggregator}
Durable backend: {Azure Storage|Netherite|MSSQL|Durable Task Scheduler}
Idempotency: {how duplicates are handled}

Completion Criteria

  • Orchestrator code is deterministic (no I/O, no DateTime.Now, no random, no direct HTTP).
  • Hosting plan matches duration, networking, and cold-start needs.
  • Event handlers idempotent; dead-lettering configured for Event Grid subscriptions.

Durable Functions Mechanics

  • Event sourcing + replay. Every orchestration action (activity scheduled, completed, timer fired, external event received) is appended to a history. When the orchestrator awaits something, it unloads. When the result arrives, the orchestrator function re-executes from the top, and completed awaits return immediately from history.
  • Default backend (Azure Storage): history and instance state in Azure Table Storage, work items via Azure Storage queues, large payloads in blobs. Alternative backends: Netherite, Microsoft SQL Server, and the managed Durable Task Scheduler.
  • Function types: client (starts/queries instances), orchestrator (workflow logic), activity (the real work, may do I/O), entity (small durable state objects addressed by ID).

Orchestrator Rules (replay safety)

Do not Use instead
DateTime.UtcNow, new Date() context.CurrentUtcDateTime / context.df.currentUtcDateTime
Guid.NewGuid(), random numbers context.NewGuid() or generate inside an activity
HTTP calls, DB queries, file I/O Activity functions (or CallHttpAsync durable HTTP)
Thread.Sleep, Task.Delay, setTimeout context.CreateTimer(...)
Unbounded loops creating huge history ContinueAsNew to restart with fresh history
Logging without guard context.CreateReplaySafeLogger(...) / check IsReplaying

Fan-out / Fan-in (.NET isolated worker)

using Microsoft.Azure.Functions.Worker;
using Microsoft.DurableTask;
using Microsoft.DurableTask.Client;

public static class ResizeImages
{
    [Function(nameof(ResizeOrchestrator))]
    public static async Task<int> ResizeOrchestrator(
        [OrchestrationTrigger] TaskOrchestrationContext context)
    {
        string[] blobs = await context.CallActivityAsync<string[]>(nameof(ListBlobs), "incoming");

        var retry = TaskOptions.FromRetryPolicy(new RetryPolicy(
            maxNumberOfAttempts: 3, firstRetryInterval: TimeSpan.FromSeconds(5)));

        var tasks = blobs.Select(b => context.CallActivityAsync<long>(nameof(Resize), b, retry));
        long[] sizes = await Task.WhenAll(tasks);          // fan-in
        return sizes.Length;
    }

    [Function(nameof(ListBlobs))]
    public static string[] ListBlobs([ActivityTrigger] string container) =>
        BlobLister.List(container);                       // I/O allowed in activities

    [Function(nameof(Resize))]
    public static long Resize([ActivityTrigger] string blobName) =>
        ImageResizer.Resize(blobName);

    [Function("ResizeStart")]
    public static async Task<HttpResponseData> Start(
        [HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequestData req,
        [DurableClient] DurableTaskClient client)
    {
        string id = await client.ScheduleNewOrchestrationInstanceAsync(nameof(ResizeOrchestrator));
        return await client.CreateCheckStatusResponseAsync(req, id); // 202 + status URLs
    }
}

BlobLister and ImageResizer are your own services; the orchestrator never touches storage directly.

Event Grid Delivery Semantics

  • Push model over HTTPS (or to Azure Functions, queues, Event Hubs, Service Bus).
  • At-least-once delivery; default retry policy: up to 30 delivery attempts within a 1,440-minute (24 h) event time-to-live, with exponential backoff.
  • Configure a dead-letter destination (storage blob container) on the subscription; without it, events that exhaust retries are
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл cloud-native-azure-functions?

Use when the user asks about Azure Functions, Durable Functions orchestrator or activity functions, durable entities, fan-out/fan-in, Event Grid triggers, Flex Consumption or other hosting plans. Produces replay-safe Durable Functions code and a hosting-plan choice. Not for AWS Lambda (use cloud-native-aws-serverless) or Step Functions (use cloud-native-serverless-orchestration).

Как установить скилл cloud-native-azure-functions?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cloud-native-azure-functions запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cloud-native-azure-functions с