/micronaut-standards:liquibasefrom Micronaut Standards
OneLiteFeather's mandatory Liquibase database-migration convention for Micronaut REST APIs — always XML changelogs (never YAML/SQL/JSON), the master-changelog-plus-versioned-files structure, and why this replaces Hibernate's hbm2ddl.auto=update. Use this whenever a Micronaut backend needs a schema change, or when reviewing a project still relying on hbm2ddl.auto=update for schema management. For verifying a changelog actually works against both MariaDB and PostgreSQL, see the testcontainers skill.
Ships in Micronaut Standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every schema change to a Micronaut backend's database goes through a Liquibase changelog. Hibernate's
hbm2ddl.auto=update is never used for anything beyond a throwaway local prototype — it has no
migration history, no rollback, and silently diverges between environments that started from different
schema versions.
<!-- db/changelog/changes/001-create-font-table.xml -->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.29.xsd">
<changeSet id="001-create-font-table" author="theEvilReaper">
<createTable tableName="font">
<column name="id" type="uuid">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="ui_name" type="varchar(255)">
<constraints nullable="false"/>
</column>
<column name="texture_path" type="varchar(1024)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
XML is the only accepted changelog format at OneLiteFeather — never YAML, SQL, or JSON changelogs, even
though Liquibase supports all four. Liquibase's abstract change types (createTable, addColumn,
addForeignKeyConstraint, and so on) are the most consistently dialect-neutral in XML: the same
changelog runs unchanged against both MariaDB and PostgreSQL, because Liquibase itself translates each
abstract change type into the right SQL dialect at execution time. Raw SQL changelogs make that
translation the author's job instead, per statement, per dialect.
Reach for <sql> only when no abstract change type covers what's needed, and scope it to the specific
dialect it's needed for using the dbms attribute — never a bare <sql> block assumed to work
everywhere:
<changeSet id="002-add-generated-column" author="theEvilReaper">
<sql dbms="postgresql">
ALTER TABLE font ADD COLUMN search_vector tsvector GENERATED ALWAYS AS (to_tsvector('english', ui_name)) STORED;
</sql>
<sql dbms="mariadb">
ALTER TABLE font ADD COLUMN search_vector TEXT GENERATED ALWAYS AS (ui_name) VIRTUAL;
</sql>
</changeSet>
db/changelog/
├── db.changelog-master.xml
└── changes/
├── 001-create-font-table.xml
└── 002-add-generated-column.xml
<!-- db/changelog/db.changelog-master.xml -->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.29.xsd">
<include file="changes/001-create-font-table.xml" relativeToChangelogFile="true"/>
<include file="changes/002-add-generated-column.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
One changeSet per functional change, with id and author set on every one — both are mandatory,
since Liquibase uses the (id, author, filename) triple to track which changesets have already run
against a given database.
dependencies {
implementation(mn.micronaut.liquibase)
}
# application.yml
liquibase:
datasources:
default:
change-log: classpath:db/changelog/db.changelog-master.xml
Micronaut runs pending changesets against the configured datasource at application startup, before the rest of the application context finishes initializing.
Add <rollback> elements (or rely on Liquibase's automatic rollback for change types simple enough to
auto-generate one, like createTable) rather than treating every migration as forward-only and
untested:
<changeSet id="002-add-generated-column" author="theEvilReaper">
<sql dbms="postgresql">ALTER TABLE font ADD COLUMN search_vector tsvector;</sql>
<rollback>
<sql dbms="postgresql">ALTER TABLE font DROP COLUMN search_vector;</sql>
</rollback>
</changeSet>
<preConditions> (e.g. columnExists/tableExists checks) are the other tool for making a changeset
safe to re-run or safe against a database that's already partway migrated by hand.
Whether a changelog genuinely works against both MariaDB and PostgreSQL is verified by actually running
it against both in tests, not by inspection — see the testcontainers skill for the container setup
that does this.
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/configurationOneLiteFeather's convention for typed application configuration in a Micronaut REST API — one @ConfigurationProperties class per functional area in a dedicated config/ package, instead of ad-hoc properties scattered across the application entry point. Use this whenever a Micronaut backend needs a new piece of externalized configuration (a feature flag, an external service URL, a limit/threshold) and you're deciding where the corresponding Java type should live./dependency-managementOneLiteFeather's Gradle/Micronaut dependency-management conventions for REST API backends — the Micronaut Application and AOT plugins, reading the Micronaut version from gradle.properties instead of hardcoding it, the mn.* platform catalog, the private OneLiteFeather Maven repo, and the optional CycloneDX SBOM plugin. Use this whenever setting up or editing a Micronaut backend's build.gradle.kts/settings.gradle.kts. For the general OneLiteFeather Gradle/BOM mechanics that apply beyond Micronaut (private repo credential split, Java toolchain pattern), see minestom-knowledge:gradle/boms instead. For observability, database-migration, Testcontainers, and security dependencies specifically, see the observability, liquibase, testcontainers, and security skills — this skill only lists that those dependencies exist and where to look, not their coordinates; the one exception is structured-logging dependencies (Logstash encoder, OpenTelemetry MDC appender), whose coordinates live directly in this skill since `logging` covers only their usage./dtoOneLiteFeather's request-DTO conventions for Micronaut REST APIs — records with @Serdeable/@Introspected, one shared Create/Update DTO controlled by JSR-380 validation groups instead of separate DTO types per action, and entity conversion methods living on the DTO itself. Use this whenever adding a new request body type to a Micronaut controller. For the response side (success/error modeling), see the response-modeling skill; for endpoint-level OpenAPI documentation, see openapi — this skill covers only the incoming request DTO and its own field-level @Schema annotations./entity-designOneLiteFeather's JPA/Micronaut Data entity conventions for Micronaut REST APIs — entities as a pure persistence layer with no Bean Validation annotations, the internal-UUID-vs-external-identifier pattern, custom AttributeConverters for complex column types, and why entities are plain Java beans rather than records or Lombok classes. Use this whenever adding or reviewing a database/entity/ class in a Micronaut backend. For where entity validation actually lives, see the dto skill; for the optional pattern of publishing entities from a separate Maven module instead of keeping them in the backend, see references/separate-model-module.md in this skill./exception-handlingOneLiteFeather's global exception-handling convention for Micronaut REST APIs — exactly one org-wide ExceptionHandlerAdvice that maps exception types to the correct HTTP status code and returns the shared ErrorResponse type from response-modeling, plus dedicated domain exception classes instead of generic RuntimeExceptions. Use this whenever adding a new failure case a Micronaut backend needs to report, or reviewing an existing global exception handler that maps everything to one status code. This is an explicit correction of a mapping-everything-to-404 pattern seen in an early reference implementation — status-code mapping by exception type is mandatory./loggingOneLiteFeather's logging conventions for Micronaut REST APIs — one SLF4J logger per class with no exceptions, structured JSON logging with OpenTelemetry trace/span correlation, log-level guidelines, and what must never be logged (PII, secrets, full request bodies). Use this whenever adding a new class that should log something, or reviewing an existing controller/service for inconsistent logging. For the Gradle dependencies and the metrics/tracing infrastructure this logging setup correlates with, see dependency-management and observability.npx claudepluginhub onelitefeathernet/onelitefeather-claude-marketplace --plugin micronaut-standardsOther plugins' skills for the same job