DB Admin
EliasOulkadi/shokunin
PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with connection management.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-pooling --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .claude/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .claude/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-poolingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-pooling --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .agents/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .agents/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-pooling --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .cursor/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .cursor/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/optimizing-database-connection-pooling--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-pooling --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .gemini/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .gemini/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-poolingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .github/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .github/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-database-connection-pooling --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/optimizing-database-connection-pooling .opencode/skills/optimizing-database-connection-pooling && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "optimizing-database-connection-pooling" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/optimizing-database-connection-pooling into .opencode/skills/optimizing-database-connection-pooling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optimizing-database-connection-pooling", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
optimizing-database-connection-poolingProcess use when you need to work with connection management.
Optimizing Database Connection Pooling is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with connection management. This skill provides connection pooling and management with comprehensive guidance and automation. Trigger with phrases like "manage connections", "configure pooling", or "optimize connection usage".
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code
It sits in Databases, covering Database administration. It works with PostgreSQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobBash(psql:*)Bash(mysql:*)Bash(mongosh:*)From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/, which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.compgbouncer.orgproxysql.compostgresql.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Optimizing Database Connection Pooling loads about 1.9k tokens when it runs, and up to ~2.1k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 828 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 828 words, ~1,930 tokens.
.claude/skills/optimizing-database-connection-pooling/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Configure and optimize database connection pooling using external poolers (PgBouncer, ProxySQL, Odyssey) and application-level pool settings to prevent connection exhaustion, reduce connection overhead, and improve database throughput.
psql or mysql CLI for querying connection metricspostgresql.conf, my.cnf) for max_connections settingsAudit current connection usage by querying active connections:
SELECT count(*) AS total, state, usename FROM pg_stat_activity GROUP BY state, usename ORDER BY total DESCSHOW STATUS LIKE 'Threads_connected' and SHOW PROCESSLISTmax_connections setting to determine headroomCalculate the optimal pool size using the formula: pool_size = (core_count * 2) + effective_spindle_count. For SSD-backed databases, use core_count * 2 + 1. A 4-core server with SSD storage should have a pool size of approximately 9. This formula applies per application instance.
Configure application-level connection pool parameters:
For PostgreSQL with many application instances, deploy PgBouncer in transaction pooling mode:
pool_mode = transaction to multiplex connections (one backend connection serves many clients between transactions)default_pool_size = 20 and max_client_conn = 1000server_idle_timeout = 600 to close unused backend connectionsserver_lifetime = 3600 to periodically refresh connectionsFor MySQL with many application instances, deploy ProxySQL:
mysql_servers tablemax_connections per backend serverfree_connections_pct = 10Set max_connections in the database server based on available memory. Each PostgreSQL connection uses approximately 5-10MB of memory. For a server with 8GB RAM: max_connections = (8192MB - 2048MB_for_OS - 2048MB_shared_buffers) / 10MB = ~400. For MySQL, each thread uses approximately 1-4MB.
Implement connection health checks. Configure the pool to validate connections before lending (testOnBorrow or validation-query). Use a lightweight query: SELECT 1 for MySQL or a simple query for PostgreSQL. Set validation interval to avoid excessive overhead.
Monitor connection pool metrics continuously:
Handle connection storms (sudden spike in connection requests) by configuring a connection request queue with a bounded wait time, implementing retry with exponential backoff in the application, and pre-warming the pool during application startup.
Document the connection architecture: application pool size per instance, number of application instances, PgBouncer/ProxySQL settings, database max_connections, and the maximum theoretical connections formula (instances * pool_size_per_instance).
| Error | Cause | Solution |
|---|---|---|
FATAL: too many connections for role | Application pool size exceeds max_connections or connection leak | Reduce pool size; fix connection leaks (enable leak detection); add PgBouncer for connection multiplexing |
| Connection timeout after 5 seconds | Pool exhausted, all connections in use | Increase pool size cautiously; check for long-running transactions holding connections; add connection queue with backpressure |
connection reset by peer errors | Server-side idle timeout killed the connection | Set pool maxLifetime shorter than server idle_in_transaction_session_timeout; enable connection validation |
PgBouncer no more connections allowed | max_client_conn exceeded | Increase max_client_conn; or reduce client connection demand; check for connection leaks in application |
| High connection churn (create/destroy rate) | Pool too small for workload or maxLifetime too short | Increase pool size; extend maxLifetime to 30 minutes; ensure minimumIdle is set to avoid constant pool resizing |
Right-sizing a pool for a Spring Boot microservice: 4-core server, SSD storage, 3 microservice instances. Optimal pool per instance: (4 * 2) + 1 = 9. Total connections: 9 * 3 = 27. Database max_connections = 100 with comfortable headroom. Application startup pre-warms 5 connections per instance. Connection leak detection set to 60 seconds catches a missing connection.close() in an error handler.
PgBouncer deployment for a serverless application: Lambda functions create a new database connection per invocation, overwhelming PostgreSQL with 500+ connections. PgBouncer deployed between Lambda and PostgreSQL with pool_mode = transaction, default_pool_size = 25, max_client_conn = 5000. Lambda connects to PgBouncer; PgBouncer multiplexes to 25 backend connections. Connection errors eliminated; database CPU reduced from 95% to 30%.
ProxySQL read/write splitting: A MySQL application sends 80% reads and 20% writes. ProxySQL routes writes to the primary and distributes reads across 2 replicas. Connection pooling reduces backend connections from 300 (direct) to 60 (pooled). Average query latency drops from 8ms to 3ms due to reduced connection overhead.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts, references, assets) in skills/.curated/optimizing-database-connection-pooling of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit 23ea8d4
Optimizing Database Connection Pooling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Optimizing Database Connection Pooling this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.9k | Automated safety check: Pass | MIT | |
| DB AdminEliasOulkadi/shokunin | 114 | — | ~2k | Automated safety check: Notes | MIT | |
| Postgres Expertcin12211/orca-q | 224 | — | ~5.5k | Automated safety check: Pass | MIT | |
| Mg Railway DB Restoremodelguide/modelguide | 108 | — | ~562 | Automated safety check: Pass | MIT | |
| Postgres ExpertRightNow-AI/openfang | 18k | — | ~830 | Automated safety check: Pass | Apache-2.0 | |
| Postgres Optimizationrohitg00/awesome-claude-code-toolkit | 2.7k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
EliasOulkadi/shokunin
PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…
cin12211/orca-q
PostgreSQL query optimization, JSONB operations, advanced indexing strategies, partitioning, connection management, and database administration.
modelguide/modelguide
Restore a PostgreSQL database backup to a Railway environment.
RightNow-AI/openfang
PostgreSQL expert for query optimization, indexing, extensions, and database administration
rohitg00/awesome-claude-code-toolkit
PostgreSQL optimization including indexes, query plans, partitioning, JSONB operations, and connection pooling
digoal/blog
Portable digital employee distilled from digoal's personal blog for PostgreSQL, PolarDB, DuckDB, AI+database, vector/RAG, database operations, source-code reading, technical content creation…
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.
jeremylongshore/tons-of-skills-marketplace
Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.
jeremylongshore/tons-of-skills-marketplace
Process identify anomalies and outliers in datasets using machine learning algorithms.
jeremylongshore/tons-of-skills-marketplace
Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.
jeremylongshore/tons-of-skills-marketplace
Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.
Works with
Categories
Process use when you need to work with connection management. Optimizing Database Connection Pooling is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with connection management.
Optimizing Database Connection Pooling fits situations like: you need to work with connection management; with phrases like manage connections; configure pooling; optimize connection usage.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a claude-code`. Or copy the skill folder (skills/.curated/optimizing-database-connection-pooling in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/optimizing-database-connection-pooling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a codex`. Or copy the skill folder (skills/.curated/optimizing-database-connection-pooling in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/optimizing-database-connection-pooling in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-database-connection-pooling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimizing-database-connection-pooling, .gemini/skills/optimizing-database-connection-pooling, .github/skills/optimizing-database-connection-pooling and .opencode/skills/optimizing-database-connection-pooling in your project.
SKILL.md names no scripts, command-line tools or credentials: Optimizing Database Connection Pooling is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 4 domains. As links in the text: github.com, pgbouncer.org, proxysql.com and postgresql.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Optimizing Database Connection Pooling is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 146 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Optimizing Database Connection Pooling: DB Admin (EliasOulkadi/shokunin, 114 stars), Postgres Expert (cin12211/orca-q, 224 stars), Mg Railway DB Restore (modelguide/modelguide, 108 stars) and Postgres Expert (RightNow-AI/openfang, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.