Define production-grade PostgreSQL datasource configuration for Spring Boot applications.
When to Use
Use when PostgreSQL is the primary persistent database for staging/production environments.
Rules
Configure datasource via externalized environment variables, not hardcoded secrets.
Keep production-like profile configuration explicit (for example prod).
Set Hibernate schema management to migration-driven mode (ddl-auto=none outside tests).
Keep JDBC URL, credentials, and pool settings configurable per environment.
Use Actuator health checks to expose database readiness.
Defaults
PostgreSQL is the default database for production-like profiles.
Use UTF-8 and UTC-oriented conventions across app and DB settings.
Keep connection pool sizing explicit and environment-specific.
Keep SQL initialization and schema lifecycle controlled by Flyway.
Validation Checklist
Before finishing:
No production credentials are committed to repository files.
prod-profile datasource properties resolve from environment variables.
Database health endpoint is reachable in runtime checks.
Application starts with Flyway-managed schema and ddl-auto=none.
Anti-Patterns
Do NOT keep production DB credentials in plain text in committed config files.
Do NOT use embedded database settings in production profiles.
Do NOT rely on default pool settings without environment sizing review.
Do NOT mix schema management strategies (auto-DDL + Flyway) in production-like profiles.
1---2name: postgresql-config3description: Skill: postgresql-config4---5# Skill: postgresql-config67## Type8infrastructure910## Requirements1112- spring-data-jpa1314---1516## Purpose1718Define production-grade PostgreSQL datasource configuration for Spring Boot applications.1920---2122## When to Use2324Use when PostgreSQL is the primary persistent database for staging/production environments.2526---2728## Rules2930- Configure datasource via externalized environment variables, not hardcoded secrets.31- Keep production-like profile configuration explicit (for example `prod`).32- Set Hibernate schema management to migration-driven mode (`ddl-auto=none` outside tests).33- Keep JDBC URL, credentials, and pool settings configurable per environment.34- Use Actuator health checks to expose database readiness.3536---3738## Defaults3940- PostgreSQL is the default database for production-like profiles.41- Use UTF-8 and UTC-oriented conventions across app and DB settings.42- Keep connection pool sizing explicit and environment-specific.43- Keep SQL initialization and schema lifecycle controlled by Flyway.4445---4647## Validation Checklist4849Before finishing:5051- No production credentials are committed to repository files.52- `prod`-profile datasource properties resolve from environment variables.53- Database health endpoint is reachable in runtime checks.54- Application starts with Flyway-managed schema and `ddl-auto=none`.5556---5758## Anti-Patterns5960- Do NOT keep production DB credentials in plain text in committed config files.61- Do NOT use embedded database settings in production profiles.62- Do NOT rely on default pool settings without environment sizing review.63- Do NOT mix schema management strategies (auto-DDL + Flyway) in production-like profiles.
Run npx skillmds@latest add carlnaddy/postgresql-config in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Skill: postgresql-config It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
CarlNaddy (@carlnaddy) published this skill. Their other Agent Skills are listed on their SkillMD profile.