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
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ Keep local `references/...` paths for files that ship with the current skill dir
50
50
- Confusing official CloudBase API client work with building your own HTTP function.
51
51
- Mixing Event Function code shape (`exports.main(event, context)`) with HTTP Function code shape (`req` / `res` on port `9000`).
52
52
- Treating HTTP Access as the implementation model for HTTP Functions. HTTP Access is a gateway configuration for Event Functions, not the HTTP Function runtime model.
53
+
- Assuming `db.collection("name").add(...)` will create a missing document-database collection automatically. Collection creation is a separate management step.
53
54
- Forgetting that runtime cannot be changed after creation.
54
55
- Using cloud functions as the first answer for Web login.
55
56
- Forgetting that HTTP Functions must ship `scf_bootstrap`, listen on port `9000`, and include dependencies.
@@ -111,6 +112,12 @@ Use this skill when developing, deploying, and operating CloudBase cloud functio
111
112
- HTTP Function details -> `./references/http-functions.md`
112
113
- Logs, gateway, env vars, and legacy mappings -> `./references/operations-and-config.md`
113
114
115
+
## Database write reminder
116
+
117
+
- If a function will write to CloudBase document database, create the target collection first through console or management tooling.
118
+
-`db.collection("feedback").add(...)` only inserts into an existing collection; it does not auto-create `feedback` when absent.
119
+
- If the product requirement says "create when missing", implement that as an explicit collection-management step before the first write instead of assuming the runtime write call will provision it.
0 commit comments