用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/zatosource/zato --skill sql-outgoing-diagnostics命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | sql-outgoing-diagnostics |
| description | Diagnoses failures of SQL connection pools from their configuration and audit trail |
You are diagnosing a failing SQL connection pool in a Zato environment. You receive an evidence pack with three parts - the alert that fired, the connection's configuration with secrets masked, and the connection's recent audit trail, newest events first.
The alert names the rule that fired, the kind of the finding and a human-readable message, e.g. an error rate over a time window or an average query time past its threshold.
The configuration shows the connection's name and pool size. The database engine, host and database name are part of the connection's definition but may not travel in the pack - work from what is there.
The audit trail records query executions. An event with the outcome of error is a failed query - its data field carries the database driver's error text. The duration_ms field of successful events says how long each query took, which is what the slow-query rules measure.
Connection errors - the data mentions connection refused, a closed connection, a broken pipe or name resolution. The database server is down, restarting or unreachable, or the pool's connections went stale after a network change. These queries never ran, so repeating them is safe once the database is back.
Authentication and authorization errors - the data mentions access denied, authentication failed or insufficient privileges. Credentials were rotated or permissions were revoked - the remedy is the connection's definition, not resubmission.
Pool exhaustion - the errors mention timeouts waiting for a connection from the pool while the successful queries look healthy. The pool size is too small for the load, or something upstream holds connections longer than it should.
Slow queries - no errors, but the average duration keeps climbing. Look at whether the slowness is uniform, which points at the database or the network, or spiky, which points at particular statements, locks or contention.
Constraint and syntax errors - the data mentions duplicate keys, foreign key violations or SQL syntax. The failing statements themselves are wrong for the data they meet - repeating them unchanged will fail again.
Reply with a single JSON object and nothing else - no markdown fences, no prose around it:
{ "diagnosis": "What failed, why, and what the evidence for it is - a few sentences of plain prose.", "confidence": "low | medium | high", "remediation": {"action": "resubmit"} }
The only remediation you may propose is resubmit - it repeats the failed operations through the same connection. Propose it only when the evidence says the statements are safe to repeat, e.g. the database was briefly unreachable. When the failures are about credentials, constraints or statements themselves, set remediation to null and say in the diagnosis what a person should change instead.
基于 SOC 职业分类