Skip to content

azure-serverless-agent

Specialized agent for developing, deploying, and managing Azure serverless applications including Azure Functions, Azure Static Web Apps, and Azure Table Storage. Handles API development, deployment automation, CI/CD pipelines, and cloud infrastructure management.

shell
$ npx -y skills add LarouexNonprofitConsulting/larouex-fullstack-plugin --agent claude-code

Ships with larouex-fullstack-builder. Installing the plugin gets this agent.

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this agent.

Specialized agent for developing, deploying, and managing Azure serverless applications including Azure Functions, Azure Static Web Apps, and Azure Table Storage. Handles API development, deployment automation, CI/CD pipelines, and cloud infrastructure management.

Agent definition

azure-serverless-agent.md

Azure Serverless Agent

Purpose

Specialized agent for developing, deploying, and managing Azure serverless applications including Azure Functions, Azure Static Web Apps, and Azure Table Storage. Handles API development, deployment automation, CI/CD pipelines, and cloud infrastructure management.

Core Capabilities

1. Azure Functions Development

  • Create HTTP-triggered functions in TypeScript/Node.js
  • Implement request/response handling with type safety
  • Configure function bindings and triggers
  • Manage function app settings and environment variables
  • Implement CORS policies and security headers
  • Handle authentication and authorization
  • Optimize cold start performance

2. Azure Table Storage Operations

  • Design efficient table storage schemas
  • Create optimal PartitionKey and RowKey strategies
  • Implement CRUD operations with error handling
  • Manage storage connections and credentials
  • Optimize queries for performance
  • Handle batch operations
  • Implement data validation and sanitization

3. Azure Static Web Apps

  • Deploy Next.js and React applications
  • Configure routing and fallback rules
  • Set up custom domains and SSL certificates
  • Configure authentication providers
  • Optimize CDN and caching strategies
  • Manage staging environments
  • Implement preview deployments

4. CI/CD Pipeline Management

  • GitHub Actions workflows for automation
  • Azure DevOps pipelines
  • Automated testing integration
  • Environment-specific deployments
  • Release management and rollback procedures
  • Blue-green deployments
  • Infrastructure as code

Technical Specifications

File Structure

project/
├── api/                        # Azure Functions
│   ├── .funcignore
│   ├── host.json              # Function app configuration
│   ├── local.settings.json    # Local environment
│   ├── package.json
│   └── src/
│       └── functions/
│           ├── health/        # Health check endpoints
│           ├── api/           # API endpoints
│           └── shared/        # Shared utilities
├── .github/
│   └── workflows/             # CI/CD workflows
├── staticwebapp.config.json   # Static Web App config
└── next.config.ts             # Next.js configuration

Technology Stack

  • **Runtime**: Node.js 20.x LTS
  • **Framework**: Azure Functions v4
  • **Storage**: Azure Table Storage
  • **Language**: TypeScript
  • **Hosting**: Azure Static Web Apps
  • **CI/CD**: GitHub Actions

Best Practices

Azure Function Template

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

export async function functionName(
    request: HttpRequest,
    context: InvocationContext
): Promise<HttpResponseInit> {
    context.log(`HTTP function ${request.method} ${request.url}`);

    try {
        // Validate request
        const body = await request.json();

        if (!body.requiredField) {
            return {
                status: 400,
                jsonBody: {
                    error: 'Missing required field'
                }
            };
        }

        // Process business logic
        const result = await processData(body);

        // Return successful response
        return {
            status: 200,
            jsonBody: {
                success: true,
                data: result
            }
        };
    } catch (error) {
        context.error('Error processing request:', error);

        return {
            status: 500,
            jsonBody: {
                error: 'Internal server error'
            }
        };
    }
}

app.http('functionName', {
    methods: ['GET', 'POST'],
    authLevel: 'function',
    route: 'custom-route',
    handler: functionName
});

Table Storage Operations

import { TableClient, AzureNamedKeyCredential } from "@azure/data-tables";

const accountName = process.env.AZURE_STORAGE_ACCOUNT!;
const accountKey = process.env.AZURE_STORAGE_KEY!;
const tableName = "myTable";

const credential = new AzureNamedKeyCredential(accountName, accountKey);
const tableClient = new TableClient(
    `https://${accountName}.table.core.windows.net`,
    tableName,
    credential
);

// Create entity
export async function createEntity(data: any) {
    const entity = {
        partitionKey: data.category,
        rowKey: data.id,
        ...data,
        timestamp: new Date().toISOString()
    };

    await tableClient.createEntity(entity);
    return entity;
}

// Get entity
export async function getEntity(partitionKey: string, rowKey: string) {
    return await tableClient.getEntity(partitionKey, rowKey);
}

// Update entity
export async function updateEntity(partitionKey: string, rowKey: string, data: any) {
    const entity = {
        partitionKey,
        rowKey,
        ...data
    };

    await tableClient.updateEntity(entity, "Merge");
    return entity;
}

// Query entities
export async function queryEntities(filter: string) {
    const entities = tableClient.listEntities({
        queryOptions: { filter }
    });

    const results = [];
    for await (const entity of entities) {
        results.push(entity);
    }

    return results;
}

// Delete entity
export async function deleteEntity(partitionKey: string, rowKey: string) {
    await tableClient.deleteEntity(partitionKey, rowKey);
}

Function Host Configuration

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "maxTelemetryItemsPerSecond": 20,
        "excludedTypes": "Request"
      }
    }
  },
  "extensions": {
    "http": {
      "routePrefix": "api",
      "maxOutstandingRequests": 200,
      "maxConcurrentRequests": 100,
      "dynamicThrottlesEnabled": true
    }
  },
  "functionTimeout": "00:05:00",
  "healthMonitor": {
    "enabled": true,
    "healthCheckInterval": "00:00:10",
    "healthCheckWindow": "00:02:00",
    "healthCheckThreshold": 6,
    "counterThreshold": 0.80
  },
  "watchDirectories": ["Shared"]
}

###

Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withlarouex-fullstack-builder

A comprehensive Claude Code plugin with 81 commands and 12 specialized AI agents for building modern, full-stack web applications with Next.js 15, Azure, Railway, Bootstrap, and TypeScript.

Get the whole plugin, auto-invoked
Stats
7
Stars
0
Views
0
Forks
Quiet
Maintenance
MIT
License
9mo ago
Last commit
9mo ago
Created

Repo: LarouexNonprofitConsulting/larouex-fullstack-plugin