Skip to content

Commit 2fecf8a

Browse files
chore: sync from CloudBase-MCP
1 parent 5748d9b commit 2fecf8a

21 files changed

Lines changed: 2482 additions & 231 deletions

‎generated/skill-manifest.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 2,
3-
"generatedAt": "2026-10-16T03:24:13.942Z",
3+
"generatedAt": "2026-10-16T08:48:42.993Z",
44
"skills": {
55
"ai-model-nodejs": {
66
"name": "ai-model-nodejs",
@@ -837,7 +837,7 @@
837837
},
838838
"cloudbase-cli": {
839839
"name": "cloudbase-cli",
840-
"description": "CloudBase CLI (tcb, 云开发CLI, Tencent CloudBase命令行) resource management skill. Use when deploying cloud functions, CloudRun, storage, NoSQL/MySQL, static hosting, permissions, CORS/domains via tcb; for CI/CD and batch ops; when the user prefers CLI; or as the first-session fallback when CloudBase MCP tools are not loaded yet (after install/config, before IDE restart). Covers tcb login (device code for Tencent Cloud accounts; --cloudbase-api-key -e for environment API Key without an account; --apiKeyId/--apiKey for CI) and domain commands (fn/hosting/cloudrun/…) as MCP auth/manage parity — do not default to tcb deploy.",
840+
"description": "CloudBase CLI (tcb, 云开发CLI, Tencent CloudBase命令行) resource management skill. Use when deploying cloud functions, CloudRun, storage, NoSQL/MySQL, static hosting, permissions, CORS/domains via tcb; for CI/CD and batch ops; when the user prefers CLI; or as the first-session fallback when CloudBase MCP tools are not loaded yet (after install/config, before IDE restart). Also covers tcb login and site switching (国内站/国际站 via --intl or config isIntl), environment lifecycle (env create/modify/renew/delete/apikey/login/domain), tcb config and cloudbaserc.json sync, log search (logs search, CLS), metric monitoring (monitor), data model and PostgreSQL migrations (db model, db pg migration), sandbox/agent/integration management — do not default to tcb deploy.",
841841
"version": "2.35.2",
842842
"metadata": {
843843
"priority": 6

‎skills/cloudbase-cli/SKILL.md‎

Lines changed: 78 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: cloudbase-cli
3-
description: CloudBase CLI (tcb, 云开发CLI, Tencent CloudBase命令行) resource management skill. Use when deploying cloud functions, CloudRun, storage, NoSQL/MySQL, static hosting, permissions, CORS/domains via tcb; for CI/CD and batch ops; when the user prefers CLI; or as the first-session fallback when CloudBase MCP tools are not loaded yet (after install/config, before IDE restart). Covers tcb login (device code for Tencent Cloud accounts; --cloudbase-api-key -e for environment API Key without an account; --apiKeyId/--apiKey for CI) and domain commands (fn/hosting/cloudrun/…) as MCP auth/manage parity — do not default to tcb deploy.
3+
description: CloudBase CLI (tcb, 云开发CLI, Tencent CloudBase命令行) resource management skill. Use when deploying cloud functions, CloudRun, storage, NoSQL/MySQL, static hosting, permissions, CORS/domains via tcb; for CI/CD and batch ops; when the user prefers CLI; or as the first-session fallback when CloudBase MCP tools are not loaded yet (after install/config, before IDE restart). Also covers tcb login and site switching (国内站/国际站 via --intl or config isIntl), environment lifecycle (env create/modify/renew/delete/apikey/login/domain), tcb config and cloudbaserc.json sync, log search (logs search, CLS), metric monitoring (monitor), data model and PostgreSQL migrations (db model, db pg migration), sandbox/agent/integration management — do not default to tcb deploy.
44
version: 2.35.2
55
license: MIT
66
alwaysApply: false
@@ -22,39 +22,58 @@ If a referenced sibling skill file is missing from this environment, ask the use
2222
- Deployment Gate: `../cloudbase-platform/references/protocols/deployment-gate.md`
2323
- MCP vs CLI fallback: `../cloudbase/references/tooling-fallback.md` (packaged beside this skill as the `cloudbase` entry guideline)
2424

25-
## Core Principles
25+
**Route, do not improvise** — when a task belongs to another skill, hand over instead of guessing flags here:
26+
- PostgreSQL schema / RLS / `pgstore` → `../postgresql-development-cloudbase/SKILL.md`
27+
- Data-model design (ER / Mermaid) → `../data-model-creation/SKILL.md`
28+
- In-app SDK code (web / miniprogram / node) → the matching SDK skill
2629

27-
1. **`--help` first — never guess commands.**
28-
tcb CLI changes between versions. Before using any command for the first time,
29-
run `tcb <command> --help` to check parameters and discover official doc links.
30+
## Core Principles
3031

31-
2. **Deployment Gate.**
32+
1. **`--help` first — but its failure does NOT mean the command is missing.**
33+
Run `tcb <command> --help` to check parameters and find official doc links. On current CLI versions many
34+
**second-level** commands reject `--help` (`error: unknown option '--help'`), while some accept `-h`, and
35+
`tcb help <cmd>` only works one level deep. Try `-h`, then `tcb help <cmd>`, then
36+
`tcb docs search "<keyword>"` — never conclude a command does not exist from a help error.
37+
`tcb --help` itself is a **hand-maintained static list**, so absence from it says nothing about
38+
lifecycle: `init`, `pull`, `new`, `open`, `rollback`, `self-update`, `monitor`, `integration`,
39+
`service`, `cloudfunction`, `cloudrunfunction` and `run:deprecated` are all registered yet unlisted.
40+
**Absence from help ≠ deprecated**, and **"no marker" ≠ endorsed** — the statuses differ:
41+
`tcb monitor` / `tcb integration` are **officially supported** (recommend normally), while
42+
`tcb service` and `tcb cloudfunction` / `tcb cloudrunfunction` are **not recommended**
43+
(product decision, no code marker). Full status table: `references/core.md`.
44+
45+
2. **Confirm the site (国内站 / 国际站) as well as the envId.**
46+
A credential from one site does not work on the other, and the failure looks like an auth error.
47+
One-off: `tcb login --intl true|false`; persistent: `tcb config set isIntl true|false`.
48+
Pick one mechanism and keep it consistent — see `references/core.md` / `references/config.md`.
49+
50+
3. **Deployment Gate.**
3251
Before any deployment, publish, custom domain, or CloudRun operation, you must first complete the checks in `cloudbase-platform/references/protocols/deployment-gate.md`.
3352

34-
3. **Verify your work.**
53+
4. **Verify your work.**
3554
After deploying or modifying any resource, run the corresponding list/detail
3655
command to confirm the change took effect.
3756

38-
3. **Dry-run before destructive actions.**
57+
5. **Dry-run before destructive actions.**
3958
Use `--dry-run` for delete/overwrite operations. Show the preview to the user
4059
and wait for explicit confirmation before executing.
4160

42-
4. **Confirm environment first.**
61+
6. **Confirm environment first.**
4362
Always verify envId with the user before operations. Run `tcb env use <envId>`
4463
to avoid accidentally modifying production.
4564

46-
5. **Recover from errors, don't loop.**
65+
7. **Recover from errors, don't loop.**
4766
If a command fails after 2-3 attempts, check the exit code (`$?`), read the
4867
error message, consult `tcb docs search`, and try a different approach.
4968

50-
6. **First-session fallback, not MCP replacement.**
69+
8. **First-session fallback, not MCP replacement.**
5170
If CloudBase MCP tools are missing in this session, use this skill to unblock
5271
login/manage. Still configure MCP (plugin / mcp.json) so the **next** session
5372
can prefer MCP. When MCP tools are already available, prefer MCP unless the
5473
user asked for CLI/CI. Route deploy work through the domain reference table
5574
below — **do not** recommend `tcb deploy`.
5675

57-
7. **No npm/npx.**
76+
9. **No npm/npx.**
5877
If Node/npm/npx are missing, tell the user to install Node.js LTS (or use the
5978
IDE marketplace MCP path) before retrying CLI/plugin install. See guideline
6079
`tooling-fallback.md`.
@@ -64,60 +83,75 @@ If a referenced sibling skill file is missing from this environment, ask the use
6483
Use when the user wants to manage CloudBase resources via command line, **or** when MCP is not usable yet:
6584
- **First session / post-install:** MCP not in the tool list, or just configured and needs restart → `tcb login` + the matching domain command now; leave MCP ready for next session
6685
- Deploy/debug cloud functions, static hosting, CloudRun services (via domain refs — not `tcb deploy`)
67-
- Manage storage, hosting, databases (NoSQL/MySQL)
68-
- Configure permissions, CORS, domains, routing
86+
- Manage storage, hosting, databases (NoSQL / MySQL / PostgreSQL), data models and migrations
87+
- Manage environments (create / package / renew / destroy, API Keys, login policy, safe domains, usage)
88+
- Configure resource authorization (`tcb policy`), roles, users, CORS, domains, routing
89+
- Search logs and read monitoring metrics
90+
- Manage sandbox, agent and integration instances
6991
- CI/CD scripting, batch operations, terminal-based resource management
7092
- User explicitly prefers CLI over MCP
7193

7294
## Do NOT use for
7395

7496
- SDK-based in-app integration (web/miniprogram/node) → use `cloud-functions`,
7597
`cloudbase-document-database-web-sdk`, `auth-web-cloudbase`, etc.
98+
- PostgreSQL schema design, RLS and migration workflow → `postgresql-development-cloudbase`
7699
- When CloudBase MCP tools are already available in this session and the user did not ask for CLI → prefer MCP
77100
- Console UI operations
78101
- CloudBase Agent SDK development → use `cloudbase-agent-ts`
79102

80103
## How to use this skill (for a coding agent)
81104

82-
1. **Always load `references/core.md` first** — it covers authentication,
105+
1. **Always load `references/core.md` first** — it covers authentication, site selection,
83106
environment switching, `tcb docs` queries, and error diagnosis.
84-
2. **Route to the correct domain reference** using the Routing table below.
85-
3. **Load only the one reference file** that matches the user's task.
86-
Do not preload all references.
87-
4. **Stop loading more context** once you have the workflow and command
88-
syntax for the current task.
89-
5. **If the task shifts to SDK/in-app code**, switch to the appropriate
90-
SDK skill (e.g., `cloud-functions`, `cloudbase-document-database-web-sdk`) instead.
107+
2. **Route to the correct reference** using the Routing table below.
108+
3. **Load only the reference files** that match the user's task. Do not preload all of them.
109+
4. **Stop loading more context** once you have the workflow and command syntax for the current task.
110+
5. **If the task shifts to SDK/in-app code or PostgreSQL design**, switch to the appropriate
111+
sibling skill instead.
91112

92113
## Routing
93114

94115
| User Task | Read |
95116
|-----------|------|
96-
| Login, env switching, tcb docs, error diagnosis | `references/core.md` |
97-
| Deploy/debug cloud functions | `references/functions.md` |
117+
| Login, site (国际站/国内站), env switching, `tcb docs`, error diagnosis | `references/core.md` |
118+
| Create / modify / renew / destroy an environment, API Keys, login policy, safe domains, usage | `references/env.md` |
119+
| `tcb config` (CLI settings, `cloudbaserc.json` sync), `tcb init` / `new` / `pull` / `open` / `validate` / `self-update` / `rollback` | `references/config.md` |
120+
| Configure an AI tool + MCP + Skills (`tcb ai`) | `references/config.md` |
121+
| Deploy/debug cloud functions, versions, provisioned concurrency, layers, triggers | `references/functions.md` |
98122
| Deploy static site / SPA (preferred CLI web path) | `references/hosting.md` |
99-
| Deploy CloudRun service | `references/cloudrun.md` |
100-
| Experimental all-in-one web shorthand (`tcb deploy`) — avoid unless user explicitly asks | `references/app.md` |
101-
| Upload/download files, ACL rules | `references/storage.md` |
102-
| NoSQL (MongoDB) database operations | `references/nosql.md` |
103-
| MySQL database operations | `references/mysql.md` |
104-
| Roles, policies, access control | `references/permission.md` |
105-
| CORS, custom domains, routing rules | `references/access.md` |
123+
| Deploy CloudRun service, traffic/canary, versions, build & runtime logs | `references/cloudrun.md` |
124+
| Experimental all-in-one web shorthand (`tcb deploy`, `tcb app build`) — avoid unless the user asks | `references/app.md` |
125+
| Upload/download files, ACL rules, COS vs PG object storage | `references/storage.md` |
126+
| NoSQL (MongoDB) database operations, collection dump | `references/nosql.md` |
127+
| MySQL instance, SQL execution, backups, slow queries | `references/mysql.md` |
128+
| Data model definitions, `sync-model-dts`, PostgreSQL migrations | `references/schema.md` |
129+
| Search logs (CLS: functions / CloudRun / database / auth / LLM / gateway) | `references/logs.md` |
130+
| Metric monitoring (functions, CloudRun, DB, hosting, auth, gateway…) | `references/monitor.md` |
131+
| Resource authorization (`tcb policy`), roles, users | `references/permission.md` |
132+
| CORS, custom domains, CDN cache purge, routing rules (`tcb routes`) | `references/access.md` |
133+
| `tcb service` (HTTP 访问服务) — ⚠️ **not recommended**; read `access.md` for the `routes`/`domains` equivalent | `references/access.md` |
134+
| WeDa / 微搭 low-code apps and components (`tcb lowcode`) | `references/lowcode.md` |
135+
| Sandbox tools / instances / API keys | `references/sandbox.md` |
136+
| Agent create / update / delete | `references/agent.md` |
137+
| Integration instances (types, create, bind, delete) | `references/integration.md` |
138+
| PostgreSQL schema / RLS / migration workflow (not just the CLI flags) | `../postgresql-development-cloudbase/SKILL.md` |
106139

107140
## Quick workflow
108141

109-
1. `tcb login` → confirm envId with user → `tcb env use <envId>`
110-
2. `tcb <command> --help` to verify syntax
142+
1. `tcb login` (check the site) → confirm envId with the user → `tcb env use <envId>`
143+
2. Look up the command in the matching reference; verify syntax with `tcb <command> --help` (or `-h`)
111144
3. Execute the command (with `--dry-run` for destructive ops)
112145
4. Verify the result with the corresponding `list` / `detail` command
113146
5. Report the outcome to the user
114147

115148
## Minimum self-check
116149

117150
- [ ] Loaded `references/core.md` before any domain module?
118-
- [ ] Confirmed target envId with the user?
119-
- [ ] Used `--help` for unfamiliar commands?
151+
- [ ] Confirmed the site (`isIntl`) and the target envId with the user?
152+
- [ ] Checked that `--help` failure was not misread as "command missing"?
120153
- [ ] Used `--dry-run` before destructive operations?
154+
- [ ] For PG environments: switched to the PostgreSQL skill instead of reusing NoSQL/MySQL paths?
121155
- [ ] Verified the result after each operation?
122156
- [ ] Stayed within CLI scope — did not drift into SDK code?
123157

@@ -126,12 +160,21 @@ Use when the user wants to manage CloudBase resources via command line, **or** w
126160
All packaged reference files (required for skill lint reachability):
127161

128162
- [access.md](references/access.md)
163+
- [agent.md](references/agent.md)
129164
- [app.md](references/app.md)
130165
- [cloudrun.md](references/cloudrun.md)
166+
- [config.md](references/config.md)
131167
- [core.md](references/core.md)
168+
- [env.md](references/env.md)
132169
- [functions.md](references/functions.md)
133170
- [hosting.md](references/hosting.md)
171+
- [integration.md](references/integration.md)
172+
- [logs.md](references/logs.md)
173+
- [lowcode.md](references/lowcode.md)
174+
- [monitor.md](references/monitor.md)
134175
- [mysql.md](references/mysql.md)
135176
- [nosql.md](references/nosql.md)
136177
- [permission.md](references/permission.md)
178+
- [sandbox.md](references/sandbox.md)
179+
- [schema.md](references/schema.md)
137180
- [storage.md](references/storage.md)

0 commit comments

Comments
 (0)