← 返回
未分类

bmob

Use whenever the user mentions Bmob backend cloud (Bmob, BmobApp, bmobapp.com, Bmob 后端云) for ANY task: design data tables, perform CRUD, sign up / login users, upload files, push notifications, send SMS, accept payments, write or invoke cloud functions, configure ACL / roles, debug error codes, or operate the project via the Bmob MCP server. This is the routing entry — it dispatches to platform-specific skills: bmob-database-{javascript,android,ios,flutter,restful}, bmob-auth-*, bmob-storage-*,
Use whenever the user mentions Bmob backend cloud (Bmob, BmobApp, bmobapp.com, Bmob 后端云) for ANY task: design data tables, perform CRUD, sign up / login users, upload files, push notifications, send SMS, accept payments, write or invoke cloud functions, configure ACL / roles, debug error codes, or operate the project via the Bmob MCP server. This is the routing entry — it dispatches to platform-specific skills: bmob-database-{javascript,android,ios,flutter,restful}, bmob-auth-*, bmob-storage-*, bmob-cloud-function-*, bmob-mcp, bmob-error-codes, bmob-bql, bmob-acl-and-roles. For operation-level MCP vs SDK vs REST routing, read shared/operation-routing.md. NOT a substitute for those sub-skills — once the platform and feature are clear, read and follow the matching sub-skill before writing code.
user_92a793e0
未分类 community v1.0.1 2 版本 95833.3 Key: 无需
★ 0
Stars
📥 23
下载
💾 0
安装
2
版本
#latest

概述

Bmob 后端云 — 总入口

Bmob 是一个 BaaS(Backend as a Service)平台,提供 NoSQL 数据库、用户系统、文件存储、云函数、推送、短信、支付、IM、AI 等开箱即用的后端能力。客户端覆盖 JavaScript / Android / iOS / Flutter / HarmonyOS / 小程序 / Python / Go / PHP / C#,加上语言无关的 REST APIMCP Server

路由顺序:先走下方 入口决策树 → 再查 路由决策表(选 sub-skill)→ 具体操作查 shared/operation-routing.md(MCP / curl / SDK·REST 三通道对照)。

核心原则

1. 永远先确认平台再写代码。 Bmob 各端 SDK 的 API 形态差异很大(JS 是 Bmob.Query、Android 是 extends BmobObject、iOS 是 BmobObject objectWithClassName、REST 是 HTTP /1/classes/),不要把 JS 的代码塞进 Android skill 的回答里。先看用户用什么平台 / 框架,再读对应 sub-skill。

2. 不要在前端泄漏 Master Key。 Bmob 控制台 → 应用密钥里有四个值:

密钥安全级别使用场景
---------
Application ID公开所有端
REST API Key半公开浏览器 / 小程序 / 移动端 / 服务端
Secret Key中等加密授权场景的客户端,配合 SecurityCode
Master Key最高仅服务端 / 后台脚本,永不出现在前端 bundle

3. 写之前先看 changelog。 SDK 在演进,方法签名会变。开始一项任务前用 raw URL 拉对应平台的 update_log.md(路径见 sub-skill 的 metadata.docs_raw)确认无破坏性变更。

4. 错误不要循环重试。 2-3 次同样的尝试失败后停下,重新评估:

  • HTTP 4xx:先把响应体里的 code 拿去查 bmob-error-codes
  • 权限/ACL 报错(9015、9016 等):见下方 P1 临时路径 或将来 bmob-acl-and-roles
  • "找不到方法":可能 SDK 版本过旧或文档与你使用版本不匹配,去仓库 release 页对比。

入口决策树(先走这里)

flowchart TD
    Start([用户提到 Bmob]) --> Err{响应里有错误 code?}
    Err -->|是| EC[bmob-error-codes]
    Err -->|否| Ship{代码要写进应用并发版?}
    Ship -->|否| McpCfg{IDE 已配置 Bmob MCP?}
    McpCfg -->|是| MCP[bmob-mcp<br/>7 个可调用工具]
    McpCfg -->|否| RestOnly[bmob-database-restful<br/>或 generate_code 需 MCP]
    Ship -->|是| Plat{平台 / 语言?}
    Plat -->|JS Web Node 小程序 Cocos JS 等| JS[bmob-database-javascript]
    Plat -->|Android Kotlin Java| AND[bmob-database-android]
    Plat -->|iOS Swift ObjC| IOS[bmob-database-ios]
    Plat -->|Flutter Dart| FLUT[bmob-database-flutter]
    Plat -->|curl Python Go PHP 后端等| REST[bmob-database-restful]
    Plat -->|RN Uni-app JS 桥接| JS
    JS --> Schema{需要真实表字段名?}
    AND --> Schema
    IOS --> Schema
    FLUT --> Schema
    REST --> Schema
    Schema -->|是且已配 MCP| MCP
    Schema -->|否| Done([读对应 sub-skill 写代码])
    MCP --> OpTable[[shared/operation-routing.md<br/>操作级三通道表]]

路由决策表(命中后立即去读对应 sub-skill)

用户意图平台线索路由到
---------
新建/查看表结构、加测试数据、生成 curl 样板、实操数据库bmob-mcp(前提:用户已配置 MCP)
一键部署网站 / 静态托管(HTML 或 dist 到 CDN)bmob-mcpdeploy_static_site(或 generate_code 仅生成 curl)
NoSQL 增删改查、条件查询JS / TS / Web / Node / 微信/支付宝/字节/QQ/百度小程序 / 快应用 / Cocos Creator JS / Electron / Tauri / 混合 Appbmob-database-javascript
NoSQL 增删改查Android / Kotlin / Javabmob-database-android
NoSQL 增删改查iOS / Swift / Objective-Cbmob-database-ios
NoSQL 增删改查Flutter / Dartbmob_pluginbmob-database-flutter
NoSQL 增删改查 / 任意没 SDK 的语言curl / Python / Go / PHP / C# / Rust / Ruby / Java 后端bmob-database-restful
React Native / Uni-app(JS 层接 Bmob)bmob-database-javascript 或 REST
HarmonyOS ArkTSbmob-database-restful + BmobDocs
用户注册 / 登录 / SMS 验证 / 三方登录 / 邮箱验证各端bmob-auth-{platform}(P1,见下表)
文件上传下载 / CDN各端bmob-storage-{platform}(P1,见下表)
调用云函数各端bmob-cloud-function-{platform}(P1,见下表)
编写运行在 Bmob 服务器上的云函数代码bmob-cloud-function-development(P1,见下表)
ACL / 角色 / 权限 / 行级安全bmob-acl-and-roles(P1,见下表)
BQL 查询(类 SQL 语法)任意bmob-bql(P1,见下表)
排查报错 code 9015 / 101 / 105 等bmob-error-codes
推送 / 短信 / 支付各端bmob-push- / bmob-sms- / bmob-pay-*(P2)

具体操作(增删改查、登录、上传、部署)用哪条通道,见 shared/operation-routing.md

P1 / P2 尚未发布时的临时路径

专用 sub-skill 未安装时,不要空等,按此表降级:

用户意图目标 skill(未发布)当前可用替代
---------
注册 / 登录 / 短信验证码bmob-auth-*REST:bmob-database-restful/references/users.md;已配 MCP:generate_code注册 / 用户名密码登录 / 手机号验证码登录 等)
文件上传 / CDN URLbmob-storage-*REST:references/files.md;MCP:generate_code上传文件
调用已有云函数bmob-cloud-function-*REST /1/functions/;MCP:generate_code调用云函数
编写并部署云函数源码bmob-cloud-function-developmentBmobDocs 云函数 + 控制台
ACL / 行级权限 / 9015·9016bmob-acl-and-rolesREST 创建/更新 body 内 "ACL":{...}bmob-error-codes
BQL / 跨表聚合bmob-bqlREST GET /1/cloudQuerybmob-database-restful
推送 / 短信 / 支付P2 skillsREST 对应模块 + BmobDocs mds 目录树

通用安全清单(被所有 sub-skill include)

  • [ ] 写入操作的目标表必须配 ACL,否则任意用户可改任意行(参见 P1 临时路径中的 ACL 行)。
  • [ ] 浏览器 / 小程序 / 移动端可用 REST API Key(简易授权 / SDK 方式 B)Secret Key + 安全码(加密授权 / SDK 方式 A)绝不使用 Master Key。
  • [ ] 加密授权场景的 SecurityCode 不通过网络传输;不要硬编码到前端 bundle,用环境变量注入或放进 BFF。
  • [ ] 凡是 batch / 全表扫描 / 跨表查询 → 优先用 BQL 而不是循环调用 SDK。
  • [ ] 出错时先看响应体里的 code 字段去查 bmob-error-codes,不要乱猜。
  • [ ] 用户密码字段(password)只能由 Bmob 写入,不能 update;如需改密走 /1/updateUserPassword/

FAQ 与反模式

应用场景食谱

端到端场景(表设计 + ACL + 流程),再进各 platform skill 写代码:

场景食谱
------------
博客 / CMS(Article + Author)shared/recipes/blog-cms.md
用户自有 Todo(行级 ACL)shared/recipes/user-owned-todos.md
微信小程序登录shared/recipes/mini-program-login.md
头像上传shared/recipes/avatar-upload.md
服务端批量迁移shared/recipes/server-migration.md
静态站 MCP 部署shared/recipes/static-site-deploy.md

文档查找方法

各 sub-skill 的 references/snippets/(由 BmobDocs 同步提交)与手写 references/*.md 覆盖大部分 API。仍不够时再 fetch 上游文档:

  1. 按文件名定位:上游文档树在 github.com/bmob/BmobDocs/tree/master/mds,按 // 组织。
  2. agent 直接 fetch(绕过 GitHub 渲染层):

```

https://raw.githubusercontent.com/bmob/BmobDocs/master/mds///.md

```

已验证可被 WebFetch 工具直接拉为纯 markdown。

  1. 列目录(不知道文件名时):

```

https://api.github.com/repos/bmob/BmobDocs/contents/mds//

```

  1. 仍找不到:去

与 MCP 的协作(关键)

如果用户在 IDE 里配置了 Bmob MCP Server(见 shared/mcp-install-snippets.md),任何涉及「读真实表结构 / 写测试数据 / 设计 schema / 生成样板 curl / 一键部署网站」的任务都应 优先 MCP,不要凭猜测写字段名。

  • tools/list 共 8 个工具;agent 只调用其中 7 个get_project_tablescreate_tableadd_single_dataupdate_single_datadelete_single_datagenerate_codedeploy_static_site)。
  • mcp_endpoint_mcp_post 为服务端内部回环,不要调用
  • 工具参数与话术对照:bmob-mcp;操作级三通道表:shared/operation-routing.md
flowchart LR
    User[User prompt mentioning Bmob] --> Root[bmob root SKILL.md]
    Root --> OpRoute[shared/operation-routing.md]
    Root -->|"schema / live CRUD / deploy"| McpSkill[bmob-mcp]
    Root -->|JS / Web / Mini Program| JsDb[bmob-database-javascript]
    Root -->|Android / Kotlin| AndDb[bmob-database-android]
    Root -->|iOS / Swift / ObjC| IosDb[bmob-database-ios]
    Root -->|Flutter / Dart| FlutDb[bmob-database-flutter]
    Root -->|curl / Python / Go| RestDb[bmob-database-restful]
    Root -->|error code| Err[bmob-error-codes]
    McpSkill -.get_project_tables.-> JsDb
    McpSkill -.get_project_tables.-> AndDb
    McpSkill -.get_project_tables.-> IosDb
    McpSkill -.get_project_tables.-> FlutDb
    McpSkill -.get_project_tables.-> RestDb

一句话总结

> 用户提到 Bmob → 读本 skill 的 入口决策树路由决策表 选 sub-skill → shared/operation-routing.md 选 MCP / curl / SDK·REST;端特化代码在 sub-skill 的 references/ 与 SKILL.md 里。

版本历史

共 2 个版本

  • v1.0.1 Initial release 当前
    2026-06-04 18:05 安全 安全
  • v1.0.0 Initial release
    2026-06-04 09:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

bmob-error-codes

user_92a793e0
Use when the user sees a Bmob error response with a numeric code (e.g. 9015, 101, 105, 206, 211, 9013, 10017, 10076) and
★ 0 📥 25

bmob-database-android

user_92a793e0
Use when implementing Bmob NoSQL database CRUD in an Android Native project (Java or Kotlin). Triggers: io.github.bmob:a
★ 0 📥 37

bmob-database-javascript

user_92a793e0
Use when implementing Bmob NoSQL database CRUD with the cross-platform hydrogen-js-sdk (3.0+ supports both Secret Key +
★ 0 📥 26