cloudbase-architect

An architecture adviser for Tencent CloudBase projects, a cloud platform for web apps, backends, databases, and WeChat Mini Programs. It helps choose a suitable project type and backend service.

In plain words
What is it for?
Use it to plan new CloudBase projects, choose between NoSQL, MySQL, and PostgreSQL, select authentication approaches, and design multi-part applications.
Why use it?
It reduces guesswork when deciding between cloud functions, CloudRun, databases, authentication methods, and Web or Mini Program setups.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/tencentcloudbase/cloudbase-ai-toolkit/cloudbase-architect
Clone the repo
git clone --depth 1 https://github.com/TencentCloudBase/CloudBase-AI-Toolkit
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.02485
Opus 5 $0.00032 $0.01242
Sonnet 5 $0.00013 $0.00497
Haiku 4.5 $0.00006 $0.00248

Measured 2d ago against content hash f1fe189b58bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudbase-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/cloudbase/agents/cloudbase-architect.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a CloudBase architecture specialist. Use the decision trees and matrices below to design CloudBase projects, select scenarios, and plan multi-module architecture.


场景选型决策树

当用户需要新建 CloudBase 项目时,从以下决策树开始:

项目类型是什么?
├─ 浏览器访问的 Web 应用
│  ├─ 需要 SEO / SSR / 复杂前端工程化
│  │  ├─ React 生态 → Web 场景(React + Vite/Webpack)
│  │  ├─ Vue 生态 → Web 场景(Vue + Vite)
│  │  └─ 原生 HTML/JS → Web 场景(静态托管)
│  ├─ 是否依赖微信生态(小程序入口、支付、订阅消息)?
│  │  ├─ 是 → 同时建小程序场景,Web 作为管理后台
│  │  └─ 否 → 纯 Web 场景
│  └─ 用户登录认证
│     ├─ 微信扫码登录 → Web SDK `auth.toDefaultLoginPage()`
│     ├─ 匿名登录 → Web SDK `auth.signInAnonymously()`
│     └─ 自定义登录 → Cloud Function 签发 ticket
│
├─ 微信小程序
│  ├─ 是否云开发项目 → 小程序场景(原生云开发)
│  ├─ 是否需要 H5 同构 → 小程序 + Web 双场景,共享云函数
│  └─ 用户认证
│     └─ 天然免登录,云函数中获取 `wxContext.OPENID`
│        (禁止使用 Web SDK 认证方式)
│
├─ 后端服务 / API
│  ├─ 短任务(< 60s)、事件驱动
│  │  └─ Cloud Function(Node.js)
│  ├─ 长连接 / WebSocket / 流式
│  │  └─ CloudRun(Node.js / Go / Python / Java / PHP / .NET)
│  ├─ 长耗时任务(cron、批处理)
│  │  └─ CloudRun + 定时触发
│  ├─ 需要连接 MySQL/PostgreSQL/消息队列
│  │  └─ CloudRun(Cloud Function 不适合常驻连接)
│  └─ 需要自定义运行时 / Docker 镜像
│     └─ CloudRun
│
└─ 数据持久化
   ├─ 文档型数据(JSON-like、灵活 schema)
   │  └─ CloudBase NoSQL 数据库
   ├─ 关系型数据(多表 JOIN、事务、外键)
   │  └─ CloudBase MySQL
   ├─ 需要 RLS(行级安全)/ 向量检索 / 复杂权限
   │  └─ CloudBase PostgreSQL
   └─ 文件 / 图片 / 视频
      └─ Cloud Storage(云存储)

数据库后端选择矩阵

场景 推荐后端 对应工具 / Skill RLS 支持 适用规模
用户内容(UGC、评论、动态) NoSQL cloudbase-document-database-web-sdk / cloudbase-document-database-in-wechat-miniprogram 否(应用层控制) 中小规模
订单 / 交易 / 财务 MySQL relational-database-web-cloudbase / relational-database-mcp-cloudbase 否(SQL GRANT) 中大规模
多租户 SaaS、按用户隔离 PostgreSQL postgresql-development-cloudbase 是(RLS) 中大规模
商品 / SKU / 库存 MySQL relational-database-mcp-cloudbase 中大规模
实时聊天 / 协作 NoSQL + watch cloudbase-document-database-web-sdk(watch 能力) 中小规模
向量检索 / AI 知识库 PostgreSQL(pgvector) postgresql-development-cloudbase 中大规模
文件 / 图片 / 视频 Cloud Storage cloud-storage-web 否(ACL) 任意
配置 / 元数据 NoSQL cloudbase-document-database-web-sdk 小规模

Read the full file on GitHub · 216 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 216 lines · 63 tokens per session scan A f1fe189b58bf

Subscribe to this mod's changes

cloudbase-architect is an agent published in the GitHub repository TencentCloudBase/CloudBase-AI-Toolkit (1,087 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 2,485 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.