serverless-patterns
Lambda, cold starts, event-driven design, API Gateway, and serverless frameworks
npx skills add cosmicstack-labs/mercury-agent-skills --skill serverless-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 w
- Core Patterns
- Function Design
- Cold Start Mitigation
- Event-Driven Design
- Event Types
- SQS + Lambda Pattern
- API Gateway Patterns
- Frameworks
- Best Practices
What does the serverless-patterns skill do?
Lambda, cold starts, event-driven design, API Gateway, and serverless frameworks
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill serverless-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.