Builds production-grade AWS serverless apps with Lambda, API Gateway, DynamoDB, and SQS/SNS event-driven patterns. Generates handler structures, SAM/CDK templates, and cold-start optimization strategies.
Ships in 10-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
适用:在 AWS 上构建生产级无服务器应用,包括 Lambda 函数实现、API Gateway(HTTP/REST)后端、DynamoDB 数据访问、SQS/SNS/DynamoDB Streams 等事件驱动处理,以及 SAM/CDK 部署与冷启动优化。
不该用(负边界):
核心原则:先测量再优化内存与超时;对延迟敏感负载压低冷启动;Java/.NET 用 SnapStart;简单场景优先 HTTP API 而非 REST API;用 DLQ + 重试为失败设计;部署包尽量小;配置走环境变量;结构化日志带 correlation/request ID。
context.callbackWaitsForEmptyEventLoop = false。ReportBatchItemFailures 局部失败重试;对数据变更实时反应用 DynamoDB Streams。sam build → sam local start-api / sam local invoke 调试,再 sam deploy --guided。# 安装与初始化
pip install aws-sam-cli
sam init --runtime nodejs20.x --name my-api
# 构建 / 本地运行 / 单函数调用
sam build
sam local start-api
sam local invoke GetItemFunction --event events/get.json
sam local invoke --debug-port 5858 GetItemFunction # Node.js 调试
sam deploy --guided
# CDK
npm install -g aws-cdk
cdk init app --language typescript
cdk synth # 生成 CloudFormation
cdk diff # 查看变更
cdk deploy # 部署
Node.js Handler(客户端外置 + 统一错误处理):
const { DynamoDBClient } = require('@aws-sdk/client-dynamodb');
const { DynamoDBDocumentClient, GetCommand } = require('@aws-sdk/lib-dynamodb');
const docClient = DynamoDBDocumentClient.from(new DynamoDBClient({}));
exports.handler = async (event, context) => {
context.callbackWaitsForEmptyEventLoop = false;
try {
const body = typeof event.body === 'string' ? JSON.parse(event.body) : event.body;
const result = await docClient.send(new GetCommand({
TableName: process.env.TABLE_NAME, Key: { id: body.id }
}));
return { statusCode: 200,
headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' },
body: JSON.stringify(result.Item) };
} catch (error) {
console.error(JSON.stringify({ error: error.message, requestId: context.awsRequestId }));
return { statusCode: error.statusCode || 500,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ error: error.message || 'Internal server error' }) };
}
};
SAM 模板(HTTP API + Lambda + DynamoDB,最小权限策略):
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Runtime: nodejs20.x
Timeout: 30
MemorySize: 256
Environment: { Variables: { TABLE_NAME: !Ref ItemsTable } }
Resources:
HttpApi:
Type: AWS::Serverless::HttpApi
Properties: { StageName: prod }
GetItemFunction:
Type: AWS::Serverless::Function
Properties:
Handler: src/handlers/get.handler
Events:
GetItem: { Type: HttpApi, Properties: { ApiId: !Ref HttpApi, Path: /items/{id}, Method: GET } }
Policies: [ DynamoDBReadPolicy: { TableName: !Ref ItemsTable } ]
ItemsTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions: [ { AttributeName: id, AttributeType: S } ]
KeySchema: [ { AttributeName: id, KeyType: HASH } ]
BillingMode: PAY_PER_REQUEST
SQS 触发 + 局部批失败:VisibilityTimeout 设为 Lambda 超时的 6 倍,配 RedrivePolicy(maxReceiveCount: 3)指向 DLQ,函数事件加 FunctionResponseTypes: [ReportBatchItemFailures],handler 返回 { batchItemFailures: [{ itemIdentifier: record.messageId }] }。
DynamoDB Streams:StreamViewType: NEW_AND_OLD_IMAGES,按 eventName(INSERT/MODIFY/REMOVE)分发,用 @aws-sdk/util-dynamodb 的 unmarshall 解析。
锋利边缘(高危):
INIT_REPORT Init Duration,靠缩包、懒加载重依赖、SDK v3 模块化导入、SnapStart 降低。context.getRemainingTimeInMillis() 感知剩余时间优雅退出;给所有下游 HTTP 调用设 timeout。for await (const chunk of stream)),按需加 MemorySize(128-10240,更多内存=更多 CPU),用 Lambda Power Tuning 找最优值。processed/)+ 幂等检查,设 ReservedConcurrentExecutions 作熔断,配 CloudWatch 调用次数告警。中危:
callbackWaitsForEmptyEventLoop = false,并显式关闭数据库连接(finally { await connection.end() })。getSignedUrl)上传/下载,而非穿透网关。校验清单(部署前自检):
callbackWaitsForEmptyEventLoop=false;默认 128MB 内存常偏低;1-3 秒超时对外部调用偏短。采编自 sickn33/antigravity-awesome-skills(MIT)。原 skill 标注上游来源为 vibeship-spawner-skills(Apache 2.0)。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
66 skills in this plugin
/agentmail-email-infra当 AI 智能体需要真实邮箱完成注册/验证码/事务通信时使用;通过 AgentMail REST API 开通账号、收发邮件、注册 Webhook、查询 karma 余额并产出可执行调用;不适用于自建/企业 SMTP/IMAP 或个人邮箱代收。触发词:AgentMail、智能体邮箱、theagentmail.net/agentphone-voice-sms-agents当需要给 AI 代理配备电话号码、发起/接听语音通话、收发短信、查看通话转写或配置 Webhook 时使用;调用 AgentPhone REST API(base=https://api.agentphone.to/v1)完成代理/号码/通话/短信/Webhook/用量的全生命周期管理,产出可直接执行的 curl 与 Webhook 处理代码;不适用于自建 Twilio/SIP/STUN 等底层电信栈或非 AgentPhone 平台。触发词:电话代理、语音通话、短信、号码、Webhook、转写。/ai-native-cli-design当设计/改造供 AI 智能体调用的命令行工具时使用;按 core/recommended/ecosystem 三层产出 JSON 优先、可校验的 CLI 契约(默认 JSON、结构化错误、退出码、护栏、agent/ 目录与自描述);不适用于纯人类交互 CLI、GUI 或库 API 设计;触发词:agent CLI、AI 友好命令行、CLI JSON 输出、退出码规范、agent/ 目录/amazon-alexa-skill-builder当需要用 ASK CLI + AWS Lambda 开发 Amazon Alexa 语音技能、并以 Claude 作为对话大脑(含 DynamoDB 记忆、Polly 语音、APL 屏显、Smart Home 控制)时使用;做交互模型/Lambda 处理器/部署脚本的搭建与产出;不适用于纯网页/移动 App 或非 Alexa 平台语音助手;触发词:Alexa、ASK CLI、语音技能、Smart Home/apify-actor-development当需要创建、修改或调试 Apify Actor(无服务器 Docker 抓取/自动化程序)时使用;引导选模板、配 input/output schema 与 actor.json、写入口逻辑、本地 apify run 测试并 apify push 部署;不适用于已有现成 Actor 直接调用(用 apify-ecommerce-scraper)、无 APIFY_TOKEN、或普通网页抓取无需打包为 Actor。触发词:apify actor、apify create、apify push、input_schema、actor.json、爬虫部署、serverless scraper、crawlee/apify-actorization当需要把现有 JS/TS、Python 脚本或任意 CLI 工具改造成可在 Apify 平台运行的 Actor(接受 JSON 输入、产出结构化 JSON、打包为 Docker 镜像并部署/变现)时使用;做 apify init 初始化 + SDK 生命周期包裹 + 配置 input/output/actor schema + apify run 本地测试 + apify push 部署,产出可上架的 Actor;不适用于从零写新爬虫、单纯调用现成 Actor、或无 apify CLI/APIFY_TOKEN。触发词:apify actor、actorization、改造成 actor、apify push、apify init、input_schema、serverless 爬虫/10-platform:aws-serverless-builderfrom 10-platform
npx claudepluginhub findscripter/everything-skills --plugin 10-platformOther plugins' skills for the same job