Serverless Patterns
Lambda, cold starts, event-driven design, API Gateway, and serverless frameworks
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill serverless-patternsgit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/backend/serverless-patterns ~/.claude/skills/serverless-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Serverless Patterns
Build scalable serverless applications.
## Core Patterns
### Function Design
- Single responsibility per function
- Stateless (use external storage for state)
- Idempotent handlers (retry-safe)
- Receive event, process, return/forward
### Cold Start Mitigation
| Strategy | Effect | Tradeoff |
|----------|--------|----------|
| Provisioned Concurrency | Zero cold starts | Cost |
| Smaller runtime (Node/Python) | Faster start | Language choice |
| Keep-alive ping | Reduce frequency | Extra cost |
| Lambda SnapStart (Java) | Fast restore | State constraints |
| Lambda@Edge | Regional distribution | 1MB response limit |
## Event-Driven Design
### Event Types
```yaml
Events:
- UserRegistered { userId, email, timestamp }
- OrderPlaced { orderId, items, total }
- PaymentProcessed { orderId, amount, status }
- EmailSent { to, template, variables }
```
### SQS + Lambda Pattern
```
API Gateway → Lambda (producer) → SQS → Lambda (consumer) → DynamoDB
```
Benefits: decoupling, buffering, retry, dead-letter queue.
## API Gateway Patterns
- Request validation at gateway level
- Caching for GET endpoints (TTL per route)
- WAF for rate limiting and IP blocks
- Custom domain with ACM certificate
- Usage plans for API keys
## Frameworks
- **SAM** (AWS) — YAML/YML, local testing
- **Serverless Framework** — Multi-cloud, plugins
- **CDK** (AWS) — Full programming languages
- **Terraform** — If already using for other infraDetails
- Skill name
serverless-patterns- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/backend/serverless-patterns/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Serverless Patterns skill do?
Lambda, cold starts, event-driven design, API Gateway, and serverless frameworks
How do I install the Serverless Patterns skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill serverless-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Serverless Patterns popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Sre Practices
492cosmicstack-labs/mercury-agent-skills
SLIs/SLOs/SLAs, error budgets, incident response, postmortems, and reliability patterns
Monitoring Observability
492cosmicstack-labs/mercury-agent-skills
Prometheus, Grafana, ELK/Loki, Jaeger, metrics, logging, tracing, and alerting
Terraform Iac
492cosmicstack-labs/mercury-agent-skills
State management, modules, workspaces, remote backends, and multi-environment strategies
Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.