devops-serverless
Use when the user asks about choosing a serverless platform, AWS Lambda vs Azure Functions vs Cloud Run functions, Serverless Framework, AWS SAM, Knative…
от j4flmao★ 47 звёзд на GitHub
Установить devops-serverless в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Serverless
Purpose
Design, deploy, and operate serverless functions (AWS Lambda, Azure Functions, GCP Cloud Functions) with event-driven patterns, cold start optimization, monitoring, security, and cost management.
Agent Protocol
Trigger
Exact user phrases: "serverless", "lambda", "azure functions", "cloud functions", "functions", "faas", "step functions", "serverless framework", "cold start", "provisioned concurrency", "reserved concurrency".
Input Context
- Cloud provider (AWS, Azure, GCP).
- Runtime (Node.js, Python, Go, Java, .NET, Rust).
- Event sources (API Gateway, SQS, S3, EventBridge, Kafka, Timer).
- Deployment framework (Serverless Framework, SAM, CDK, Pulumi, Terraform).
- Existing observability and security tools.
Output Artifact
Serverless function configuration with event source mapping, IAM, monitoring, and deployment config.
Response Format
YAML/JSON configuration (serverless.yml, SAM template) or Terraform HCL. No preamble.
Completion Criteria
- Function code with handler, event source, IAM permissions.
- Cold start strategy (provisioned concurrency, SnapStart, warmers).
- Monitoring: error rate, latency, invocation count, throttles.
- Cost estimate for expected invocation volume.
- Security: least-privilege IAM, VPC if needed, secrets via env/SSM.
- Deployment pipeline (CI/CD with testing and staged deployments).
- Observability: CloudWatch or equivalent, structured logging, distributed tracing.
Max Response Length
400 lines.
Quick Start
Define handler function → Configure event source (API Gateway HTTP API) → Set IAM role (least privilege) → Set memory/timeout → Deploy with Serverless Framework → Monitor with CloudWatch → Tune provisioned concurrency for critical functions.
Decision Tree: Serverless Provider
| Provider | Runtime Support | Event Sources | Cold Start | Cost Model |
|---|---|---|---|---|
| AWS Lambda | Node, Python, Go, Java, .NET, Ruby, Rust (custom) | 15+ native triggers | 1-10ms (SnapStart) | Per ms + requests |
| Azure Functions | C#, Node, Python, Java, PowerShell, Go (custom) | 10+ native triggers | 1-50ms (premium plan) | Per second + requests |
| GCP Cloud Functions | Node, Python, Go, Java, .NET, Ruby | 8+ native triggers | 100-500ms (1st gen) | Per second + invocations |
| Cloudflare Workers | JS/TS, WASM, Python (via Pyodide) | HTTP, KV, D1, R2, Queues | <1ms (v8 isolates) | Per request, very cheap |
| Knative / OpenFaaS | Any (container) | Any | 0-1000ms | Container-based |
Core Workflow
Step 1: Function Configuration
# serverless.yml (AWS Lambda)
service: user-service
frameworkVersion: '3'
provider:
name: aws
runtime: python3.12
region: us-east-1
stage: ${opt:stage, 'dev'}
memorySize: 512
timeout: 30
logRetentionInDays: 14
tracing:
lambda: true
apiGateway: true
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:Query
Resource: !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/users-${sls:stage}
- Effect: Allow
Action:
- ssm:GetParameter
Resource: !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/service/${sls:stage}/*
functions:
createUser:
handler: handlers/users.create
events:
- httpApi:
method: POST
path: /users
description: Create a new user record
memorySize: 1024
reservedConcurrency: 10
getUser:
handler: handlers/users.get
events:
- httpApi:
method: GET
path: /users/{id}
description: Get user by ID
provisionedConcurrency: 5
Step 2: Handler Implementation
# handlers/users.py
import json
import os
import boto3
from aws_lambda_powertools import Logger, Tracer, Metrics
from aws_lambda_powertools.metrics import MetricUnit
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
logger = Logger(service="user-service")
tracer = Tracer(service="user-service")
metrics = Metrics(namespace="UserService", service="user-service")
app = APIGatewayRestResolver()
dynamodb = boto3.resource("dynamodb")
table = dynamodb.Table(os.environ["TABLE_NAME"])
@app.post("/users")
@tracer.capture_method
def create_user():
body = app.current_event.json_body
user_id = body["id"]
# Validate input
if not body.get("email"):
return {"error": "email required"}, 400
table.put_item(Item={
"pk": f"USER#{user_id}",
"email": body["email"],
"name": body.get("name", ""),
"created_at": app.current_event.time
})
metrics.add_metric(name="UserCreated", unit=MetricUnit.Count, value=1)
return {"id": user_id, "message": "User created"}, 201
@app.get("/users/<id>")
@tracer.capture_method
def get_user(id: str):
result = table.get_item(K
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/event-sources.md
- references/function-optimization.md
- references/lambda-basics.md
- references/merged-backend-serverless.md
- references/serverless-advanced.md
- references/serverless-framework.md
- references/serverless-fundamentals.md
- references/serverless-observability.md
FAQ
Что делает скилл devops-serverless?
Use when the user asks about choosing a serverless platform, AWS Lambda vs Azure Functions vs Cloud Run functions, Serverless Framework, AWS SAM, Knative, OpenFaaS, API Gateway backends, or serverless cost. Produces serverless architectures and deployment configs. Not for cold start latency (use cloud-native-serverless-cold-starts) or Lambda internals (use cloud-native-aws-serverless).
Как установить скилл devops-serverless?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл devops-serverless запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…