quarkus-persistence
Skill0 starsChanged 13 days agoMITView on GitHub
Work with data in Quarkus: JPA entities, PanacheRepository, safe Flyway migrations, PostgreSQL conventions, audit columns, soft delete, and transaction boundaries.
In this repository68 other files it gives its agents.
- skills/web-development/adapters/copilot-instructions.mdCopilot instructions
- accessibility-auditSkill
- agent-handoffSkill
- ai-tool-securitySkill
- api-designSkill
- audit-loggingSkill
- background-jobsSkill
- bulk-reporting-exportSkill
- changelog-generatorSkill
- ci-cdSkill
- codebase-onboardingSkill
- code-reviewSkill
- code-simplificationSkill
- context-engineeringSkill
- context-privacySkill
- data-import-exportSkill
- debuggingSkill
- dependency-auditSkill
- deprecation-and-migrationSkill
- design-tokensSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environmental-telemetrySkill
- erp-accountingSkill
- erp-domain-designSkill
- erp-inventorySkill
- erp-procurementSkill
- erp-salesSkill
- feature-flagsSkill
- forms-and-validationSkill
- frontend-stateSkill
- frontend-ui-engineeringSkill
- git-workflowSkill
- identity-access-managementSkill
- incremental-implementationSkill
- java-code-standardsSkill
- java-deliverySkill
- kerangkaSkill
- mcp-builderSkill
- membership-managementSkill
- observabilitySkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- product-analyticsSkill
- quarkus-observabilitySkill
- quarkus-securitySkill
- quarkus-serviceSkill
- quarkus-testingSkill
- responsive-layoutSkill
- rest-api-contractSkill
- saas-billingSkill
- saas-multitenancySkill
- saas-onboardingSkill
- security-hardeningSkill
- shipping-and-launchSkill
- skill-creatorSkill
- skill-evaluationSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
Before writing one against real data, read references/migrations.md.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Quarkus Persistence
Overview
Full rules: .agents/standards/java/database.md. This is the workflow and the patterns.
When to use
- Creating or changing an entity or table
- Writing a Flyway migration
- Writing or optimising a query
- A slow endpoint suspected of being a data problem
- Deciding where
@Transactionalgoes
Process
- Migration first. The schema is the source of truth and the entity follows it, never the other way round. Forward-only; no edit to a migration that has run anywhere.
- The entity mirrors the table. It does not create it.
@Enumerated(EnumType.STRING)always —ORDINALstores the enum's position in the source, so inserting one value in the middle silently changes the meaning of every existing row. PanacheRepository, not active record. A repository can be mocked, which is what lets a service be tested in milliseconds without a database.- Audit columns come from a
@MappedSuperclass, set by@PrePersist/@PreUpdate, not by each caller remembering. - Own the transaction at the service boundary.
@Transactionalbelongs on the service method that represents one unit of work — not on a repository, not on a resource. - Treat N+1 as a bug, not as slowness. It passes every test with ten rows and fails in production with ten thousand. Fetch what the caller will read.
- Let the database do set work. Sums, counts, group-bys and paging belong in SQL, not in a loop over an entity list.
A migration that is safe on an empty database can still lock a populated one for minutes.
Before writing one against real data, read references/migrations.md.
Verification
- Migration exists before the entity change
- New columns are nullable or backfilled
@Transactionalis on the service, not the resource- Collection queries cannot N+1
- Report aggregations run in SQL, not in Java
Red flags
| Pitfall | Consequence |
generation=update | Hibernate alters the production schema. Always none. |
EnumType.ORDINAL | Inserting an enum value changes the meaning of old data |
float/double for money | Rounding errors in financial reports |
TIMESTAMP without a zone | Ambiguous when the server's zone changes |
| Entity returned as JSON | Internal columns leak, LazyInitializationException |
| Editing a merged migration | Checksum failure, startup dies in staging |
| A transaction wrapping an HTTP call | Connection pool exhausted under load |
| No index on a filter column | Sequential scan; fine in a demo, fatal in production |
References
references/entities-and-repositories.md- the worked migration/entity/repository/audit examplereferences/migrations.md- changes that are safe against a populated tablereferences/transactions-and-queries.md- transaction boundaries, N+1, report queries
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

