[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M799ZVM4DSEP2NR8SWCR0CTD":3,"skill-same:01M799ZVM4DSEP2NR8SWCR0CTD":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M799ZVM4DSEP2NR8SWCR0CTD","bun-http-server",null,"Use when building HTTP servers with Bun.serve, handling requests\u002Fresponses, implementing routing, creating REST APIs, or configuring fetch handlers.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-http-server\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bun-http-server\ndescription: Use when building HTTP servers with Bun.serve, handling requests\u002Fresponses, implementing routing, creating REST APIs, or configuring fetch handlers.\nmetadata:\n  version: \"1.0.0\"\nlicense: MIT\n---\n\n# Bun HTTP Server\n\nBun has a built-in high-performance HTTP server via `Bun.serve()`.\n\n## Quick Start\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    return new Response(\"Hello World!\");\n  },\n});\n\nconsole.log(`Server running at http:\u002F\u002Flocalhost:${server.port}`);\n```\n\n## Request Handling\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Method\n    console.log(req.method); \u002F\u002F GET, POST, etc.\n\n    \u002F\u002F Path\n    console.log(url.pathname); \u002F\u002F \u002Fapi\u002Fusers\n\n    \u002F\u002F Query params\n    console.log(url.searchParams.get(\"id\")); \u002F\u002F ?id=123\n\n    \u002F\u002F Headers\n    console.log(req.headers.get(\"Content-Type\"));\n\n    return new Response(\"OK\");\n  },\n});\n```\n\n## Body Parsing\n\n```typescript\nBun.serve({\n  async fetch(req) {\n    \u002F\u002F JSON\n    const json = await req.json();\n\n    \u002F\u002F Form data\n    const form = await req.formData();\n\n    \u002F\u002F Text\n    const text = await req.text();\n\n    \u002F\u002F ArrayBuffer\n    const buffer = await req.arrayBuffer();\n\n    \u002F\u002F Blob\n    const blob = await req.blob();\n\n    return new Response(\"Received\");\n  },\n});\n```\n\n## Response Types\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    switch (url.pathname) {\n      case \"\u002Fjson\":\n        return Response.json({ message: \"Hello\" });\n\n      case \"\u002Fhtml\":\n        return new Response(\"\u003Ch1>Hello\u003C\u002Fh1>\", {\n          headers: { \"Content-Type\": \"text\u002Fhtml\" },\n        });\n\n      case \"\u002Fredirect\":\n        return Response.redirect(\"\u002Fnew-location\", 302);\n\n      case \"\u002Ffile\":\n        return new Response(Bun.file(\".\u002Fimage.png\"));\n\n      case \"\u002Fstream\":\n        return new Response(\n          new ReadableStream({\n            start(controller) {\n              controller.enqueue(\"chunk1\");\n              controller.enqueue(\"chunk2\");\n              controller.close();\n            },\n          })\n        );\n\n      default:\n        return new Response(\"Not Found\", { status: 404 });\n    }\n  },\n});\n```\n\n## Simple Routing\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n    const path = url.pathname;\n    const method = req.method;\n\n    \u002F\u002F Static routes\n    if (method === \"GET\" && path === \"\u002F\") {\n      return new Response(\"Home\");\n    }\n\n    if (method === \"GET\" && path === \"\u002Fapi\u002Fusers\") {\n      return Response.json([{ id: 1, name: \"Alice\" }]);\n    }\n\n    \u002F\u002F Dynamic routes\n    const userMatch = path.match(\u002F^\\\u002Fapi\\\u002Fusers\\\u002F(\\d+)$\u002F);\n    if (method === \"GET\" && userMatch) {\n      const userId = userMatch[1];\n      return Response.json({ id: userId });\n    }\n\n    \u002F\u002F 404\n    return new Response(\"Not Found\", { status: 404 });\n  },\n});\n```\n\n## Error Handling\n\n```typescript\nBun.serve({\n  fetch(req) {\n    try {\n      \u002F\u002F Handle request\n      throw new Error(\"Something went wrong\");\n    } catch (error) {\n      return new Response(\n        JSON.stringify({ error: error.message }),\n        {\n          status: 500,\n          headers: { \"Content-Type\": \"application\u002Fjson\" }\n        }\n      );\n    }\n  },\n  error(error) {\n    \u002F\u002F Global error handler\n    return new Response(`Error: ${error.message}`, { status: 500 });\n  },\n});\n```\n\n## Server Options\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,           \u002F\u002F Default: 3000\n  hostname: \"0.0.0.0\",  \u002F\u002F Default: \"0.0.0.0\"\n\n  development: true,    \u002F\u002F Pretty errors in browser\n\n  \u002F\u002F TLS\u002FHTTPS\n  tls: {\n    key: Bun.file(\".\u002Fkey.pem\"),\n    cert: Bun.file(\".\u002Fcert.pem\"),\n  },\n\n  \u002F\u002F Unix socket\n  unix: \"\u002Ftmp\u002Fmy-socket.sock\",\n\n  \u002F\u002F Max request body size (default 128MB)\n  maxRequestBodySize: 1024 * 1024 * 10, \u002F\u002F 10MB\n\n  fetch(req) {\n    return new Response(\"OK\");\n  },\n});\n```\n\n## Server Methods\n\n```typescript\nconst server = Bun.serve({ ... });\n\n\u002F\u002F Server info\nconsole.log(server.port);        \u002F\u002F 3000\nconsole.log(server.hostname);    \u002F\u002F \"0.0.0.0\"\nconsole.log(server.url);         \u002F\u002F URL object\n\n\u002F\u002F Stop server\nserver.stop();\n\n\u002F\u002F Reload with new config\nserver.reload({\n  fetch(req) {\n    return new Response(\"Updated!\");\n  },\n});\n\n\u002F\u002F Pending requests count\nconsole.log(server.pendingRequests);\n```\n\n## Static Files\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Serve static files from public\u002F\n    if (url.pathname.startsWith(\"\u002Fstatic\u002F\")) {\n      const filePath = `.\u002Fpublic${url.pathname.replace(\"\u002Fstatic\", \"\")}`;\n      const file = Bun.file(filePath);\n\n      if (await file.exists()) {\n        return new Response(file);\n      }\n      return new Response(\"Not Found\", { status: 404 });\n    }\n\n    return new Response(\"API\");\n  },\n});\n```\n\n## CORS\n\n```typescript\nfunction corsHeaders() {\n  return {\n    \"Access-Control-Allow-Origin\": \"*\",\n    \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n    \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\",\n  };\n}\n\nBun.serve({\n  fetch(req) {\n    \u002F\u002F Handle preflight\n    if (req.method === \"OPTIONS\") {\n      return new Response(null, { headers: corsHeaders() });\n    }\n\n    \u002F\u002F Add CORS headers to response\n    return new Response(\"OK\", { headers: corsHeaders() });\n  },\n});\n```\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `EADDRINUSE` | Port in use | Use different port or kill process |\n| `Cannot read body` | Body already consumed | Read body once only |\n| `CORS error` | Missing headers | Add CORS headers |\n| `413 Payload Too Large` | Body exceeds limit | Increase maxRequestBodySize |\n\n## When to Load References\n\nLoad `references\u002Ftls-config.md` when:\n- HTTPS\u002FTLS setup\n- Certificate configuration\n- mTLS authentication\n\nLoad `references\u002Fstreaming.md` when:\n- Server-sent events\n- Streaming responses\n- Chunked transfer encoding\n","# Bun HTTP Server\n\nBun has a built-in high-performance HTTP server via `Bun.serve()`.\n\n## Quick Start\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    return new Response(\"Hello World!\");\n  },\n});\n\nconsole.log(`Server running at http:\u002F\u002Flocalhost:${server.port}`);\n```\n\n## Request Handling\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Method\n    console.log(req.method); \u002F\u002F GET, POST, etc.\n\n    \u002F\u002F Path\n    console.log(url.pathname); \u002F\u002F \u002Fapi\u002Fusers\n\n    \u002F\u002F Query params\n    console.log(url.searchParams.get(\"id\")); \u002F\u002F ?id=123\n\n    \u002F\u002F Headers\n    console.log(req.headers.get(\"Content-Type\"));\n\n    return new Response(\"OK\");\n  },\n});\n```\n\n## Body Parsing\n\n```typescript\nBun.serve({\n  async fetch(req) {\n    \u002F\u002F JSON\n    const json = await req.json();\n\n    \u002F\u002F Form data\n    const form = await req.formData();\n\n    \u002F\u002F Text\n    const text = await req.text();\n\n    \u002F\u002F ArrayBuffer\n    const buffer = await req.arrayBuffer();\n\n    \u002F\u002F Blob\n    const blob = await req.blob();\n\n    return new Response(\"Received\");\n  },\n});\n```\n\n## Response Types\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    switch (url.pathname) {\n      case \"\u002Fjson\":\n        return Response.json({ message: \"Hello\" });\n\n      case \"\u002Fhtml\":\n        return new Response(\"\u003Ch1>Hello\u003C\u002Fh1>\", {\n          headers: { \"Content-Type\": \"text\u002Fhtml\" },\n        });\n\n      case \"\u002Fredirect\":\n        return Response.redirect(\"\u002Fnew-location\", 302);\n\n      case \"\u002Ffile\":\n        return new Response(Bun.file(\".\u002Fimage.png\"));\n\n      case \"\u002Fstream\":\n        return new Response(\n          new ReadableStream({\n            start(controller) {\n              controller.enqueue(\"chunk1\");\n              controller.enqueue(\"chunk2\");\n              controller.close();\n            },\n          })\n        );\n\n      default:\n        return new Response(\"Not Found\", { status: 404 });\n    }\n  },\n});\n```\n\n## Simple Routing\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n    const path = url.pathname;\n    const method = req.method;\n\n    \u002F\u002F Static routes\n    if (method === \"GET\" && path === \"\u002F\") {\n      return new Response(\"Home\");\n    }\n\n    if (method === \"GET\" && path === \"\u002Fapi\u002Fusers\") {\n      return Response.json([{ id: 1, name: \"Alice\" }]);\n    }\n\n    \u002F\u002F Dynamic routes\n    const userMatch = path.match(\u002F^\\\u002Fapi\\\u002Fusers\\\u002F(\\d+)$\u002F);\n    if (method === \"GET\" && userMatch) {\n      const userId = userMatch[1];\n      return Response.json({ id: userId });\n    }\n\n    \u002F\u002F 404\n    return new Response(\"Not Found\", { status: 404 });\n  },\n});\n```\n\n## Error Handling\n\n```typescript\nBun.serve({\n  fetch(req) {\n    try {\n      \u002F\u002F Handle request\n      throw new Error(\"Something went wrong\");\n    } catch (error) {\n      return new Response(\n        JSON.stringify({ error: error.message }),\n        {\n          status: 500,\n          headers: { \"Content-Type\": \"application\u002Fjson\" }\n        }\n      );\n    }\n  },\n  error(error) {\n    \u002F\u002F Global error handler\n    return new Response(`Error: ${error.message}`, { status: 500 });\n  },\n});\n```\n\n## Server Options\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,           \u002F\u002F Default: 3000\n  hostname: \"0.0.0.0\",  \u002F\u002F Default: \"0.0.0.0\"\n\n  development: true,    \u002F\u002F Pretty errors in browser\n\n  \u002F\u002F TLS\u002FHTTPS\n  tls: {\n    key: Bun.file(\".\u002Fkey.pem\"),\n    cert: Bun.file(\".\u002Fcert.pem\"),\n  },\n\n  \u002F\u002F Unix socket\n  unix: \"\u002Ftmp\u002Fmy-socket.sock\",\n\n  \u002F\u002F Max request body size (default 128MB)\n  maxRequestBodySize: 1024 * 1024 * 10, \u002F\u002F 10MB\n\n  fetch(req) {\n    return new Response(\"OK\");\n  },\n});\n```\n\n## Server Methods\n\n```typescript\nconst server = Bun.serve({ ... });\n\n\u002F\u002F Server info\nconsole.log(server.port);        \u002F\u002F 3000\nconsole.log(server.hostname);    \u002F\u002F \"0.0.0.0\"\nconsole.log(server.url);         \u002F\u002F URL object\n\n\u002F\u002F Stop server\nserver.stop();\n\n\u002F\u002F Reload with new config\nserver.reload({\n  fetch(req) {\n    return new Response(\"Updated!\");\n  },\n});\n\n\u002F\u002F Pending requests count\nconsole.log(server.pendingRequests);\n```\n\n## Static Files\n\n```typescript\nBun.serve({\n  fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Serve static files from public\u002F\n    if (url.pathname.startsWith(\"\u002Fstatic\u002F\")) {\n      const filePath = `.\u002Fpublic${url.pathname.replace(\"\u002Fstatic\", \"\")}`;\n      const file = Bun.file(filePath);\n\n      if (await file.exists()) {\n        return new Response(file);\n      }\n      return new Response(\"Not Found\", { status: 404 });\n    }\n\n    return new Response(\"API\");\n  },\n});\n```\n\n## CORS\n\n```typescript\nfunction corsHeaders() {\n  return {\n    \"Access-Control-Allow-Origin\": \"*\",\n    \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n    \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\",\n  };\n}\n\nBun.serve({\n  fetch(req) {\n    \u002F\u002F Handle preflight\n    if (req.method === \"OPTIONS\") {\n      return new Response(null, { headers: corsHeaders() });\n    }\n\n    \u002F\u002F Add CORS headers to response\n    return new Response(\"OK\", { headers: corsHeaders() });\n  },\n});\n```\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `EADDRINUSE` | Port in use | Use different port or kill process |\n| `Cannot read body` | Body already consumed | Read body once only |\n| `CORS error` | Missing headers | Add CORS headers |\n| `413 Payload Too Large` | Body exceeds limit | Increase maxRequestBodySize |\n\n## When to Load References\n\nLoad `references\u002Ftls-config.md` when:\n- HTTPS\u002FTLS setup\n- Certificate configuration\n- mTLS authentication\n\nLoad `references\u002Fstreaming.md` when:\n- Server-sent events\n- Streaming responses\n- Chunked transfer encoding\n",{"name":5,"license":15,"metadata":24,"description":7},{"version":25},"1.0.0","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-http-server","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill bun-http-server",{"tool":38,"command":39},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill bun-http-server",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill bun-http-server","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-http-server\u002FSKILL.md",true,[],[47,55,62,69,76,83],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]