Serverless
A comprehensive skill catalog for AI agents
npx -y skills add G1Joshi/Agent-Skills --skill serverlessAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Serverless architecture with FaaS and BaaS. Use for cloud functions.
SKILL.md
2.9 KB, 637 tokens by cl100k_base, as published. Nobody here has run it
Serverless
Serverless is a cloud-native development model for building and running applications without managing servers. The cloud provider handles the routine work of provisioning, maintaining, and scaling the server infrastructure.
When to Use
- Event-driven background tasks (Image processing, Cron jobs).
- APIs with spiky or unpredictable traffic (Auto-scales instantly).
- Startup/MVP where "Scale to Zero" (Zero cost when idle) is critical.
- Glue code between cloud services (e.g., S3 trigger -> Lambda -> DynamoDB).
Quick Start
// AWS Lambda Handler (Node.js)
export const handler = async (event) => {
console.log("Event received:", JSON.stringify(event));
const name = event.queryStringParameters?.name || "World";
return {
statusCode: 200,
body: JSON.stringify({ message: `Hello, ${name}!` }),
};
};
# serverless.yml (Serverless Framework)
service: my-api
provider:
name: aws
runtime: nodejs20.x
functions:
hello:
handler: handler.hello
events:
- httpApi:
path: /hello
method: get
Core Concepts
FaaS (Function as a Service)
Upload code (Function), define triggers (HTTP, Queue, DB, Timer). Run only when triggered.
Cold Start
The latency incurred when a function is invoked after being idle (container spinning up).
Statelessness
Functions are ephemeral. Store state in external managed services (Redis, DynamoDB, S3).
Common Patterns
Fan-out
One event triggers multiple parallel functions (e.g., Upload -> [Resize, Analyze, Back up]).
Strangler Fig
Migrating a monolith by gradually replacing endpoints with serverless functions routed via API Gateway.
Best Practices
Do:
- Use Frameworks (SST, Serverless Framework, SAM) for IaC.
- optimize Cold Starts (keep functions small, use provisioned concurrency if needed).
- Use Managed Services (DynamoDB, EventBridge) instead of custom code logic.
Don't:
- Don't use Serverless for Long-Running tasks (Gateways timeout at ~30s, Lambdas at 15m). Use Fargate/Batch for that.
- Don't ignore vendor lock-in (though often the speed creates enough value to justify it).
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
Timeout | Function took too long. | Increase timeout setting; optimize code; move to async pattern. |
OOM (Out of Memory) | Processing large files. | Increase RAM (allocates more CPU too); stream data instead of loading all in memory. |
References
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.