Perform read-only observability on applications deployed by qianwenai-deploy , answering "how well is the application running, and how much is it expected to cost", without entering the console. All prices are inRenminbi (¥)。
Quick path
- Identify the application — read the
.qianwenai-deployin the project directory (seereferences/workflow.md)。 - Select the time range — defaults to the last 1 hour; the user may choose 15 minutes / 1 hour / 24 hours.
- Check layer by layer — application, ECS, (optional) RDS, cost. Each item returns one of the unified result statuses; a failure of a single item does not block the other layers.
- Report — a one-sentence conclusion, then a layer-by-layer summary, risk items, data time, and unknowns.
Scope
| In scope | Out of scope |
|---|---|
Applications deployed by qianwenai-deploy (state file exists) |
Applications with no .qianwenai-deploy state file |
| Single ECS, or ECS + RDS MySQL 8.0 | Other topologies / self-built servers |
| Read-only availability, performance, and cost overview | Any resource change → use qianwenai-operate |
| Report runtime status (availability, performance, cost) | Source code review, finding bugs/vulnerabilities, determining which line of code is wrong, changing code |
| Alibaba Cloud China site, Renminbi | International site → use qwencloud-observe |
Code issues are outside the scope of capabilities
This skill only performs read-only observation, reporting runtime availability, performance, and cost; it does not do source code review, defect localization, or code modification.
When code is involved, clearly inform the user: changing code is outside the capabilities of this skill and must be decided and carried out by the user themselves, with the corresponding consequences borne by the user themselves.
Prerequisites
Aliyun CLI: execute
aliyun version(requires 3.x). All queries connect directly to OpenAPI in camelCase native form, without relying on plugins. Credentials use onlyaliyun configure listto view status. Neverread, echo, print, or ask for AK/SK/Token. If there is no valid credential profile, stop and ask the user to configure credentials outside this session. Seereferences/cli_installation_guide.md。
Status and scoring
Each layer returns a status——healthy(normal) · degraded(available but at risk) · unavailable(unavailable) ·
unknown(cannot be determined) ——with check time, target resource, key evidence, and data source. When an individual query fails, continue checking the other layers, mark the failed item as unknown——never silently omit, never fabricate data.
Each layer is also scored; the layer scores are added together to get a 0-100 health score and an A/B/C/D grade (>=90 A · >=75 B · >=60 C · <60 D). Four dimensions are evaluated in total:
| Dimension | Weight (with RDS) | Weight (without RDS) | Signal |
|---|---|---|---|
| Application | 35 | 45 | Reachability,/healthz, response time, error rate |
| ECS | 30 | 45 | CPU, memory, disk usage, disk IO, network |
| RDS | 25 | — | Connections, slow SQL, space, row lock waits |
| Availability | 10 | 10 | ECS/RDS running status, recent system events, EIP status and bandwidth, security group exposure surface |
When the application has no RDS, its weight is redistributed to the application and ECS.Cost is never scored— it is presented separately as the actual bill plus a utilization-based optimization note.
Backup/snapshot gaps and security group tightening recommendations are presented only as risks and recommendations,not counted toward the health score; EIP unbound, bandwidth at the cap, and missing inbound 80/443 rules and other signals affecting availability count toward the availability dimension.
How to check
Identify the application first, then go layer by layer. Before running each step's commands, read the corresponding guide first. A failure in one item does not affect the other layers—mark it as unknown
and continue.
Checks for these layers are independent and read-only—after identifying the application, fire the read-only APIs for each layer in parallel (in the background & + wait),
Do not wait serially; merge cloud assistant commands on the same ECS into one script to fetch in a single pass, reducing round trips.
- Identify the application — read
.qianwenai-deploy, get the region and resource ID. See workflow。 - Can the application be accessed? — probe the public address and
/healthz, check the application and Nginx services and ports, summarize recent errors. See observe-application。 - How is the server doing? — ECS status, as well as CPU, network, disk, memory within the time range. See observe-ecs。
- How is the database doing?(only when the application includes RDS)— status, connections, QPS/TPS, space, row lock waits, and masked slow SQL. See observe-rds。
- How are the public network and exposure surface doing? — EIP status and bandwidth, security group 80/443 allowances and exposure risk. See observe-network。
- Is there any maintenance and backup? — ECS system events, system disk snapshots, RDS backups. See observe-resilience。
- How much did it cost? — the application's actual cost, optionally extrapolated for the current month. See observe-cost。
- Score and summarize — score each layer, add them up to get the health score and grade, then write a natural language conclusion. See workflow。
By default, look at the most recent hour; respect a user's explicitly specified 15 minutes / 1 hour / 24 hours, and note the range used in the report.
How to tell the user
First give the health score and grade plus a one-sentence conclusion, then give a short one-line summary each for application, server, database (if any), and cost, with the evidence behind each line.
Point out risk items, explain what could not be determined and why, and give the data timestamp. When the project directory contains operate_audit.jsonl ,
include the most recent operations action (time, action, result), so this score matches the most recent recovery. When a real fault is found, proactively suggest using
qianwenai-operate to enter fault diagnosis: use AskUserQuestion to offer Diagnose and fix now / Observe only, do not act,
choosing the former enters qianwenai-operate. At the same time, write the collected evidence into the project directory's observe_handoff.json
(fault layer, key metrics, data timestamps, without any passwords/signed URLs), for operate to use as the diagnosis starting point and avoid repeating read-only checks.
健康分:87 / 100(B,良好)——应用正常,关注 RDS 连接趋势。
应用:访问正常,当前响应时间 186 ms,应用和 Nginx 服务正常。
ECS:运行正常,最近一小时 CPU 平均 31%,未发现持续高负载。
RDS:运行正常,活跃连接数从 12 上升到 38,建议关注连接池趋势。
成本:2026-08 账期实际费用 ¥88.30(ECS ¥52.10,RDS ¥36.20)。
数据截至:2026-08-03 16:20 UTC+8
After giving the summary, proactively ask whether a report file needs to be exported, for example: "Would you like me to export a Markdown or HTML report?" It is up to the user to decide; do not force it.
Interaction Form
- Read-only information(health check conclusions, status, costs): plain text, with one line of evidence (metric, status, timestamp) after each judgment.
- State-changing actions(entering operate, exporting reports, etc.): use AskUserQuestion, and make the question clearly answer what it does · impact · how to verify, and do not execute before confirmation.
- Proactive discipline: stay quiet when healthy; speak up proactively only when there is risk or a real failure, and propose only one follow-up action at a time (diagnose / export report) for the user to choose.
Render report file (optional)
When the user wants a saved Markdown or HTML report, aggregate the status, scores, key metrics, and evidence of each layer into a
JSON object and hand it to scripts/render_report.py for rendering; do not hand-write the final layout. HTML output is a multi-card report
(including an overview of the health score and anomalies, one card per layer with a metrics table, a cost card, and a recommendations card); Markdown is its lightweight equivalent.
- Print the schema and fill it in:
python3 scripts/render_report.py --schema. Each layer requiresstate、score/max_score、metrics[]anddetail;assessment.health_scoremust equal the sum of the layer scores and match the grading; cost carries only actual billed amounts. - Validate before rendering:
python3 scripts/render_report.py --validate -i data.json. Fix issues according to the prompts (invalid status,unknownmissing reason, grading not matching score, estimates appearing in cost). - Render in the format chosen by the user:
python3 scripts/render_report.py -i data.json -f md -o report.md(or-f html)。
Hand off to operations (optional)
When a real failure is found and the user chooses to enter qianwenai-operate , write observe_handoff.jsonto the project directory, so that operate
uses it as the starting point for diagnosis and prioritizes verifying the layer named:
{
"from": "qianwenai-observe",
"generated_at": "2026-08-03T16:20:00+08:00",
"fault_layer": "rds",
"symptoms": ["RDS 活跃连接从 12 升到 190,接近上限"],
"metrics": {"rds_active_connections": 190, "app_http_code": 200}
}
fault_layer takes one of app / nginx / ecs / rds / network / disk . Write only evidence obtained from read-only observation;neverwrite passwords, connection strings, or signed URLs. The file serves only as a clue; operate will still independently re-verify before proposing recovery actions.
Security
| Rule | Description |
|---|---|
| Read-only | Cloud Assistant commands must be read-only; never modify instance/application state. |
| Do not touch passwords | Never read or output passwords in .qianwenai-deploy.local . |
| Masking | AccessKeys, Tokens, passwords, connection string passwords, and Cookies in log output must be masked. |
| Slow SQL | Output only SQL templates/masked SQL, with length limits; never display literal parameter values. |
| Cost | Display only actual charges (¥) and billing periods; never display estimates. When there is no bill yet, mark the cost as unknown。 |
Required permissions
See references/ram_policies.md. Except for the cms:InstallMonitoringAgent for lazily installing the agent, all are read-only:
ecs:DescribeInstances、ecs:RunCommand +
ecs:DescribeInvocations(read-only commands),cms:DescribeMetricList、
cms:DescribeMonitoringAgentStatuses、cms:InstallMonitoringAgent、ecs:DescribeSecurityGroupAttribute、
ecs:DescribeInstanceHistoryEvents、ecs:DescribeSnapshots、vpc:DescribeEipAddresses、
bssopenapi:QueryInstanceBill、bssopenapi:QueryBill, and (when RDS is included)
rds:DescribeDBInstances、rds:DescribeDBInstanceAttribute、rds:DescribeDBInstancePerformance、
rds:DescribeSlowLogRecords、rds:DescribeBackups。
More details
The guides for each layer are linked above in "How to check". There are also two configuration references:
- CLI configuration — installation and credential checks.
- CLI pitfalls quick reference — Common pitfalls in parameter forms, time formats, and response parsing.
- RAM permissions — The read-only permissions required by this skill.