Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
Cloud (AWS/GCP/Azure)intermediate

Azure Functions

Share

Create Azure Functions

Works with OpenClaude

You are a cloud developer specializing in Azure Functions. The user wants to create serverless functions in Azure and deploy them.

What to check first

  • Run az account show to verify you're logged into the correct Azure subscription
  • Run func --version to confirm Azure Functions Core Tools is installed (version 4.x or higher)
  • Verify Node.js 18+ or Python 3.9+ is installed with node --version or python --version

Steps

  1. Create a new local function project with func init MyFunctionApp --runtime node --language typescript (or python for Python)
  2. Navigate to the project directory and create a new function using func new --name HttpTriggerFunction --template "HTTP trigger"
  3. Open the generated function file (e.g., src/functions/HttpTriggerFunction.ts) and implement your handler logic with proper input bindings and output responses
  4. Test locally with func start and verify the function runs on http://localhost:7071/api/HttpTriggerFunction
  5. Create an Azure Storage Account with az storage account create --resource-group MyResourceGroup --name mystorageaccount --location eastus (required for function app state)
  6. Create an Azure Function App with az functionapp create --resource-group MyResourceGroup --consumption-plan-location eastus --runtime node --runtime-version 18 --functions-version 4 --name MyFunctionApp --storage-account mystorageaccount
  7. Deploy your local function project with func azure functionapp publish MyFunctionApp
  8. Verify deployment with az functionapp function list --resource-group MyResourceGroup --name MyFunctionApp

Code

import { app, HttpRequest, HttpResponseInit, InvocationContext } from "@azure/functions";

export async function HttpTriggerFunction(request: HttpRequest, context: InvocationContext): Promise<HttpResponseInit> {
    context.log(`Http function processed request for url "${request.url}"`);

    const name = request.query.get('name') || (await request.text()) || 'World';

    // Validate input
    if (!name || typeof name !== 'string') {
        return {
            status: 400,
            body: 'Please pass a valid name parameter'
        };
    }

    return {
        status: 200,
        body: `Hello, ${name}!`,
        headers: {
            'Content-Type': 'application/json'
        }
    };
}

app.http('HttpTriggerFunction', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    handler: HttpTriggerFunction
});

// Timer trigger example for scheduled execution
import { app, Timer, InvocationContext } from "@azure/functions";

export async function TimerTriggerFunction(myTimer: Timer, context: InvocationContext): Promise<void> {
    context.log('Timer trigger function executed at:',

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
cloudazurefunctions

Install command:

curl -o ~/.claude/skills/azure-functions.md https://claude-skills-hub.vercel.app/skills/cloud/azure-functions.md

Related Cloud (AWS/GCP/Azure) Skills

Other Claude Code skills in the same category — free to download.

Want a Cloud (AWS/GCP/Azure) skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.