Initial commit
This commit is contained in:
52
skills/database-connection-pooler/SKILL.md
Normal file
52
skills/database-connection-pooler/SKILL.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
name: optimizing-database-connection-pooling
|
||||
description: |
|
||||
This skill optimizes database connection pooling for enhanced performance and resource management. It is activated when the user requests assistance with connection pooling, database performance tuning, or connection lifecycle management. Use this skill to implement and configure connection pools in various programming languages, identify optimal pool settings, and troubleshoot common connection-related issues. The skill is triggered by phrases like "connection pooling," "optimize database connections," or "improve database performance with connection pool."
|
||||
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This skill enables Claude to generate and configure database connection pools, ensuring optimal performance and resource utilization. It provides guidance on selecting appropriate pool settings, managing connection lifecycles, and monitoring pool performance.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Identify Requirements**: Analyzes the user's request to determine the target database, programming language, and performance goals.
|
||||
2. **Generate Configuration**: Creates a connection pool configuration tailored to the specified environment, including settings for minimum and maximum pool size, connection timeout, and other relevant parameters.
|
||||
3. **Implement Monitoring**: Sets up monitoring for key pool metrics, such as connection usage, wait times, and error rates.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
This skill activates when you need to:
|
||||
- Implement connection pooling for a database application.
|
||||
- Optimize existing connection pool configurations.
|
||||
- Troubleshoot connection-related performance issues.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Implementing Connection Pooling in Python
|
||||
|
||||
User request: "Implement connection pooling in Python for a PostgreSQL database to improve performance."
|
||||
|
||||
The skill will:
|
||||
1. Generate a Python code snippet using a connection pool library like `psycopg2` or `SQLAlchemy`.
|
||||
2. Configure the connection pool with optimal settings for the PostgreSQL database, such as maximum pool size and connection timeout.
|
||||
|
||||
### Example 2: Optimizing Connection Pool Configuration in Java
|
||||
|
||||
User request: "Optimize the connection pool configuration in my Java application using HikariCP to reduce connection wait times."
|
||||
|
||||
The skill will:
|
||||
1. Analyze the existing HikariCP configuration.
|
||||
2. Suggest adjustments to parameters like minimum idle connections, maximum pool size, and connection timeout to minimize wait times.
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Connection Timeout**: Set a reasonable connection timeout to prevent indefinite waiting.
|
||||
- **Pool Size**: Adjust the pool size based on the application's workload and database server capacity.
|
||||
- **Connection Testing**: Implement connection validation to ensure connections are still valid before use.
|
||||
|
||||
## Integration
|
||||
|
||||
This skill can integrate with other Claude Code plugins for database management, code generation, and performance monitoring to provide a comprehensive solution for database optimization.
|
||||
26
skills/database-connection-pooler/assets/README.md
Normal file
26
skills/database-connection-pooler/assets/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Skill Assets
|
||||
|
||||
This directory contains static assets used by this skill.
|
||||
|
||||
## Purpose
|
||||
|
||||
Assets can include:
|
||||
- Configuration files (JSON, YAML)
|
||||
- Data files
|
||||
- Templates
|
||||
- Schemas
|
||||
- Test fixtures
|
||||
|
||||
## Guidelines
|
||||
|
||||
- Keep assets small and focused
|
||||
- Document asset purpose and format
|
||||
- Use standard file formats
|
||||
- Include schema validation where applicable
|
||||
|
||||
## Common Asset Types
|
||||
|
||||
- **config.json** - Configuration templates
|
||||
- **schema.json** - JSON schemas
|
||||
- **template.yaml** - YAML templates
|
||||
- **test-data.json** - Test fixtures
|
||||
26
skills/database-connection-pooler/references/README.md
Normal file
26
skills/database-connection-pooler/references/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Skill References
|
||||
|
||||
This directory contains reference materials that enhance this skill's capabilities.
|
||||
|
||||
## Purpose
|
||||
|
||||
References can include:
|
||||
- Code examples
|
||||
- Style guides
|
||||
- Best practices documentation
|
||||
- Template files
|
||||
- Configuration examples
|
||||
|
||||
## Guidelines
|
||||
|
||||
- Keep references concise and actionable
|
||||
- Use markdown for documentation
|
||||
- Include clear examples
|
||||
- Link to external resources when appropriate
|
||||
|
||||
## Types of References
|
||||
|
||||
- **examples.md** - Usage examples
|
||||
- **style-guide.md** - Coding standards
|
||||
- **templates/** - Reusable templates
|
||||
- **patterns.md** - Design patterns
|
||||
24
skills/database-connection-pooler/scripts/README.md
Normal file
24
skills/database-connection-pooler/scripts/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Skill Scripts
|
||||
|
||||
This directory contains optional helper scripts that support this skill's functionality.
|
||||
|
||||
## Purpose
|
||||
|
||||
Scripts here can be:
|
||||
- Referenced by the skill for automation
|
||||
- Used as examples for users
|
||||
- Executed during skill activation
|
||||
|
||||
## Guidelines
|
||||
|
||||
- All scripts should be well-documented
|
||||
- Include usage examples in comments
|
||||
- Make scripts executable (`chmod +x`)
|
||||
- Use `#!/bin/bash` or `#!/usr/bin/env python3` shebangs
|
||||
|
||||
## Adding Scripts
|
||||
|
||||
1. Create script file (e.g., `analyze.sh`, `process.py`)
|
||||
2. Add documentation header
|
||||
3. Make executable: `chmod +x script-name.sh`
|
||||
4. Test thoroughly before committing
|
||||
Reference in New Issue
Block a user