db-connection

Configure Neon PostgreSQL connections with pooling and SSL for FastAPI applications.

Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Awais68/h2_phase_3_Chatbot_Todo --skill db-connection
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: db-connection
Source: https://github.com/Awais68/h2_phase_3_Chatbot_Todo/tree/main/.claude/skills/db-connection
Command: npx skills add https://github.com/Awais68/h2_phase_3_Chatbot_Todo --skill db-connection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides robust database connection management for Python/FastAPI applications using Neon PostgreSQL, including engine creation, connection pooling, SSL handling, and health checks to prevent leaks and ensure reliability.

Core Features & Use Cases

  • Engine creation with optimized pool settings for Neon PostgreSQL.
  • Centralized configuration via Settings (DB_URL, pool size, timeout, SSL mode).
  • Reuse and health-check of connections to prevent leaks in web apps like FastAPI routes.
  • SSL enforcement and pooling stats monitoring.

Quick Start

Use this skill to configure the database layer for a FastAPI app by wiring settings to the environment and obtaining an engine via get_engine()

Frequently Asked Questions about db-connection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a stable Neon PostgreSQL connection in FastAPI?▼

This Skill establishes robust Neon PostgreSQL connections in FastAPI by providing engine creation with connection pooling, enforced SSL, and environment-based configuration to prevent leaks and ensure production reliability.

Why does my FastAPI Neon database connection keep dropping?▼

Dropping Neon connections in FastAPI are prevented by this Skill through enforced connection pooling parameters, mandatory SSL modes, and active health checks that monitor and maintain connection stability.

How do I enforce SSL for PostgreSQL connections in a FastAPI application?▼

This Skill enforces SSL for PostgreSQL connections in FastAPI by integrating mandatory SSL mode parameters into the SQLAlchemy engine creation and centralizing them via environment-based Settings configuration.

Can I use Alembic tooling with a Neon PostgreSQL connection pool?▼

Yes, Alembic tooling is supported alongside Neon PostgreSQL connection pooling. This Skill integrates with Alembic migrations and exposes get_engine and get_db patterns to manage connections during schema changes.

What is the best way to monitor SQLAlchemy connection pool stats in FastAPI?▼

Monitoring SQLAlchemy connection pool stats in FastAPI is handled by this Skill's built-in health checks and pooling stats monitoring, which track active connections and prevent resource exhaustion in production.

Do I need environment variables to configure FastAPI database connections?▼

Environment variables are required for configuring FastAPI database connections with this Skill. It uses a centralized Settings model to read DB_URL, pool size, timeout, and SSL mode directly from the environment.