Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Activation Contract
Use this first when
- The user wants to check the health or status of CloudBase resources (cloud functions, CloudRun, databases, storage, etc.).
- The user reports errors, failures, or abnormal behavior and wants a quick diagnosis.
- The user asks for an "inspection", "health check", "巡检", "诊断", or "troubleshooting" of their CloudBase environment.
- The user wants to review recent error logs across services.
Read before writing code if
- The inspection reveals code-level issues in cloud functions or CloudRun services — then read the relevant implementation skill before suggesting fixes.
- The user wants to fix a problem found during inspection rather than just diagnose it.
Then also read
- Cloud function issues ->
../cloud-functions/SKILL.md
- CloudRun issues ->
../cloudrun-development/SKILL.md
- Database issues ->
../postgresql-development-cloudbase/SKILL.md for CloudBase PG / PostgreSQL, ../relational-database-mcp-cloudbase/SKILL.md for MySQL, or ../cloudbase-document-database-web-sdk/SKILL.md for NoSQL
- Platform overview ->
../cloudbase-platform/SKILL.md
Do NOT use for
- Deploying new resources or writing application code. This skill is read-only and diagnostic.
- Replacing proper monitoring/alerting infrastructure. It provides point-in-time inspection, not continuous monitoring.
- Directly fixing problems — it diagnoses and recommends; actual fixes should use the appropriate implementation skill.
Common mistakes / gotchas
- Running a full inspection without first confirming the environment is bound (
auth tool must show logged-in and env-bound state).
- Ignoring CLS log service status — if CLS is not enabled,
queryLogs will fail; always check first with queryLogs(action="checkLogService").
- Searching logs without a time range — this can return excessive or irrelevant results. Always scope searches to a relevant time window.
- Treating a single error log as the root cause without correlating across resources. A function error may stem from a database or config issue.
Minimal checklist
How to use this skill (for a coding agent)
Inspection Modes
The skill supports two modes based on user intent:
| Mode |
When to use |
Scope |
| Full inspection |
User asks for a general health check / 巡检 / 全面检查 |
All resource types in the environment |
| Targeted inspection |
User reports a specific error or asks about a specific resource |
One resource type or a specific resource |
Full Inspection Workflow
Follow these steps in order for a comprehensive environment health check:
Step 1 — Environment Check
envQuery(action="info")
Confirm the environment is accessible. Record the envId for console link generation.
Step 2 — Log Service Status
queryLogs(action="checkLogService")
If CLS is not enabled, note this as a warning — log-based diagnosis will be unavailable. Recommend enabling CLS in the console: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
Step 3 — Cloud Functions Inspection
queryFunctions(action="listFunctions")
For each function, check:
- Status: Is the function in an active/deployed state?
- Recent errors:
queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<recent>")
- Common issues:
- Timeout errors (execution exceeded limit)
- Memory limit exceeded
- Runtime errors (unhandled exceptions)
- Cold start frequency
Step 4 — CloudRun Services Inspection
queryCloudRun(action="list")
For each service, check:
- Status: Is the service running?
- Detail:
queryCloudRun(action="detail", detailServerName="<name>")
- Common issues:
- Service not running (scaled to zero or crashed)
- Image pull failures
- OOMKilled events
- Health check failures
Step 5 — Error Log Aggregation (if CLS is enabled)
queryLogs(action="searchLogs", queryString="ERROR", service="tcb", startTime="<24h-ago>", limit=50)
queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", startTime="<24h-ago>", limit=50)
Look for patterns:
- Repeated error messages (same error many times)
- Cascading failures (errors in multiple services around the same time)
- Timeout patterns
Step 6 — Summary Report
Generate a structured report:
# CloudBase Resource Inspection Report
**Environment**: ${envId}
**Inspection Time**: ${timestamp}
## Overall Health: ✅ Healthy / ⚠️ Warnings Found / ❌ Issues Found
### Cloud Functions
| Function | Status | Recent Errors | Severity |
|----------|--------|---------------|----------|
| ... | ... | ... | ... |
### CloudRun Services
| Service | Status | Issues | Severity |
|---------|--------|--------|----------|
| ... | ... | ... | ... |
### Error Log Summary
- Total errors in last 24h: N
- Top error patterns: ...
## Recommendations
1. ...
2. ...
## Console Links
- Cloud Functions: https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
- CloudRun: https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
- Logs: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
Targeted Inspection Workflow
When the user specifies a resource type or a specific resource:
- Cloud function errors:
queryFunctions(action="listFunctionLogs", functionName="<name>") then queryLogs(action="searchLogs", queryString="* AND functionName:<name> AND level:ERROR", ...)
- CloudRun errors:
queryCloudRun(action="detail", detailServerName="<name>") then queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", ...)
- If logs show DB / Redis connection failures (
ECONNREFUSED, timeout, "could not connect"): check whether VpcConf is set and matches the database VPC. See cloudrun-development/references/vpc-and-database.md.
- Database issues: Check
queryPgDatabase(action="context"|"metadata"|"objects") for CloudBase PG, queryMysqlDatabase for MySQL, or readNoSqlDatabaseStructure for NoSQL depending on type
- General error search:
queryLogs(action="searchLogs", queryString="<error-keyword>", ...)
AIOps Methodology
This skill follows AIOps principles for intelligent inspection:
- Data Collection: Gather logs and resource states via MCP tools
- Pattern Recognition: Identify recurring errors, anomaly patterns, and correlations across services
- Root Cause Hypothesis: Based on error patterns, suggest likely root causes (e.g., a function timeout may be caused by a database query bottleneck)
- Actionable Recommendations: Provide specific, prioritized remediation steps with links to relevant skills and console pages
Severity Levels
| Level |
Icon |
Meaning |
| Critical |
❌ |
Service is down or data is at risk; requires immediate action |
| Warning |
⚠️ |
Errors detected but service is still partially functional; investigate soon |
| Info |
ℹ️ |
No errors found; informational status only |
| Healthy |
✅ |
Resource is operating normally |
Preferred Tool Map
| Operation |
MCP Tool Call |
| Check environment |
envQuery(action="info") |
| Check CLS status |
queryLogs(action="checkLogService") |
| List cloud functions |
queryFunctions(action="listFunctions") |
| Get function detail |
queryFunctions(action="getFunctionDetail", functionName="<name>") |
| Get function logs |
queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<time>", endTime="<time>") |
| Get function log detail |
queryFunctions(action="getFunctionLogDetail", requestId="<id>") |
| List CloudRun services |
queryCloudRun(action="list") |
| Get CloudRun detail |
queryCloudRun(action="detail", detailServerName="<name>") |
| Search CLS logs |
queryLogs(action="searchLogs", queryString="<query>", service="tcb|tcbr", startTime="<time>", endTime="<time>") |
| Check NoSQL structure |
readNoSqlDatabaseStructure(action="listCollections") |
| Check PostgreSQL context |
queryPgDatabase(action="context") |
| Check PostgreSQL metadata |
queryPgDatabase(action="metadata", limit=20) |
| Check MySQL status |
queryMysqlDatabase(action="getContext") |
Common CLS Query Patterns
| Scenario |
queryString |
| All errors |
ERROR |
| Function timeout |
timeout OR 超时 |
| Function OOM |
OOM OR out of memory OR 内存超限 |
| CloudRun crash |
crash OR OOMKilled OR Error |
| Specific function errors |
functionName:<name> AND level:ERROR |
| 5xx HTTP errors |
statusCode:>499 |
| Cold start issues |
coldStart OR 冷启动 |
Time Range Guidance
- Quick check: Last 1 hour (
startTime = 1 hour ago)
- Standard inspection: Last 24 hours
- Trend analysis: Last 7 days
- Specific incident: Narrow to the reported time window
Always use ISO 8601 format for startTime/endTime, e.g., "2025-01-15 00:00:00".
Related Skills
cloud-functions — Cloud function development, deployment, and debugging
cloudrun-development — CloudRun backend deployment and management
cloudbase-platform — General platform knowledge and console navigation
postgresql-development-cloudbase — CloudBase PostgreSQL / PG diagnostics and schema/RLS checks
relational-database-mcp-cloudbase — MySQL database management and diagnostics
1---
2name: ops-inspector
3description: AIOps-style one-click inspection skill for CloudBase resources. Use this skill when users need to diagnose errors, check resource health, inspect logs, or run a comprehensive health check across cloud functions, CloudRun services, databases, and other CloudBase resources.
4version: 2.26.0
5alwaysApply: false
6metadata:
7 source: https://skillmd.com/skills/infometa/ops-inspector
8---
9
10## Sibling skills (local only)
11
12Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../auth-tool-cloudbase/SKILL.md`.
13
14If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.
15
16## Activation Contract
17
18### Use this first when
19
20- The user wants to check the health or status of CloudBase resources (cloud functions, CloudRun, databases, storage, etc.).
21- The user reports errors, failures, or abnormal behavior and wants a quick diagnosis.
22- The user asks for an "inspection", "health check", "巡检", "诊断", or "troubleshooting" of their CloudBase environment.
23- The user wants to review recent error logs across services.
24
25### Read before writing code if
26
27- The inspection reveals code-level issues in cloud functions or CloudRun services — then read the relevant implementation skill before suggesting fixes.
28- The user wants to fix a problem found during inspection rather than just diagnose it.
29
30### Then also read
31
32- Cloud function issues -> `../cloud-functions/SKILL.md`
33- CloudRun issues -> `../cloudrun-development/SKILL.md`
34- Database issues -> `../postgresql-development-cloudbase/SKILL.md` for CloudBase PG / PostgreSQL, `../relational-database-mcp-cloudbase/SKILL.md` for MySQL, or `../cloudbase-document-database-web-sdk/SKILL.md` for NoSQL
35- Platform overview -> `../cloudbase-platform/SKILL.md`
36
37### Do NOT use for
38
39- Deploying new resources or writing application code. This skill is read-only and diagnostic.
40- Replacing proper monitoring/alerting infrastructure. It provides point-in-time inspection, not continuous monitoring.
41- Directly fixing problems — it diagnoses and recommends; actual fixes should use the appropriate implementation skill.
42
43### Common mistakes / gotchas
44
45- Running a full inspection without first confirming the environment is bound (`auth` tool must show logged-in and env-bound state).
46- Ignoring CLS log service status — if CLS is not enabled, `queryLogs` will fail; always check first with `queryLogs(action="checkLogService")`.
47- Searching logs without a time range — this can return excessive or irrelevant results. Always scope searches to a relevant time window.
48- Treating a single error log as the root cause without correlating across resources. A function error may stem from a database or config issue.
49
50### Minimal checklist
51
52- [ ] Environment is bound and accessible (`envQuery(action="info")`)
53- [ ] CLS log service is enabled (`queryLogs(action="checkLogService")`)
54- [ ] All target resources are listed before diving into details
55- [ ] Time range is specified for any log searches
56- [ ] Findings are summarized with severity levels and actionable recommendations
57
58---
59
60## How to use this skill (for a coding agent)
61
62### Inspection Modes
63
64The skill supports two modes based on user intent:
65
66| Mode | When to use | Scope |
67|------|-------------|-------|
68| **Full inspection** | User asks for a general health check / 巡检 / 全面检查 | All resource types in the environment |
69| **Targeted inspection** | User reports a specific error or asks about a specific resource | One resource type or a specific resource |
70
71### Full Inspection Workflow
72
73Follow these steps in order for a comprehensive environment health check:
74
75**Step 1 — Environment Check**
76
77```
78envQuery(action="info")
79```
80
81Confirm the environment is accessible. Record the `envId` for console link generation.
82
83**Step 2 — Log Service Status**
84
85```
86queryLogs(action="checkLogService")
87```
88
89If CLS is not enabled, note this as a **warning** — log-based diagnosis will be unavailable. Recommend enabling CLS in the console: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log`
90
91**Step 3 — Cloud Functions Inspection**
92
93```
94queryFunctions(action="listFunctions")
95```
96
97For each function, check:
98- **Status**: Is the function in an active/deployed state?
99- **Recent errors**: `queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<recent>")`
100- **Common issues**:
101 - Timeout errors (execution exceeded limit)
102 - Memory limit exceeded
103 - Runtime errors (unhandled exceptions)
104 - Cold start frequency
105
106**Step 4 — CloudRun Services Inspection**
107
108```
109queryCloudRun(action="list")
110```
111
112For each service, check:
113- **Status**: Is the service running?
114- **Detail**: `queryCloudRun(action="detail", detailServerName="<name>")`
115- **Common issues**:
116 - Service not running (scaled to zero or crashed)
117 - Image pull failures
118 - OOMKilled events
119 - Health check failures
120
121**Step 5 — Error Log Aggregation** (if CLS is enabled)
122
123```
124queryLogs(action="searchLogs", queryString="ERROR", service="tcb", startTime="<24h-ago>", limit=50)
125queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", startTime="<24h-ago>", limit=50)
126```
127
128Look for patterns:
129- Repeated error messages (same error many times)
130- Cascading failures (errors in multiple services around the same time)
131- Timeout patterns
132
133**Step 6 — Summary Report**
134
135Generate a structured report:
136
137```markdown
138# CloudBase Resource Inspection Report
139
140**Environment**: ${envId}
141**Inspection Time**: ${timestamp}
142
143## Overall Health: ✅ Healthy / ⚠️ Warnings Found / ❌ Issues Found
144
145### Cloud Functions
146| Function | Status | Recent Errors | Severity |
147|----------|--------|---------------|----------|
148| ... | ... | ... | ... |
149
150### CloudRun Services
151| Service | Status | Issues | Severity |
152|---------|--------|--------|----------|
153| ... | ... | ... | ... |
154
155### Error Log Summary
156- Total errors in last 24h: N
157- Top error patterns: ...
158
159## Recommendations
1601. ...
1612. ...
162
163## Console Links
164- Cloud Functions: https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
165- CloudRun: https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
166- Logs: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
167```
168
169### Targeted Inspection Workflow
170
171When the user specifies a resource type or a specific resource:
172
1731. **Cloud function errors**: `queryFunctions(action="listFunctionLogs", functionName="<name>")` then `queryLogs(action="searchLogs", queryString="* AND functionName:<name> AND level:ERROR", ...)`
1742. **CloudRun errors**: `queryCloudRun(action="detail", detailServerName="<name>")` then `queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", ...)`
175 - If logs show DB / Redis connection failures (`ECONNREFUSED`, timeout, "could not connect"): check whether `VpcConf` is set and matches the database VPC. See `cloudrun-development/references/vpc-and-database.md`.
1763. **Database issues**: Check `queryPgDatabase(action="context"|"metadata"|"objects")` for CloudBase PG, `queryMysqlDatabase` for MySQL, or `readNoSqlDatabaseStructure` for NoSQL depending on type
1774. **General error search**: `queryLogs(action="searchLogs", queryString="<error-keyword>", ...)`
178
179### AIOps Methodology
180
181This skill follows AIOps principles for intelligent inspection:
182
1831. **Data Collection**: Gather logs and resource states via MCP tools
1842. **Pattern Recognition**: Identify recurring errors, anomaly patterns, and correlations across services
1853. **Root Cause Hypothesis**: Based on error patterns, suggest likely root causes (e.g., a function timeout may be caused by a database query bottleneck)
1864. **Actionable Recommendations**: Provide specific, prioritized remediation steps with links to relevant skills and console pages
187
188### Severity Levels
189
190| Level | Icon | Meaning |
191|-------|------|---------|
192| Critical | ❌ | Service is down or data is at risk; requires immediate action |
193| Warning | ⚠️ | Errors detected but service is still partially functional; investigate soon |
194| Info | ℹ️ | No errors found; informational status only |
195| Healthy | ✅ | Resource is operating normally |
196
197### Preferred Tool Map
198
199| Operation | MCP Tool Call |
200|-----------|---------------|
201| Check environment | `envQuery(action="info")` |
202| Check CLS status | `queryLogs(action="checkLogService")` |
203| List cloud functions | `queryFunctions(action="listFunctions")` |
204| Get function detail | `queryFunctions(action="getFunctionDetail", functionName="<name>")` |
205| Get function logs | `queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<time>", endTime="<time>")` |
206| Get function log detail | `queryFunctions(action="getFunctionLogDetail", requestId="<id>")` |
207| List CloudRun services | `queryCloudRun(action="list")` |
208| Get CloudRun detail | `queryCloudRun(action="detail", detailServerName="<name>")` |
209| Search CLS logs | `queryLogs(action="searchLogs", queryString="<query>", service="tcb\|tcbr", startTime="<time>", endTime="<time>")` |
210| Check NoSQL structure | `readNoSqlDatabaseStructure(action="listCollections")` |
211| Check PostgreSQL context | `queryPgDatabase(action="context")` |
212| Check PostgreSQL metadata | `queryPgDatabase(action="metadata", limit=20)` |
213| Check MySQL status | `queryMysqlDatabase(action="getContext")` |
214
215### Common CLS Query Patterns
216
217| Scenario | queryString |
218|----------|-------------|
219| All errors | `ERROR` |
220| Function timeout | `timeout OR 超时` |
221| Function OOM | `OOM OR out of memory OR 内存超限` |
222| CloudRun crash | `crash OR OOMKilled OR Error` |
223| Specific function errors | `functionName:<name> AND level:ERROR` |
224| 5xx HTTP errors | `statusCode:>499` |
225| Cold start issues | `coldStart OR 冷启动` |
226
227### Time Range Guidance
228
229- **Quick check**: Last 1 hour (`startTime` = 1 hour ago)
230- **Standard inspection**: Last 24 hours
231- **Trend analysis**: Last 7 days
232- **Specific incident**: Narrow to the reported time window
233
234Always use ISO 8601 format for `startTime`/`endTime`, e.g., `"2025-01-15 00:00:00"`.
235
236## Related Skills
237
238- `cloud-functions` — Cloud function development, deployment, and debugging
239- `cloudrun-development` — CloudRun backend deployment and management
240- `cloudbase-platform` — General platform knowledge and console navigation
241- `postgresql-development-cloudbase` — CloudBase PostgreSQL / PG diagnostics and schema/RLS checks
242- `relational-database-mcp-cloudbase` — MySQL database management and diagnostics