Skip to content

Commit b316334

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): Skill 缺乏能力边界判断与替代方案引导:任务要求使用已禁用 CLI 时未切换至 MCP 工具 (issue_mo8y1ju6_9v68qo)
1 parent e2ca73f commit b316334

4 files changed

Lines changed: 1994 additions & 31 deletions

File tree

config/source/skills/cloudbase-cli/SKILL.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,42 @@ alwaysApply: false
1010
Manage CloudBase resources via `tcb` CLI — deterministic, scriptable, auditable.
1111
The preferred interface for AI agents in CI/CD, batch operations, and resource management.
1212

13+
## ⚠️ Capability Check: CLI vs MCP
14+
15+
**Before using this skill, verify that CloudBase CLI (`tcb`) is available in the current environment.**
16+
17+
### Check Runtime Capabilities
18+
19+
If the environment provides a capability notice, check which are enabled/disabled:
20+
21+
| Capability | If Enabled | If Disabled |
22+
|------------|------------|-------------|
23+
| CloudBase CLI (`tcb`) | Use this skill (CLI commands) | **Use MCP tools instead** (see Alternative below) |
24+
| CloudBase MCP tools | MCP tools available | Use CLI or SDK |
25+
26+
### Quick Check
27+
28+
Run `tcb --version` to verify CLI availability:
29+
- If it returns a version (e.g., `3.x.x`), CLI is available — proceed with this skill
30+
- If it returns "command not found" or similar, CLI is **not available** — use MCP tools instead
31+
32+
### Alternative: Use MCP Tools When CLI Is Unavailable
33+
34+
If CLI is disabled but MCP tools are enabled, use the equivalent MCP tools:
35+
36+
| CLI Command | MCP Tool Equivalent |
37+
|-------------|---------------------|
38+
| `tcb permission get` | `queryPermissions(action="getResourcePermission")` |
39+
| `tcb permission set` | `managePermissions(action="updateResourcePermission")` |
40+
| `tcb role list/get/create/update/delete` | `queryPermissions(action="listRoles")` / `managePermissions(action="createRole"/"updateRole"/"deleteRole")` |
41+
| `tcb user list/create/update/delete` | `queryPermissions(action="listUsers")` / `managePermissions(action="createUser"/"updateUser"/"deleteUser")` |
42+
| `tcb function list/deploy/delete` | `queryFunctions(action="list")` / `manageFunctions(action="createFunction"/"updateFunctionCode"/"deleteFunction")` |
43+
| `tcb env list/info` | `envQuery(action="list")` / `envQuery(action="info")` |
44+
| `tcb storage list/upload/download/delete` | `queryStorage(action="list")` / `manageStorage(action="upload"/"download"/"delete")` |
45+
| `tcb hosting list/deploy/delete` | `uploadFiles` / `findFiles` / `deleteFiles` |
46+
47+
**To use MCP tools**: Search for CloudBase tools in your IDE (e.g., `ToolSearch` with keyword "cloudbase") or use `npx mcporter call cloudbase.<tool>`.
48+
1349
## Standalone Install Note
1450

1551
If this environment only installed the current skill, start from the CloudBase main entry and use the published `cloudbase/references/...` paths for sibling skills.

config/source/skills/cloudbase-cli/references/permission.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Permission — CloudBase CLI
22

3+
## ⚠️ CLI Availability Check
4+
5+
**Before proceeding, verify that CloudBase CLI (`tcb`) is available.** Run `tcb --version` to check.
6+
7+
**If CLI is unavailable** (command not found or disabled), use MCP tools instead:
8+
9+
| CLI Command | MCP Tool Equivalent |
10+
|-------------|---------------------|
11+
| `tcb permission get [resource]` | `queryPermissions(action="getResourcePermission", resourceType="...", resourceName="...")` |
12+
| `tcb permission set <resource>` | `managePermissions(action="updateResourcePermission", resourceType="...", resourceName="...", aclTag="...", rule="...")` |
13+
| `tcb role list/get/create/update/delete` | `queryPermissions(action="listRoles"/"getRole")` / `managePermissions(action="createRole"/"updateRole"/"deleteRole")` |
14+
| `tcb user list/create/update/delete` | `queryPermissions(action="listUsers"/"getUser")` / `managePermissions(action="createUser"/"updateUser"/"deleteUser")` |
15+
16+
To discover available MCP tools, use `ToolSearch` with keyword "cloudbase" or run `npx mcporter describe cloudbase --all-parameters`.
17+
18+
---
19+
320
CloudBase access control has **three independent layers** — know which one to use before running any command:
421

522
| Layer | Command | Controls |

0 commit comments

Comments
 (0)