Agent skill · Audited from source
Optimizing Database Connection Pooling
skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 8 Oct 2026 · source 4f83675ca38a
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Process use when you need to work with connection management.
Cite
Cite this page
ModelsAtlas. “Optimizing Database Connection Pooling (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/optimizing-database-connection-pooling
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 4f83675ca38a · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherjeremylongshore GitHub userOwner of the repository this skill is read from
- Source folderjeremylongshore/claude-code-plugins-plus-skills/plugins/database/database-connection-pooler/skills/optimizing-database-connection-poolingThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict4f83675ca38aA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Process use when you need to work with connection management.
--- name: optimizing-database-connection-pooling description: '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". ' allowed-tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*) version: 1.23.0 author: Jeremy Longshore <[email protected]> license: MIT tags: - database - optimizing-database compatibility: Designed for Claude Code --- # Database Connection Pooler ## Overview 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. ## Prerequisites - `psql` or `mysql` CLI for querying connection metrics - Access to database configuration files (`postgresql.conf`, `my.cnf`) for `max_connections` settings - PgBouncer, ProxySQL, or Odyssey installed if using external pooling - Application connection pool settings accessible (database URL, pool size parameters) - Server CPU core count and available memory for pool sizing calculations ## Instructions 1. Audit current connection usage by querying active connections: - PostgreSQL: `SELECT count(*) AS total, state, usename FROM pg_stat_activity GROUP BY state, usename ORDER BY total DESC` - MySQL: `SHOW STATUS LIKE 'Threads_connected'` and `SHOW PROCESSLIST` - Compare against `max_connections` setting to determine headroom 2. Calculate 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. 3. Configure application-level connection pool parameters: - **minimumIdle**: Set to 2-5 for low-traffic periods (avoids cold-start latency) - **maximumPoolSize**: Set using the formula from step 2 - **connectionTimeout**: 5-10 seconds (fail fast rather than queue indefinitely) - **idleTimeout**: 10-30 minutes (release idle connections back to pool) - **maxLifetime**: 30 minutes (prevent stale connections from accumulating) - **leakDetectionThreshold**: 60 seconds (log warning for connections held too long) 4. For PostgreSQL with many application instances, deploy PgBouncer in transaction pooling mode: - Set `pool_mode = transaction` to multiplex connections (one backend connection serves many clients between transactions) - Set `default_pool_size = 20` and `max_client_conn = 1000` - Configure `server_idle_timeout = 600` to close unused backend connections - Set `server_lifetime = 3600` to periodically refresh connections 5. For MySQL with many application instances, deploy ProxySQL: - Configure connection multiplexing in `mysql_servers` table - Set `max_connections` per backend server - Configure query rules for read/write splitting to replicas - Enable connection pooling with `free_connections_pct = 10` 6. Set `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. 7. 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. 8. Monitor connection pool metrics continuously: - Active connections vs. pool size (saturation indicator) - Wait time for connection acquisition (queuing indicator) - Connection creation rate (churn indicator) - Idle connection count (waste indicator) - Connection leak warnings (application bug indicator) 9. 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. 10. 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`). ## Output - **PgBouncer/ProxySQL configuration files** with optimized pool settings - **Application pool configuration** with connection string and pool parameters - **Connection sizing worksheet** documenting the calculation from cores to pool size - **Monitoring queries** for connection metrics and health checks - **Connection architecture diagram** showing application -> pooler -> database flow ## Error Handling | 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 | Increa
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4f83675
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills git -C claude-code-plugins-plus-skills checkout 4f83675ca38a
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
4f83675ca38a
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/jeremylongshore/optimizing-database-connection-pooling/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All data & analysis skills →jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Deploy and orchestrate Vertex AI ADK agents using A2A protocol. Manages
Add this badge to your README
[](https://modelsatlas.com/skills/jeremylongshore/optimizing-database-connection-pooling/)
<a href="https://modelsatlas.com/skills/jeremylongshore/optimizing-database-connection-pooling/"><img src="https://modelsatlas.com/skills/jeremylongshore/optimizing-database-connection-pooling/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Optimizing Database Connection Pooling
What does the Optimizing Database Connection Pooling skill do?
Is Optimizing Database Connection Pooling safe to install?
What can Optimizing Database Connection Pooling access on my machine?
Which assistants does Optimizing Database Connection Pooling work with?
How current is this page?
Sources
- github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/ — the audited source at commit 4f83675ca38a and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Optimizing Database Connection Pooling skill do?
- Is Optimizing Database Connection Pooling safe to install?
- What can Optimizing Database Connection Pooling access on my machine?