db-admin

仓库创建 2026年5月12日最近提交 10 小时前SkillHot 收录 20 天前
▸ 精选理由

覆盖 PITR、复制与关键健康指标,适合 SRE 与数据库管理员使用。

▸ 风险提示

会建议执行数据库脚本并需要数据库凭据与高权限

这个 Skill 做什么

提供 PostgreSQL 生产级运维方案:备份、恢复、复制与性能监控。

负责把 PostgreSQL 当生产库打点:做备份/恢复(pg_dump、PITR、WAL)、监控健康(连接数、bloat、cache hit、死元组)、以及设置复制和 PgBouncer 连接池。遇到要做数据库恢复、定期备份、搭复制或诊断性能和维护时会用到。特点是覆盖生产级操作流程和细节(vacuum/autovacuum 调优、WAL 存档与保留策略),适合运维/DBA 场景。

▸ 展开 SKILL.md 英文原文

PostgreSQL database administration — backup/restore (pg_dump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication (streaming, logical), vacuum/autovacuum tuning, and scheduled backups with retention. Use when user asks to backup a database, restore from backup, monitor database health, set up replication, or perform DBA tasks. Do NOT use for schema design (use db-sculptor), query optimization (use db-sculptor), or migration planning (use db-sculptor).

开发编程PostgreSQL运维备份通用
110
Stars
14
Forks
40
仓库内 Skill
+7
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/EliasOulkadi/shokunin/master/.pack/skills/db-admin/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/EliasOulkadi/shokunin/master/.pack/skills/db-admin/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Database Administrator

PostgreSQL production operations: backup, restore, monitoring, replication, and maintenance.

## Workflow

### Step 1: Run health check

```powershell
scripts/monitor-db.ps1 -Database myapp
```

Checks 7 metrics:
| Metric | Warning | Fail |
|--------|---------|------|
| Connection count | > 80% of max | > 95% of max |
| Active queries | > 10 | > 20 |
| Long-running (>5m) | Any | > 3 |
| Cache hit ratio | < 99% | < 95% |
| Dead tuple ratio | > 20% | > 40% |
| Index usage (unused) | > 5 | > 10 |

**If any metric is FAIL**: investigate immediately. See [references/postgres-admin.md](references/postgres-admin.md) for diagnosis and fix procedures.

### Step 2: Backup dat
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有