| name | dsflow |
| description | 云原生 SRE 值班助理和巡检编排技能。用于基础设施早检、Kubernetes 集群健康检查、Ceph 存储巡检、计算集群巡检、网关故障初筛、异常证据汇总和值班日报生成。触发场景:用户要求早检、巡检、检查集群是否正常、检查 Ceph、检查计算集群、排查网关错误或生成基础设施健康报告。 |
Dsflow
Overview
Use this skill as the top-level SRE workflow for cloud-native operations. It coordinates existing diagnostic skills and scripts, keeps checks read-only by default, and turns raw cluster, storage, gateway, and log evidence into an actionable operations summary.
Operating Rules
- Run only read-only checks unless the user explicitly asks for a change.
- Treat restart, rollout, scale, drain, cordon, uncordon, delete, patch, deploy, rebuild, rollback, and any non-GET API call as mutating.
- Before a mutating operation, show the exact command, target, expected effect, and blast radius, then wait for explicit confirmation.
- Prefer existing specialized skills over ad hoc commands:
- Kubernetes overview and events:
k8s-diagnostic
- Node failures and pressure:
k8s-node-analyzer
- Pod restart and crash diagnosis:
k8s-pod-diagnostic
- Ceph health, OSD, PG, MDS, capacity, and latency:
ceph-status-analyzer
- Logs and error patterns:
victorialogs-analyzer
- Gateway traffic, 5xx, and slow requests:
kong-gateway-analyzer
- DevOps app and service context:
devopsctl
- Cloud resource queries:
aliyun-cli, hcloud-cli
Workflow Selection
- Before non-trivial checks, read
references/memory/index.md and search relevant Markdown memory files with rg.
- For "早检", "巡检", or "检查基础设施是否正常", read
references/daily-check-playbook.md and execute the full daily check.
- For "检查 Ceph", "存储巡检", or OSD/PG/MDS/capacity issues, read
references/daily-check-playbook.md and run the Ceph path first.
- For "计算集群", "HPC", "LLM", "GPU", or job scheduling issues, read
references/cluster-map.md and run the compute cluster path.
- For gateway errors, 5xx, or slow requests, read
references/service-map.md and require an active cluster or host from the user or service context; do not guess a retired target.
- For severity, escalation, or report wording, read
references/severity-rules.md.
Treat zero nodes, zero scrape targets, or zero gateway request samples as 未检查, not healthy. Resolve active Kubernetes targets from references/cluster-map.md, local environment variables, or the user; never infer them from repository history.
Markdown Memory
Use references/memory/ as the canonical, versioned dsflow memory. Use local Mem0 only as a cross-skill index for durable facts; do not mirror routine task outcomes.
Before diagnosis or inspection:
python3 scripts/memory_context.py search "<cluster service component>"
python3 scripts/memory_context.py audit
The query filters inactive and expired entries by default. Treat results as context, not live truth; always verify operational state with diagnostic scripts.
After meaningful work, update an existing entry with the same scope or write directly to the matching file. Mark replaced entries superseded; give temporary state an expiry. Use inbox.md only when routing is genuinely unknown, and clear it before finishing the task. See references/memory/index.md for routing, precedence, and Mem0 mirroring rules.
Never store secrets, credentials, raw logs, large metric dumps, or transient point-in-time values in memory.
Quick Commands
Use the bundled snapshot runner when the user wants a broad read-only check and no live mutation is needed:
scripts/run_readonly_snapshot.sh --profile all --dry-run
scripts/run_readonly_snapshot.sh --profile infra --output-dir /tmp/dsflow-check
scripts/run_readonly_snapshot.sh --profile ceph --output-dir /tmp/dsflow-ceph
scripts/run_readonly_snapshot.sh --profile compute --output-dir /tmp/dsflow-compute
Analyze command output rather than pasting raw logs into the final answer. Preserve evidence paths when outputs are saved under an output directory.
Response Shape
Use this structure for巡检 and health reports:
总体状态:绿色/黄色/红色
严重问题:
- ...
风险项:
- ...
正常项:
- ...
建议动作:
- ...
需要确认的变更:
- 无 / 需要用户确认的命令
Keep the summary short, evidence-based, and ordered by severity. If a check cannot run, mark it as "未检查" and explain the blocker.
References
references/cluster-map.md: cluster labels and default check scope.
references/daily-check-playbook.md: step-by-step daily SRE check workflow.
references/memory/index.md: Markdown memory index and routing rules.
references/service-map.md: service-oriented gateway checks that require an explicit active target.
references/severity-rules.md: severity classification and escalation rules.