db-admin

db-admin is a skill for Claude Code from EliasOulkadi/shokunin. It costs 122 tokens per session (2,093 once invoked), scanned A, original, MIT.

A PostgreSQL administration guide for operating databases in production. PostgreSQL is a database system; the guide covers backups, restores, monitoring, maintenance, connection pooling, and replication.

In plain words
What is it for?
Use it to check PostgreSQL health, create and verify backups, schedule retention, restore data, configure PgBouncer, tune vacuuming, or set up streaming and logical replication.
Why use it?
It helps detect unhealthy database conditions and prepare recoverable backups before failures occur. It also gives procedures for handling connections, long-running queries, table cleanup, caching, and replicated databases.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions OpenCode.

Good fit Use it to check PostgreSQL health, create and verify backups, schedule retention, restore data, configure PgBouncer, tune vacuuming, or set up streaming and logical replication.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eliasoulkadi/shokunin/db-admin
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add EliasOulkadi/shokunin --skill db-admin
Clone the repo
git clone --depth 1 https://github.com/EliasOulkadi/shokunin

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for db-admin

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliasoulkadi/shokunin/db-admin/github.svg)](https://agentmods.dev/skills/eliasoulkadi/shokunin/db-admin)
Your own site
<a href="https://agentmods.dev/skills/eliasoulkadi/shokunin/db-admin"><img src="https://agentmods.dev/badge/skills/eliasoulkadi/shokunin/db-admin/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for db-admin

Your own site · 80×15
<a href="https://agentmods.dev/skills/eliasoulkadi/shokunin/db-admin"><img src="https://agentmods.dev/badge/skills/eliasoulkadi/shokunin/db-admin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00122 $0.02093
Opus 5 $0.00061 $0.01046
Sonnet 5 $0.00024 $0.00419
Haiku 4.5 $0.00012 $0.00209

Measured 9d ago against content hash 64cf854b5aa3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

db-admin scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/backup-schedule-template.ps1, scripts/backup-db.ps1, scripts/monitor-db.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.pack/skills/db-admin/SKILL.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Administrator

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

Workflow

Step 1: Run health check

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 for diagnosis and fix procedures.

Step 2: Backup database

# Full backup
scripts/backup-db.ps1 -Database myapp

# Custom output directory
scripts/backup-db.ps1 -Database myapp -OutputDir D:\backups

# Exclude large log tables
scripts/backup-db.ps1 -Database myapp -ExcludeTables @("audit_logs", "analytics_events")

The script creates: myapp_2026-05-13_143022.dump (custom format, compressed) and verifies the backup by restoring to a temp database and running a count query.

Step 3: Set up scheduled backups

See assets/backup-schedule-template.ps1 for the schedule template.

# Schedule daily backup at 2 AM
schtasks /Create /SC DAILY /TN "DBBackup-myapp" /TR "powershell.exe -File C:\scripts\backup-schedule.ps1" /ST 02:00

Retention policy:

  • Daily: keep 7
  • Weekly: keep 4 (Sundays)
  • Monthly: keep 3 (1st of month)

Step 4: Configure connection pooling

# pgbouncer.ini for PostgreSQL pooling
[databases]
myapp = host=localhost port=5432 dbname=myapp

[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = scram-sha-256
pool_mode = transaction
default_pool_size = 25
max_client_conn = 100
max_db_connections = 50

Step 5: Set up replication (if needed)

See references/postgres-admin.md for streaming and logical replication setup.

Read the full file on GitHub · 252 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 252 lines · 122 tokens per session scan A 64cf854b5aa3

Subscribe to this mod's changes

db-admin is a skill published in the GitHub repository EliasOulkadi/shokunin (113 stars, last pushed 1mo ago), licensed MIT. It adds 122 tokens to every session and 2,093 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

supabase-node

Express/Hono with Supabase and Drizzle ORM.

alinaqi/maggy · 14 tokens

supabase

Core Supabase CLI, migrations, RLS, Edge Functions.

alinaqi/maggy · 15 tokens

memstack-security-rls-guardian

Use this skill when creating or altering database tables in Supabase or PostgreSQL projects. Triggers include: CREATE TABLE, ALTER TABLE, migration files, 'RLS', 'row level security', 'new table', 'database schema'. Enforces Row Level Security policies on every table to prevent unauthorized data access. Do NOT use for…

cwinvestments/memstack · 84 tokens

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens

idempotency-patterns

Use when making retried HTTP commands or message processing safe against duplicate effects, including database-backed request keys, payload conflicts and concurrent retries. Do not apply caching as a substitute for business idempotency.

rrezartprebreza/spring-boot-skills · 46 tokens

saas-multi-tenant

Design and implement multi-tenant SaaS architectures with RLS, tenant isolation, and PostgreSQL / Desain dan implementasikan arsitektur SaaS multi-tenant dengan RLS, isolasi tenant, dan PostgreSQL.

roedyrustam/vibes-plug · 52 tokens