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.
npx agentmods add commands/tencentcloudbase/cloudbase-ai-toolkit/cloudbase-initgit clone --depth 1 https://github.com/TencentCloudBase/CloudBase-AI-ToolkitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00030 | $0.01778 |
| Opus 5 | $0.00015 | $0.00889 |
| Sonnet 5 | $0.00006 | $0.00356 |
| Haiku 4.5 | $0.00003 | $0.00178 |
Grade A, and why
cloudbase-init 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
初始化 CloudBase 项目
为新项目下载 CloudBase 模板、配置环境 ID、生成 cloudbaserc.json,并按场景类型给出后续指引。适合从零开始的项目。
Preflight
运行以下检查,失败时停止并给出可执行指引。
-
MCP 连接检查 — 确认
cloudbase-mcpserver 已连接。- 调用
envQuery({action:"list"})验证连接。若失败,提示用户完成授权。
- 调用
-
目录空检查 — 检查当前工作目录是否为空(或仅包含
.git等无关文件)。- 若目录非空:提示用户当前目录已有文件,模板可能覆盖现有文件。询问是否切换到新目录或继续。
- 推荐做法:创建新子目录(如
mkdir my-cloudbase-app && cd my-cloudbase-app)。
-
场景选择 — 使用
AskUserQuestion工具让用户选择项目场景:场景 模板类型 说明 Web 项目 webReact/Vue/原生 JS 前端项目,使用静态托管 微信小程序 miniprogram小程序云开发项目,使用云函数 + 数据库 云托管 cloudrunCloudBase Run 后端服务,支持 Java/Go/Python/Node.js 等 -
环境选择 — 若用户有多个环境,调用
envQuery({action:"list"})让用户选择目标环境,用于后续cloudbaserc.json配置。
Plan
根据用户选择的场景执行:
- 下载模板 — 调用
downloadTemplate下载对应场景的项目模板。 - 复制文件 — 将模板内容复制到当前目录(含隐藏文件,如
.gitignore、.env.example)。 - 生成配置 — 使用
envQuery获取的 EnvId 生成cloudbaserc.json。 - 小程序场景 — 检查
project.config.json的appid字段,缺失则询问用户。 - 生成 README — 生成包含项目结构、CloudBase 资源说明的
README.md。
无破坏性操作(仅创建文件,不修改已有项目),但目录非空时需确认覆盖风险。
Commands
1. 下载模板
根据用户选择的场景调用模板下载:
downloadTemplate({
templateName: "<scenario-template-name>"
})
模板类型映射:
- Web 项目 → 对应 web 模板名
- 微信小程序 → 对应 miniprogram 模板名
- 云托管 → 对应 cloudrun 模板名
下载完成后,将模板文件复制到当前目录。注意包含隐藏文件(如 .gitignore、.env.example、.editorconfig 等),这些文件对项目正常运行至关重要。
复制脚本示例(当 downloadTemplate 下载到临时目录时):
# 复制所有文件,包括隐藏文件
cp -a /tmp/template/. ./
2. 生成 cloudbaserc.json
使用 envQuery({action:"info"}) 获取的 EnvId 生成配置文件:
{
"envId": "<当前环境 ID>",
"functionRoot": "cloudfunctions",
"framework": "<框架名>",
"version": "1.0.0"
}
envId— 自动填入查询到的环境 ID,无需用户手动替换functionRoot— 云函数目录路径(小程序/云托管场景)framework— 根据模板类型自动设置
3. 小程序场景检查
若场景为微信小程序,检查 project.config.json 中的 appid 字段:
# 检查 appid 是否已配置
node -e "const c = require('./project.config.json'); console.log(c.appid || 'MISSING')"
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.
- yesterday First seen · 174 lines · 30 tokens per session scan A 3fc14462b3e7
cloudbase-init is a command published in the GitHub repository TencentCloudBase/CloudBase-AI-Toolkit (1,087 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 1,778 once invoked, about $0.0002 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.
Other commands, from other repositories
release
Walk the llmwiki release process step by step.
cost-tracker
Track session costs, understand token spend, and get optimization tips.
t800-onboard
Для чата с новичками. Показывает, что настроено в Cursor (global + local), и что умеет отдел T-800.
scorecard
Run a repeatable weekly health check. Score Brain OS out of 100. Compare week-over-week.
dev-planner
Generate or update DEV-PLAN.md with phased development plan from Product-Spec.md.
generate-role
Resolve a need to a domain-expert role (existing, new leaf, or new parent) and draft it via the AUTHORING.md pipeline, opening a PR.