This skill guides aggregate-boundary decisions, an LLD-style schema sketch, and mapping the design to Postgres. It also provides a handoff process and a reusable output template for migration planning and human review.
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Role: Skill — schema & aggregate design
Trigger: schema design, ERD/LLD entity diagrams, table modeling, aggregate→DB mapping, indexing for Orbit features.
generate-entity sketches Java types; generate-flyway writes migrations. This skill sits
before both: lock aggregate ownership, FK direction, and transaction boundaries so
migrations do not invent a second domain model.
Canonical visual: docs/architecture/entity-diagram.png (+ companion markdown).
Rules: .claude/rules/schema.md, .claude/rules/ddd.md.
Persona: dev-database-architect for migration safety sign-off.
Load context
docs/architecture/entity-diagram.md (and PNG if discussing visuals)..claude/rules/schema.md + ddd.md + package-by-layer.md.src/main/resources/db/migration/ and entity/.Name the aggregate root(s)
@Transactional boundary.Produce an LLD-style schema sketch (elevator-diagram shape)
Map to Postgres
order_lines)TIMESTAMPTZ for audit columnsusers.email)ddl-auto mutate — next step is generate-flywayHand off
generate-entity → generate-flywaySchema design: READY FOR HUMAN / NEEDS DISCUSSION## Schema design — {Feature}
### Aggregate root
…
### Tables (proposed)
| Table | Owns | Key columns | Notes |
|-------|------|-------------|-------|
### Relationships
…
### Invariants
…
### Indexes (query-backed)
…
### Migration plan
- Next Flyway: V{NNN}__…
- Expand/contract notes
### Deferred
…
Schema design: READY FOR HUMAN / NEEDS DISCUSSIONbdfe0ae
ReadIf you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.