Skip to content

Commit 9f9592e

Browse files
chore: sync claude skills mirror from source
1 parent 99ee04f commit 9f9592e

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

  • config/.claude/skills/cloudbase-platform

config/.claude/skills/cloudbase-platform/SKILL.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ Keep local `references/...` paths for files that ship with the current skill dir
4848
- Staying here after the correct implementation skill is already clear.
4949
- Mixing platform overview with platform-specific API shapes or SDK details.
5050
- Using this overview skill as a detour in an existing application where the active auth, storage, and data files are already obvious.
51+
- **Confusing security domains with custom domains**: These are two completely different tools for different purposes:
52+
- `envDomainManagement` (action: create/delete) = Security domains (安全域名) for CORS/request source validation - used for browser upload whitelisting. Does NOT accept certificateId.
53+
- `manageGateway(action="bindCustomDomain")` = Custom domains (自定义域名) for public HTTPS access with SSL certificates - requires domain and certificateId parameters.
5154

5255
## When to use this skill
5356

@@ -93,6 +96,45 @@ Use this skill for **CloudBase platform knowledge** when you need to:
9396

9497
# CloudBase Platform Knowledge
9598

99+
### Domain Management Tools: Clear Distinction
100+
101+
When working with domain-related tasks, use the correct tool based on the requirement:
102+
103+
| Requirement | Tool | Parameters | Purpose |
104+
|-------------|------|------------|---------|
105+
| **Security Domain (安全域名)** | `envDomainManagement` | `action`, `domains` (array of host:port strings) | CORS/request source validation for browser uploads. No certificate involved. |
106+
| **Custom Domain (自定义域名)** | `manageGateway(action="bindCustomDomain")` | `domain` (string), `certificateId` (string) | Public HTTPS access with SSL certificate. Requires certId from SSL console. |
107+
| **Delete Custom Domain** | `manageGateway(action="deleteCustomDomain")` | `domain` (string) | Remove custom domain binding. |
108+
109+
**Key indicators for choosing the right tool:**
110+
- Task mentions "certificate ID" or "SSL" → Use `manageGateway(action="bindCustomDomain")`
111+
- Task mentions "浏览器上传" or "CORS" or "安全域名" → Use `envDomainManagement`
112+
- Task mentions "public access" or "HTTPS" with domain → Use `manageGateway`
113+
114+
### Recording Operation Results
115+
116+
When a task explicitly requires recording operation steps or results to a file (e.g., `RESULT.json`):
117+
118+
1. Perform the tool calls first to get actual results
119+
2. Collect all operation steps with their success/failure status
120+
3. Write the complete record to the specified file in the required format
121+
4. Include both successful operations and failed attempts with error messages
122+
123+
Example structure for operation recording:
124+
```json
125+
{
126+
"steps": [
127+
{"action": "listDomains", "success": true, "message": "Found 3 domains"},
128+
{"action": "bindDomain", "success": false, "message": "Certificate not found"}
129+
],
130+
"summary": {
131+
"totalAttempted": 2,
132+
"succeeded": 1,
133+
"failed": 1
134+
}
135+
}
136+
```
137+
96138
## Storage and Hosting
97139

98140
1. **Static Hosting vs Cloud Storage**:

0 commit comments

Comments
 (0)