agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when building serverless systems on AWS. Covers Lambda design, cold starts, event-driven patterns with EventBridge and SQS, idempotency, step functions, and the limits that shape the architecture. Trigger on "lambda cold starts are killing latency", "sqs messages processed
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill aws-serverless -a windsurf -y
name: aws-serverless description: Use when building serverless systems on AWS. Covers Lambda design, cold starts, event-driven patterns with EventBridge and SQS, idempotency, step functions, and the limits that shape the architecture. Trigger on "lambda cold starts are killing latency", "sqs messages processed twice". Do not use for container workloads on a cluster — see the kubernetes skill; for broker-agnostic events, see the event-driven-architecture skill. metadata: category: devops version: 1.0.0 tags: [serverless, lambda, eventbridge, sqs, step-functions]
Build serverless systems that handle retries and partial failure correctly. The platform will retry your function; whether that is harmless is entirely your design decision.
1. **Assume the function will run twice** — SQS is at-least-once. EventBridge is at-least-once. Asynchronous Lambda invocations retry twice by default. Idempotency is not optional. 2. **Report partial batch failures** — With SQS batches, a single failed message re-delivers the *entire* batch unless you return `batchItemFailures`. That is how one poison message causes ten thousand duplicate side effects. 3. **Keep the handler thin** — Parse the event, call a plain function, map the result. The business logic should be testable without a Lambda context. 4. **Initialize outside the handler** — Database clients, SDK clients, and config are reused across warm invocations. Creating them per invocation is a per-request cost you pay forever. 5. **Tune memory by measurement** — Memory determines CPU. A function at 1024 MB often finishes in a third of the time of one at 256 MB, for the same or lower total cost. 6. **Set the DLQ and the alarm** — An asynchronous function without a DLQ silently discards events after its retries. You will not know.
**SQS handler: partial batch failure plus idempotency:**
export const handler = async (event: SQSEvent): Promise<SQSBatchResponse> => {
const batchItemFailures: SQSBatchItemFailure[] = [];
for (const record of event.Records) {
try {
const order = JSON.parse(record.body) as OrderPlaced;
// Conditional write: the second delivery of the same event is a no-op.
await ddb.send(new PutItemCommand({
TableName: PROCESSED_TABLE,
Item: { pk: { S: `event#${order.eventId}` }, ttl: { N: String(ttl(14)) } },
ConditionExpression: "attribute_not_exists(pk)",
}));
await fulfil(order);
} catch (err) {
if (err instanceof ConditionalCheckFailedException) {
continue; // already processed: succeed silently
}
// Fail only this message. The rest of the batch is acknowledged.
batchItemFailures.push({ itemIdentifier: record.messageId });
console.error("processing failed", { messageId: record.messageId, err });
}
}
return { batchItemFailures };
};**Retries and DLQ declared, not assumed:**
Resources:
OrdersQueue:
Type: AWS::SQS::Queue
Properties:
VisibilityTimeout: 180 # >= 6x the function timeout
RedrivePolicy:
deadLetterTargetArn: !GetAtt OrdersDlq.Arn
maxReceiveCount: 5 # then it stops retrying and lands in the DLQA curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.