You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/.claude/skills/cloud-functions/SKILL.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ Keep local `references/...` paths for files that ship with the current skill dir
53
53
- Forgetting that runtime cannot be changed after creation.
54
54
- Using cloud functions as the first answer for Web login.
55
55
- Forgetting that HTTP Functions must ship `scf_bootstrap`, listen on port `9000`, and include dependencies.
56
+
- Assuming HTTP Functions imply Express. Node.js HTTP Functions can be implemented with the native `http` module; if no framework is requested, prefer a small raw `http.createServer(...)` implementation and parse the request body explicitly.
56
57
57
58
### Minimal checklist
58
59
@@ -71,6 +72,7 @@ Use this skill when developing, deploying, and operating CloudBase cloud functio
71
72
72
73
- If the request is for SDK calls, timers, or event-driven workflows, write an **Event Function** with `exports.main = async (event, context) => {}`.
73
74
- If the request is for REST APIs, browser-facing endpoints, SSE, or WebSocket, write an **HTTP Function** with `req` / `res` on port `9000`.
75
+
- For Node.js HTTP Functions, `req` / `res` does not require Express. When the user asks for native Node.js or does not request a framework, use the built-in `http` module and handle JSON parsing, routes, and status codes yourself.
74
76
- If the user mentions HTTP access for an existing Event Function, keep the Event Function code shape and add gateway access separately.
0 commit comments