Netlify Functions
技能 活跃Netlify serverless 函数的编写指南。用于创建 API 端点、后台处理、计划任务或使用 Netlify Functions 的任何服务器端逻辑。涵盖现代语法(default export + Config)、TypeScript、路径路由、后台函数、计划函数、流式传输和方法路由。
作为开发人员编写 Netlify serverless 函数的事实参考,使他们能够正确地构建 API 端点、后台任务和计划作业。
功能
- 现代 default export + Config 语法
- 路径和方法路由
- 后台和计划函数
- 流式响应
- Context 对象详情
使用场景
- 使用 Netlify Functions 创建 API 端点
- 实现后台处理任务
- 设置计划的 serverless 任务
- 为客户端框架开发服务器端逻辑
非目标
- 特定于框架的 serverless 函数生成(由适配器处理)
- 通过 CLI 管理 Netlify Functions 部署
- 深入研究用于函数实现的特定 Node.js 库
Maintenance
- warning:Dependency ManagementSKILL.md 提到了 Netlify.env,但没有明确说明 `@netlify/functions` 等依赖项是如何管理或更新的,也没有提供锁文件。
Versioning
- warning:Release Management技能本身没有明确的版本控制(semver、变更日志、发布),并且安装说明在某些 CLI 设置中引用了 `main`。
Execution
- warning:Pinned dependencies虽然 Netlify Functions 运行时由 Netlify 管理,但该技能没有明确声明或固定其自身的开发依赖项(例如 `@netlify/functions`)或提供锁文件。
Practical Utility
- info:Edge cases该技能提到了框架考虑因素和资源限制,但没有明确详细说明常见边缘情况(如凭证过期或速率限制)的失败模式或恢复步骤。
Portability
- info:Cross-skill couplingREADME 提到了其他 Netlify 技能并相互引用,但 `netlify-functions` 技能本身不明确依赖或处理需要跨技能协调的相邻任务。
安装
请先添加 Marketplace
/plugin marketplace add netlify/context-and-tools/plugin install context-and-tools@netlify-context-and-tools质量评分
类似扩展
Netlify Identity
100用于身份验证、用户注册、登录、密码恢复、OAuth 提供商、基于角色的访问控制或保护路由和函数。始终使用 `@netlify/identity`。切勿使用 `netlify-identity-widget` 或 `gotrue-js` — 它们已弃用。
Netlify Edge Functions
98Netlify Edge Functions 的编写指南。适用于构建中间件、基于地理位置的逻辑、请求/响应操作、身份验证检查、A/B 测试或任何低延迟边缘计算。涵盖 Deno 运行时、context.next() 中间件模式、地理位置以及何时选择边缘计算与无服务器计算。
X Twitter Scraper
100当用户需要通过 Xquik 获取 X (Twitter) 数据或执行需要确认的 X 操作时使用:推文搜索、用户查找、关注者提取、媒体下载、监控、Webhook、MCP、SDK、发布、点赞、私信和个人资料更新。需要 Xquik API 密钥。切勿索要 X 登录凭据。
Slack
100Use the Slack tool to react, pin/unpin, send, edit, delete messages, or fetch Slack member info.
Github
100Use gh for GitHub issues, PR status, CI/logs, comments, reviews, releases, and API queries.
Product Self Knowledge
100Stop and consult this skill whenever your response would include specific facts about Anthropic's products. Covers: Claude Code (how to install, Node.js requirements, platform/OS support, MCP server integration, configuration), Claude API (function calling/tool use, batch processing, SDK usage, rate limits, pricing, models, streaming), and Claude.ai (Pro vs Team vs Enterprise plans, feature limits). Trigger this even for coding tasks that use the Anthropic SDK, content creation mentioning Claude capabilities or pricing, or LLM provider comparisons. Any time you would otherwise rely on memory for Anthropic product details, verify here instead — your training data may be outdated or wrong.