Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

azure-functions

БесплатноБез исполняемых скриптовНе проверен

Build serverless applications with Azure Functions. Create HTTP and event-driven functions with input/output bindings, configure triggers for queues, timers…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub14 установок в других каталогах

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

Azure Functions

Overview

Azure Functions is a serverless compute service that runs event-driven code without managing infrastructure. Its unique binding system connects to Azure services declaratively, and Durable Functions enable complex stateful workflows.

Instructions

Core Concepts

  • Trigger — what causes a function to run (HTTP, timer, queue, blob, etc.)
  • Input Binding — declaratively read data from a service when function runs
  • Output Binding — declaratively write data to a service after function runs
  • Function App — a container for one or more functions sharing configuration
  • Hosting Plan — Flex Consumption (recommended serverless plan), Premium, Dedicated, or Container Apps. The older Consumption plan is legacy: Linux Consumption retires on 30 September 2028 (Microsoft Learn), so do not create new apps on it
  • Durable Functions — extension for stateful orchestrations and workflows

Project Setup

# Create a new function project
func init order-functions --worker-runtime node --language javascript --model V4
cd order-functions
# Create a new HTTP-triggered function
func new --name handleWebhook --template "HTTP trigger" --authlevel function
# Create Azure resources (Flex Consumption, Linux)
az group create --name orders-rg --location westeurope

az storage account create \
  --name ordersfuncstore01 \
  --resource-group orders-rg \
  --sku Standard_LRS

az functionapp create \
  --name orders-functions-we \
  --resource-group orders-rg \
  --storage-account ordersfuncstore01 \
  --flexconsumption-location westeurope \
  --runtime node \
  --runtime-version 22

The app name must be globally unique. The command also creates an Application Insights instance. Check supported Node.js versions in the Node.js developer reference (24.x and 22.x for the v4 model). With func init ... --model V4 the functions live in src/functions/*.js and are registered through app.http(), app.timer() and so on, which is what the examples below use.

HTTP Functions

// src/functions/handleWebhook.js — HTTP triggered function
const { app } = require('@azure/functions');

app.http('handleWebhook', {
    methods: ['POST'],
    authLevel: 'function',
    route: 'webhooks/{source}',
    handler: async (request, context) => {
        // authLevel 'function' requires the x-functions-key header or ?code= query parameter
        const source = request.params.source;
        const body = await request.json();

        context.log(`Webhook from ${source}, ${Object.keys(body).length} fields`);

        // Process webhook (processWebhook is your own function)
        const result = await processWebhook(source, body);

        return {
            status: 200,
            jsonBody: { received: true, id: result.id }
        };
    }
});

Timer Functions

// src/functions/dailyCleanup.js — runs on a CRON schedule
const { app } = require('@azure/functions');

app.timer('dailyCleanup', {
    schedule: '0 0 2 * * *', // NCRONTAB: {second} {minute} {hour} {day} {month} {day-of-week}; 2:00 AM UTC daily
    handler: async (myTimer, context) => {
        context.log('Running daily cleanup at', new Date().toISOString());

        const deleted = await cleanupExpiredSessions();   // your own function
        context.log(`Deleted ${deleted} expired sessions`);
    }
});

Queue Trigger with Output Binding

// src/functions/processOrder.js — triggered by queue, writes to Cosmos DB
const { app, output } = require('@azure/functions');

const cosmosOutput = output.cosmosDB({
    databaseName: 'app-db',
    containerName: 'processed-orders',
    connection: 'CosmosDBConnection',   // app setting name, or prefix of CosmosDBConnection__accountEndpoint for managed identity
    createIfNotExists: true
});

app.storageQueue('processOrder', {
    queueName: 'order-queue',   // lowercase letters, numbers and hyphens only
    connection: 'AzureWebJobsStorage',
    return: cosmosOutput,
    handler: async (queueItem, context) => {
        context.log('Processing order:', queueItem.orderId);

        const processedOrder = {
            id: queueItem.orderId,
            ...queueItem,
            status: 'processed',
            processedAt: new Date().toISOString()
        };

        // Returned value goes to Cosmos DB via output binding
        return processedOrder;
    }
});

Blob Trigger

// src/functions/processImage.js — triggered when blob is uploaded
// source: 'EventGrid' is the event-based trigger: lower latency, and the only kind Flex Consumption supports.
// It needs an Event Grid subscription on the storage account (see the blob trigger docs).
const { app } = require('@azure/functions');

app.storageBlob('processImage', {
    path: 'uploads/{name}',
    source: 'EventGrid',
    connection: 'AzureWebJobsStorage',
    handler: async (blob, context) => {
        const fileName = co
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

Вложенные файлы

_scores.json

FAQ

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

Build serverless applications with Azure Functions. Create HTTP and event-driven functions with input/output bindings, configure triggers for queues, timers, and blob storage. Use Durable Functions for stateful orchestration workflows.

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

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

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

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

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

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