[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75JMRAH1QRJD50V30EC5K0E":3,"skill-same:01M75JMRAH1QRJD50V30EC5K0E":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75JMRAH1QRJD50V30EC5K0E","netlify-functions",null,"Guide for writing Netlify serverless functions. Use when creating API endpoints, background processing, scheduled tasks, or any server-side logic using Netlify Functions. Covers modern syntax (default export + Config), TypeScript, path routing, background functions, scheduled functions, streaming, and method routing.","zhongjingyun\u002Fcodex-plugins","zhongjingyun","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F29746390?v=4","01M75HD6KCBVW17ZTD8FGWNX3Z","01M75HD6MEP2SRDSHCVAHHVZXV",30,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: netlify-functions\ndescription: Guide for writing Netlify serverless functions. Use when creating API endpoints, background processing, scheduled tasks, or any server-side logic using Netlify Functions. Covers modern syntax (default export + Config), TypeScript, path routing, background functions, scheduled functions, streaming, and method routing.\n---\n\n# Netlify Functions\n\n## Modern Syntax\n\nAlways use the modern default export + Config pattern. Never use the legacy `exports.handler` or named `handler` export.\n\n```typescript\nimport type { Context, Config } from \"@netlify\u002Ffunctions\";\n\nexport default async (req: Request, context: Context) => {\n  return new Response(\"Hello, world!\");\n};\n\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fhello\",\n};\n```\n\nThe handler receives a standard Web API `Request` and returns a `Response`. The second argument is a Netlify `Context` object.\n\n## File Structure\n\nPlace functions in `netlify\u002Ffunctions\u002F`:\n\n```\nnetlify\u002Ffunctions\u002F\n  _shared\u002F           # Non-function shared code (underscore prefix)\n    auth.ts\n    db.ts\n  items.ts           # -> \u002F.netlify\u002Ffunctions\u002Fitems (or custom path via config)\n  users\u002Findex.ts     # -> \u002F.netlify\u002Ffunctions\u002Fusers\n```\n\nUse `.ts` or `.mts` extensions. If both `.ts` and `.js` exist with the same name, the `.js` file takes precedence.\n\n## Path Routing\n\nDefine custom paths via the `config` export:\n\n```typescript\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fitems\",                    \u002F\u002F Static path\n  \u002F\u002F path: \"\u002Fapi\u002Fitems\u002F:id\",            \u002F\u002F Path parameter\n  \u002F\u002F path: [\"\u002Fapi\u002Fitems\", \"\u002Fapi\u002Fitems\u002F:id\"], \u002F\u002F Multiple paths\n  \u002F\u002F excludedPath: \"\u002Fapi\u002Fitems\u002Fspecial\", \u002F\u002F Excluded paths\n  \u002F\u002F preferStatic: true,                \u002F\u002F Don't override static files\n};\n```\n\nWithout a `path` config, functions are available at `\u002F.netlify\u002Ffunctions\u002F{name}`. Setting a `path` makes the function available **only** at that path.\n\nAccess path parameters via `context.params`:\n\n```typescript\n\u002F\u002F config: { path: \"\u002Fapi\u002Fitems\u002F:id\" }\nexport default async (req: Request, context: Context) => {\n  const { id } = context.params;\n  \u002F\u002F ...\n};\n```\n\n## Method Routing\n\n```typescript\nexport default async (req: Request, context: Context) => {\n  switch (req.method) {\n    case \"GET\":    return handleGet(context.params.id);\n    case \"POST\":   return handlePost(await req.json());\n    case \"DELETE\": return handleDelete(context.params.id);\n    default:       return new Response(\"Method not allowed\", { status: 405 });\n  }\n};\n\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fitems\u002F:id\",\n  method: [\"GET\", \"POST\", \"DELETE\"],\n};\n```\n\n## Background Functions\n\nFor long-running tasks (up to 15 minutes). The client receives an immediate `202` response; return values are ignored.\n\nName the file with a `-background` suffix:\n\n```\nnetlify\u002Ffunctions\u002Fprocess-background.ts\n```\n\nStore results externally (Netlify Blobs, database) for later retrieval.\n\n## Scheduled Functions\n\nRun on a cron schedule (UTC timezone):\n\n```typescript\nexport default async (req: Request) => {\n  const { next_run } = await req.json();\n  console.log(\"Next invocation at:\", next_run);\n};\n\nexport const config: Config = {\n  schedule: \"@hourly\", \u002F\u002F or cron: \"0 * * * *\"\n};\n```\n\nShortcuts: `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`. Scheduled functions have a **30-second timeout** and only run on published deploys.\n\n## Streaming Responses\n\nReturn a `ReadableStream` body for streamed responses (up to 20 MB):\n\n```typescript\nexport default async (req: Request) => {\n  const stream = new ReadableStream({ \u002F* ... *\u002F });\n  return new Response(stream, {\n    headers: { \"Content-Type\": \"text\u002Fevent-stream\" },\n  });\n};\n```\n\n## Context Object\n\n| Property | Description |\n|---|---|\n| `context.params` | Path parameters from config |\n| `context.geo` | `{ city, country: {code, name}, latitude, longitude, subdivision, timezone, postalCode }` |\n| `context.ip` | Client IP address |\n| `context.cookies` | `.get()`, `.set()`, `.delete()` |\n| `context.deploy` | `{ context, id, published }` |\n| `context.site` | `{ id, name, url }` |\n| `context.account.id` | Team account ID |\n| `context.requestId` | Unique request ID |\n| `context.waitUntil(promise)` | Extend execution after response is sent |\n\n## Environment Variables\n\nUse `Netlify.env` (not `process.env`) inside functions:\n\n```typescript\nconst apiKey = Netlify.env.get(\"API_KEY\");\n```\n\n## Resource Limits\n\n| Resource | Limit |\n|---|---|\n| Synchronous timeout | 60 seconds |\n| Background timeout | 15 minutes |\n| Scheduled timeout | 30 seconds |\n| Memory | 1024 MB |\n| Buffered payload | 6 MB |\n| Streamed payload | 20 MB |\n\n## Framework Considerations\n\nFrameworks with server-side capabilities (Astro, Next.js, Nuxt, SvelteKit, TanStack Start) typically generate their own serverless functions via adapters. You usually do not write raw Netlify Functions in these projects — the framework adapter handles server-side rendering and API routes. Write Netlify Functions directly when:\n\n- Using a client-side-only framework (Vite + React SPA, vanilla JS)\n- Adding background or scheduled tasks to any project\n- Building standalone API endpoints outside the framework's routing\n\nSee the **netlify-frameworks** skill for adapter setup.\n","# Netlify Functions\n\n## Modern Syntax\n\nAlways use the modern default export + Config pattern. Never use the legacy `exports.handler` or named `handler` export.\n\n```typescript\nimport type { Context, Config } from \"@netlify\u002Ffunctions\";\n\nexport default async (req: Request, context: Context) => {\n  return new Response(\"Hello, world!\");\n};\n\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fhello\",\n};\n```\n\nThe handler receives a standard Web API `Request` and returns a `Response`. The second argument is a Netlify `Context` object.\n\n## File Structure\n\nPlace functions in `netlify\u002Ffunctions\u002F`:\n\n```\nnetlify\u002Ffunctions\u002F\n  _shared\u002F           # Non-function shared code (underscore prefix)\n    auth.ts\n    db.ts\n  items.ts           # -> \u002F.netlify\u002Ffunctions\u002Fitems (or custom path via config)\n  users\u002Findex.ts     # -> \u002F.netlify\u002Ffunctions\u002Fusers\n```\n\nUse `.ts` or `.mts` extensions. If both `.ts` and `.js` exist with the same name, the `.js` file takes precedence.\n\n## Path Routing\n\nDefine custom paths via the `config` export:\n\n```typescript\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fitems\",                    \u002F\u002F Static path\n  \u002F\u002F path: \"\u002Fapi\u002Fitems\u002F:id\",            \u002F\u002F Path parameter\n  \u002F\u002F path: [\"\u002Fapi\u002Fitems\", \"\u002Fapi\u002Fitems\u002F:id\"], \u002F\u002F Multiple paths\n  \u002F\u002F excludedPath: \"\u002Fapi\u002Fitems\u002Fspecial\", \u002F\u002F Excluded paths\n  \u002F\u002F preferStatic: true,                \u002F\u002F Don't override static files\n};\n```\n\nWithout a `path` config, functions are available at `\u002F.netlify\u002Ffunctions\u002F{name}`. Setting a `path` makes the function available **only** at that path.\n\nAccess path parameters via `context.params`:\n\n```typescript\n\u002F\u002F config: { path: \"\u002Fapi\u002Fitems\u002F:id\" }\nexport default async (req: Request, context: Context) => {\n  const { id } = context.params;\n  \u002F\u002F ...\n};\n```\n\n## Method Routing\n\n```typescript\nexport default async (req: Request, context: Context) => {\n  switch (req.method) {\n    case \"GET\":    return handleGet(context.params.id);\n    case \"POST\":   return handlePost(await req.json());\n    case \"DELETE\": return handleDelete(context.params.id);\n    default:       return new Response(\"Method not allowed\", { status: 405 });\n  }\n};\n\nexport const config: Config = {\n  path: \"\u002Fapi\u002Fitems\u002F:id\",\n  method: [\"GET\", \"POST\", \"DELETE\"],\n};\n```\n\n## Background Functions\n\nFor long-running tasks (up to 15 minutes). The client receives an immediate `202` response; return values are ignored.\n\nName the file with a `-background` suffix:\n\n```\nnetlify\u002Ffunctions\u002Fprocess-background.ts\n```\n\nStore results externally (Netlify Blobs, database) for later retrieval.\n\n## Scheduled Functions\n\nRun on a cron schedule (UTC timezone):\n\n```typescript\nexport default async (req: Request) => {\n  const { next_run } = await req.json();\n  console.log(\"Next invocation at:\", next_run);\n};\n\nexport const config: Config = {\n  schedule: \"@hourly\", \u002F\u002F or cron: \"0 * * * *\"\n};\n```\n\nShortcuts: `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`. Scheduled functions have a **30-second timeout** and only run on published deploys.\n\n## Streaming Responses\n\nReturn a `ReadableStream` body for streamed responses (up to 20 MB):\n\n```typescript\nexport default async (req: Request) => {\n  const stream = new ReadableStream({ \u002F* ... *\u002F });\n  return new Response(stream, {\n    headers: { \"Content-Type\": \"text\u002Fevent-stream\" },\n  });\n};\n```\n\n## Context Object\n\n| Property | Description |\n|---|---|\n| `context.params` | Path parameters from config |\n| `context.geo` | `{ city, country: {code, name}, latitude, longitude, subdivision, timezone, postalCode }` |\n| `context.ip` | Client IP address |\n| `context.cookies` | `.get()`, `.set()`, `.delete()` |\n| `context.deploy` | `{ context, id, published }` |\n| `context.site` | `{ id, name, url }` |\n| `context.account.id` | Team account ID |\n| `context.requestId` | Unique request ID |\n| `context.waitUntil(promise)` | Extend execution after response is sent |\n\n## Environment Variables\n\nUse `Netlify.env` (not `process.env`) inside functions:\n\n```typescript\nconst apiKey = Netlify.env.get(\"API_KEY\");\n```\n\n## Resource Limits\n\n| Resource | Limit |\n|---|---|\n| Synchronous timeout | 60 seconds |\n| Background timeout | 15 minutes |\n| Scheduled timeout | 30 seconds |\n| Memory | 1024 MB |\n| Buffered payload | 6 MB |\n| Streamed payload | 20 MB |\n\n## Framework Considerations\n\nFrameworks with server-side capabilities (Astro, Next.js, Nuxt, SvelteKit, TanStack Start) typically generate their own serverless functions via adapters. You usually do not write raw Netlify Functions in these projects — the framework adapter handles server-side rendering and API routes. Write Netlify Functions directly when:\n\n- Using a client-side-only framework (Vite + React SPA, vanilla JS)\n- Adding background or scheduled tasks to any project\n- Building standalone API endpoints outside the framework's routing\n\nSee the **netlify-frameworks** skill for adapter setup.\n",{"name":5,"description":7},"main","67f0a2a774e0e57d841a7f3372c48e257f64c481","plugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions",2,"https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins","https:\u002F\u002Fgithub.com\u002Fzhongjingyun","2026-07-06 15:06:09",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add zhongjingyun\u002Fcodex-plugins --skill netlify-functions",{"tool":37,"command":38},"bunx","bunx skills add zhongjingyun\u002Fcodex-plugins --skill netlify-functions",{"tool":40,"command":41},"pnpm","pnpm dlx skills add zhongjingyun\u002Fcodex-plugins --skill netlify-functions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002FSKILL.md",true,[45,51,57,61],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",352,"https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fnetlify-small.svg","ASSET","资产文件",1291,"https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002Fassets\u002Fnetlify-small.svg",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"assets\u002Fnetlify.png",2686,"https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnetlify\u002Fskills\u002Fnetlify-functions\u002Fassets\u002Fnetlify.png",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":15},"LICENSE.txt","LICENSE","许可证",10776,[67,75,83,91,98,105],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75KA59Q22JVCRD3E955XW43","android-emulator-qa","Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftest-android-apps\u002Fskills\u002Fandroid-emulator-qa\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftest-android-apps\u002Fskills\u002Fandroid-emulator-qa\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M75K6A00090T4DDE3QGJNE22","supabase-postgres-best-practices","Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.","MIT","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsupabase\u002Fskills\u002Fsupabase-postgres-best-practices\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75K257HZ6ETNTAY5CEYB7JZ","sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsentry\u002Fskills\u002Fsentry\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsentry\u002Fskills\u002Fsentry\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M75JZG6QHND8KRPRFV8BTFBG","render-workflows","Sets up, develops, tests, and deploys Render Workflows. Covers first-time scaffolding (via CLI or manual), SDK installation (Python or TypeScript), task patterns (retries, subtasks, fan-out), local development, Dashboard deployment, and troubleshooting. Use when a user wants to set up Render Workflows for the first time, scaffold a workflow service, add or modify workflow tasks, test workflows locally, or deploy workflows to Render.","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Frender\u002Fskills\u002Frender-workflows\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M75JZCW206VJRSSASBHKEVZ3","render-web-services","Configures Render web services—port binding, TLS, health checks, custom domains, auto-deploy, PR previews, persistent disks, and deploy lifecycle. Use when the user needs to set up a web service, fix health check failures, add a custom domain, configure zero-downtime deploys, or troubleshoot port binding issues.","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Frender\u002Fskills\u002Frender-web-services\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M75JZ7W3CFG5M7TYK7F2V2F1","render-static-sites","Deploys and configures static sites on Render's global CDN—build commands, publish paths, SPA routing, redirects, custom headers, and PR previews. Use when the user needs to deploy a static site, set up a React\u002FVue\u002FHugo\u002FGatsby frontend, configure SPA fallback routing, add redirect rules, customize response headers, or choose between a static site and a web service for their frontend. Trigger terms: static site, CDN, SPA, single-page app, React deploy, Vue deploy, Hugo, Gatsby, Docusaurus, Jekyll, staticPublishPath.","https:\u002F\u002Fgithub.com\u002Fzhongjingyun\u002Fcodex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Frender\u002Fskills\u002Frender-static-sites\u002FSKILL.md",[],[]]