/ai-stuff:postgres-server-tuningfrom ai-stuff
Configure a PostgreSQL instance and its host for performance: shared_buffers, effective_cache_size, work_mem (and how it multiplies across nodes and connections), maintenance memory, checkpoints and max_wal_size, WAL compression and synchronous_commit, storage and I/O (NVMe vs network volumes, PG18 async I/O), huge pages, Linux overcommit and THP, filesystems, and cloud/ARM sizing. Use when setting up or reviewing postgresql.conf, sizing hardware, or investigating instance-wide slowness, checkpoint spikes, or OOM kills.
Ships in ai-stuff. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A playbook distilled from Scaling Postgres. Evidence and benchmarks are in reference.md. Related skills:
postgres-query-tuning.postgres-autovacuum.postgres-connection-pooling.shared_buffers = '25% of RAM' # then verify with cache hit / pg_buffercache
effective_cache_size = '50-75% of RAM' # planner hint only, allocates nothing
work_mem = '16MB' # modest globally; raise per role/session for analytics
maintenance_work_mem = '1GB' # index builds, vacuum (see autovacuum_work_mem)
random_page_cost = 1.1 # SSD/NVMe
checkpoint_timeout = '15min' # 15-30 min
checkpoint_completion_target = 0.9
max_wal_size = '...' # large enough that checkpoints are triggered by time, not WAL volume
wal_compression = on # lz4/zstd where available
log_checkpoints = on
These are rule-of-thumb defaults, uncited unless the reference says otherwise. Verify each against your own workload.
work_mem multiplies. It applies per sort or hash node, per parallel
worker, per connection. A high global value plus many connections leads to
OOM. Keep it modest globally; raise it with
ALTER ROLE analytics SET work_mem = ... or SET LOCAL.checkpoints_req dominates checkpoints_timed, raise max_wal_size.synchronous_commit = off trades the last few hundred milliseconds of
commits on a crash for throughput. That's acceptable per transaction for
low-value writes, never as a blanket default for important data.io_method = worker. Benchmark
before switching to io_uring. Tune effective_io_concurrency /
maintenance_io_concurrency for your storage.shared_buffers is large (huge_pages = try or
on, plus vm.nr_hugepages).vm.overcommit_memory = 2 with a sane ratio, so
the OOM killer doesn't take the postmaster.shared_buffers, work_mem × connections × nodes fits RAM,
maintenance memory sized.max_wal_size fits the peak
WAL rate.random_page_cost reflects SSDs.What SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./dispatching-parallel-agentsUse ONLY when the developer has explicitly told you to dispatch subagents — never infer or self-authorize it. Splits 2+ independent tasks across isolated subagents, assigns them cheap models, and polls at a per-harness cadence that preserves prompt cache (Claude Code vs Codex/opencode).Other plugins' skills for the same job
npx claudepluginhub pauldotsh/ai-stuff --plugin ai-stuff