Skip to content
aurora-schema logo

✅ CORRECT

aurora-schema

Aurora YAML schema analysis and editing. Validates field names, descriptions, types, and module semantics following DDD best practices. Trigger: When analyzing or editing *.aurora.yaml files, improving field naming, adding descriptions, or validating schema semantics.

SKILL.md

Full skill instructions

When to Use

Use this skill when:

  • Analyzing *.aurora.yaml files for quality and consistency
  • Editing YAML schemas (creating, updating, or deleting fields)
  • Validating field naming conventions and descriptions
  • Ensuring module descriptions explain purpose and context
  • Reviewing data type appropriateness

Always combine with:

  • aurora-cli skill when regenerating after YAML changes
  • aurora-project-structure skill for locating YAML files
  • conventional-commits skill when committing schema changes

Detailed References


Critical Patterns

Module Description (REQUIRED)

Every *.aurora.yaml must have a description property before aggregateProperties:.

# ✅ CORRECT
version: 0.0.1
boundedContextName: iam
moduleName: permission
description: >
  Module containing the permissions associated with each bounded context, to be
  used to manage access to each API.
aggregateProperties:
  - name: id

Description should explain: What the module contains, what it's used for, how it relates to other modules.


Mandatory Fields (REQUIRED in all modules)

All modules MUST include these fields:

  1. rowId (after id) — bigint, autoIncrement, unique
  2. createdAt (end) — timestamp, nullable
  3. updatedAt (end) — timestamp, nullable
  4. deletedAt (end) — timestamp, nullable

Field order: id → rowId → ... module fields ... → createdAt → updatedAt → deletedAt


Field Naming Conventions

PatternUse ForExamples
camelCaseAll field namesfirstName, orderDate, totalAmount
is*, has*, can*Boolean flagsisActive, hasChildren, canEdit
*AtTimestampscreatedAt, updatedAt, publishedAt
*DateDate-only fieldsbirthDate, startDate, endDate
*IdForeign keysauthorId, categoryId, parentId
sortDisplay/​UI orderingsort (NOT displayOrder, order)

Field Descriptions (MANDATORY)

Every field MUST have a description that explains WHY, not WHAT:

# ❌ BAD
- name: price
  type: decimal
  description: The price of the book

# ✅ GOOD
- name: price
  type: decimal
  decimals: [10, 2]
  description: >
    Retail price in the store's base currency. Does not include taxes or
    discounts. Used as base for price calculations.

ID Fields (CRITICAL RULE)

Fields of type id MUST NOT have a length property.

# ✅ CORRECT
- name: id
  type: id
  primaryKey: true

# ❌ INCORRECT
- name: id
  type: id
  length: 36  # ← DELETE THIS

Relationship Fields (CRITICAL RULE)

SideHas FK?Use
Child/​Many (invoice-line)YEStype: id + relationship block inside
Parent/​One (invoice)NOtype: relationship (navigation only)
Many-to-manyNOtype: relationship + pivot config

⚠️ NEVER define both invoiceId (type: id) AND invoice (type: relationship) in the SAME module.

# ✅ child.aurora.yaml - ONLY the FK field
- name: parentId
  type: id
  relationship:
    type: many-to-one
    field: parent
    aggregateName: MyParent
    modulePath: my-context/​parent

# ✅ parent.aurora.yaml - ONLY the navigation property
- name: children
  type: relationship
  relationship:
    type: one-to-many
    aggregateName: MyChild
    modulePath: my-context/​child
    key: parentId

Cross-Module Consistency

Use the same field names across ALL modules:

- name: id        # Not: ID, _id, uuid
- name: createdAt # Not: created, createdDate
- name: updatedAt # Not: updated, modifiedAt
- name: deletedAt # Not: deleted, removedAt
- name: isActive  # Not: active, enabled

Index Names (63-char limit) — MANDATORY VALIDATION

PostgreSQL limits index names to 63 characters. Aurora generates: {boundedContext}_{module}_{fieldName} (snake_case).

Every time you add index: index or index: unique, calculate the generated index name length.

index_name = snake_case(boundedContextName) + "_" + snake_case(moduleName) + "_" + snake_case(fieldName)

If length > 63 → MUST add indexName property with abbreviated name.

- name: administrativeAreaLevel1Id
  type: id
  index: index
  indexName: bpp_partner_addr_admin_area_lvl1_id  # < 63 chars

Abbreviation pattern: {BC_abbrev}_{short_module}_{short_field}

Bounded ContextAbbrev
production-planningpp
business-partner-portalbpp
commoncmn

Decision Trees

What Type Should This Field Be?

Is it a UUID identifier? ────YES───> type: id (NO length!)
      │
      NO
      │
Is it true/​false? ────YES───> type: boolean (use is*/​has*/​can* prefix)
      │
      NO
      │
Is it money? ────YES───> type: decimal with decimals: [12, 2]
      │
      NO
      │
Fixed set of options? ────YES───> type: enum with enumOptions
      │
      NO
      │
Date and time? ────YES───> type: timestamp
      │
      NO
      │
Short text (< 255 chars)? ────YES───> type: varchar with maxLength
      │
      NO
      │
Long text? ────YES───> type: text

Should I Edit or Just Analyze?

User explicitly requested edit? ────YES───> Edit mode
      │
      NO → Analysis mode (generate report)

Anti-Patterns to Avoid

❌ Don't✅ Do
Skip module descriptionAlways add description before aggregateProperties
Skip mandatory fields (rowId, timestamps)Always include rowId, createdAt, updatedAt, deletedAt
Use abbreviations (dt, qty, amt)Use full words (createdAt, quantity, amount)
Name booleans without prefix (active)Use semantic prefix (isActive, hasPermission)
Add length to id type fieldsNever specify length for id type
Write "The price" as descriptionExplain context: "Retail price in base currency..."
Use float for moneyAlways use decimal with proper scale
Duplicate relationship definitionsFK side uses type: id, inverse uses type: relationship

Resources

  • Aurora Docs: Check aurora-cli skill for regeneration commands
  • Project Structure: Use aurora-project-structure skill to locate YAMLs

Related Skills

SkillWhen to Use Together
aurora-cliAfter editing YAML, regenerate with aurora load back module
aurora-project-structureTo locate YAML files in correct directories
conventional-commitsWhen committing schema changes
aurora-cqrsUnderstanding how YAML generates commands/​queries

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View