Agent Skills
› serverless/serverless
› serverless-framework
serverless-framework
GitHub基于 Serverless Framework 在 AWS 上构建、部署和运维无服务器应用,处理 serverless.yml 配置及 CLI 命令。
Trigger Scenarios
用户提及 Serverless Framework 或 serverless/sls 命令
项目包含 serverless.yml 或 serverless-compose.yml
描述 AWS Lambda、API Gateway 等无服务器工作流
Install
npx skills add serverless/serverless --skill serverless-framework -g -y
SKILL.md
Frontmatter
{
"name": "serverless-framework",
"metadata": {
"scope": "user",
"author": "Serverless Inc.",
"version": "1",
"managed-by": "serverless-framework"
},
"description": "Builds, deploys, and operates applications on AWS with the Serverless Framework — serverless.yml configuration and the serverless\/sls CLI. Use whenever serverless.yml or serverless-compose.yml is present, the user runs or debugs any serverless\/sls command (deploy, dev, invoke, logs), mentions the Serverless Framework, or describes serverless work on AWS: Lambda functions, HTTP APIs, scheduled jobs, or event-driven workflows with any AWS service (API Gateway, S3, SQS, DynamoDB, and the rest)."
}
Serverless Framework
The Serverless Framework deploys applications to AWS from one
serverless.yml: functions, the events that trigger them, and any other AWS
resources they need, as one stack per stage.
Start here
- In every project with a
serverless.yml, runserverless agent setupin that directory, even when this skill is already installed. It adds the Framework's project skills (one per feature) to the project and reports sign-in, AWS credentials, and the service, with a fix for anything missing. Commit the project skills and keep them even when the service doesn't use a feature yet: each one loads only when a task involves its feature, including adding it. - Sort out sign-in with the user before the work that needs it: every command
that builds or deploys needs it and AWS credentials
(references/cli.md),
serverless packageincluded. - Give a database or other data store (DynamoDB, RDS, S3 buckets) its own
service, deployed once to a shared stage; the app service reads its names
and ARNs through
${param:...}(references/multi-service.md). - Develop a feature test-first on a personal stage, with
serverless dev, unit tests, and integration tests against the deployed stage (references/development-workflow.md). - Don't answer from memory.
serverless agent docslists the documentation that ships with the installed CLI, matching its version and with no network needed;serverless agent docs <path>prints a page.
First deploy of a service
serverless agent setupin the service directory.- Sign-in and AWS credentials, resolved with the user.
serverless package, which catches config and build errors before anything deploys. In a Compose project, deploy the services this one reads outputs from first (a data service, for example), then package it.serverless deploy --stage ${STAGE:-$USER}: the developer's own stage, not the shareddev(references/package-json-scripts.md). Use$USERonly when it is their name. If their name differs, deploy with it and have them setSTAGE; if you don't know it, or$USERis generic (root,ubuntu), ask.- Verify with a real request to the endpoint, or
serverless invokeandserverless logs.
Where to look
- A new service;
serverless.ymlkeys, events, IAM: references/serverless-yml.md. - A starting point to adapt, or a working service for a runtime, event, or integration: the Serverless Framework examples.
- Extending the Framework past its built-in features (check
serverless agent docsfirst): a plugin from the Serverless plugins, added withserverless plugin install --name <plugin>. The Framework builds JavaScript and TypeScript itself, so it needs no bundler plugin (serverless-esbuild, serverless-webpack, serverless-plugin-typescript), nor the plugins it now includes, such as serverless-python-requirements. - A database or other stateful resource, several services, values passed between services or stages, Compose, personal stages: references/multi-service.md, with references/package-json-scripts.md.
- Adding or changing a feature (
serverless dev, unit and integration tests): references/development-workflow.md. - Python functions (packaging dependencies, building for Lambda from macOS or
Windows, the local loop without
serverless dev): references/python.md. - Operating the CLI, credentials, CI/CD, troubleshooting: references/cli.md.
- The agent commands (
setup,docs,skills,inspect, the CLI's own MCP serverserverless mcp,dev): references/agent-commands.md. - Upgrading from v1–v3, or cleaning up older v4 config: the
serverless-upgradeskill. - Hosting an MCP server on AWS: the
serverless-mcpskill. - Untrusted, AI-generated, or per-session code in isolated compute: the
serverless-sandboxesskill.
agent setup installs these three project skills into the project; where they
are not installed, serverless agent skills read <name> prints them.
Gotchas
serverlesswith no arguments waits at an interactive template picker. Writeserverless.ymlyourself; a person at a terminal can run it to scaffold a project.- A project whose
frameworkVersionpins v1–v3, or whosedevDependencieslistserverlessv1–v3, cannot runagent setupor other v4 commands: setframeworkVersion: '4', remove the local copy (npm uninstall serverless), then runserverless agent setupand follow the serverless-upgrade skill. serverless packagechecks the config and the build; checks against the AWS account, such as a resource name already taken, happen at deploy.- To stop a background
serverless dev, find the session withpgrep -f 'sf-core\.js( [^ -][^ ]*)? dev( |$)'(the pid from$!can be the launcher's) and kill that pid, then deploy the stage to restore it (references/development-workflow.md). - When
serverless loginlists several orgs, ask which one the service belongs to and writeorg:intoserverless.yml(references/cli.md). - A configuration change pushed with
serverless deploy functionstays after a laterserverless deploy, which changes only what differs from the last template. Runserverless deploy function -f NAMEagain from the configuration you want. - An
npm warn install-scriptsline namingserverlessduringnpm i -g serverlessis harmless: the CLI downloads its binary on first run.
Version History
- bd2e5cc Current 2026-09-28 15:24


