Provide fast local development and test persistence using H2 in dedicated non-production profiles.
When to Use
Use when developers need quick startup and isolated local/test database behavior.
Rules
Scope H2 settings to explicit local/test profiles only.
Keep production profile on PostgreSQL; never use H2 as production default.
Maintain profile parity for schema expectations using Flyway migrations.
Keep H2-specific behavior from leaking into production SQL assumptions.
Defaults
H2 is enabled for local and/or test profiles.
Production-like profile remains PostgreSQL-first.
Tests can use H2 for speed when feature behavior does not require PostgreSQL-specific semantics.
Validation Checklist
Before finishing:
Profile files clearly separate H2 and PostgreSQL configuration.
Application can run with both H2 local profile and PostgreSQL profile.
Schema changes still flow through Flyway migrations.
No production deployment path references H2 datasource URLs.
Anti-Patterns
Do NOT set H2 as the default datasource for production builds.
Do NOT write migrations that only work in H2 syntax unless guarded by strategy.
Do NOT bypass profile isolation by mixing local and prod datasource keys in one profile.
1---2name: h2-dev-config3description: Skill: h2-dev-config4---5# Skill: h2-dev-config67## Type8infrastructure910## Requirements1112- spring-data-jpa1314---1516## Purpose1718Provide fast local development and test persistence using H2 in dedicated non-production profiles.1920---2122## When to Use2324Use when developers need quick startup and isolated local/test database behavior.2526---2728## Rules2930- Scope H2 settings to explicit local/test profiles only.31- Keep production profile on PostgreSQL; never use H2 as production default.32- Maintain profile parity for schema expectations using Flyway migrations.33- Keep H2-specific behavior from leaking into production SQL assumptions.3435---3637## Defaults3839- H2 is enabled for `local` and/or `test` profiles.40- Production-like profile remains PostgreSQL-first.41- Tests can use H2 for speed when feature behavior does not require PostgreSQL-specific semantics.4243---4445## Validation Checklist4647Before finishing:4849- Profile files clearly separate H2 and PostgreSQL configuration.50- Application can run with both H2 local profile and PostgreSQL profile.51- Schema changes still flow through Flyway migrations.52- No production deployment path references H2 datasource URLs.5354---5556## Anti-Patterns5758- Do NOT set H2 as the default datasource for production builds.59- Do NOT write migrations that only work in H2 syntax unless guarded by strategy.60- Do NOT bypass profile isolation by mixing local and prod datasource keys in one profile.
Run npx skillmds@latest add carlnaddy/h2-dev-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: h2-dev-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.