The skill and its recipes
The elasticore skill loads when Claude works in a project that applies the io.elasticore plugin,
when files start with an //ecd: line, or when you ask for an application built "with ElastiCORE".
Its rule: the DSL is the source of truth - change what the application is in YAML, regenerate,
and write by hand only what the DSL cannot express, in the files the generator hands over.
The fast path
What the skill tells the agent to do first:
- An existing project: check that
build.gradlehas anelasticore { }block witharchitecture = 'hexagonal'or'ddd'. - A new project:
references/new-project.md- the coordinates, how to find the newest 3.x release on Maven Central, a template its CI builds every week. Then copy the recipe that fits. - DSL syntax:
references/quick-reference.md, one page. The long guides only for what it does not have. - Change the YAML, run
./gradlew compileJava(./gradlew.baton Windows, from Git Bash too), fix every warning in the YAML. - Run and check:
references/run-and-check.md- a jar in the background, stopped by its process id. Never./gradlew bootRunfrom a tool's shell; never stop processes by name. - Do not write controllers, DTOs, repositories, security, sign-in or error handlers by hand.
Extra rules go in
<Entity>Service.beforeSave; an operation the CRUD does not have is a method there plus one small controller.
It also keeps the agent inside the project: no searching other repositories on the machine for templates, no git commands that discard work it did not create, and ElastiCORE only as a released version from Maven Central - never built from source for a project.
The recipes
Complete projects - DSL, the few hand-written files, and every request with its answer - that the kit's contract test generates, builds, starts and calls.
| Recipe | Domain | Use it when |
|---|---|---|
recipe-board.md | posts and comments | CRUD with validation, search and paging |
recipe-library.md | books, members, loans | a rule reads other rows (no copy left to lend - 409), the server sets values, or there is an operation besides CRUD (return a loan) |
recipe-shop.md | members, products, orders | users sign in and see only their own, an administrator does more, a record moves along (placed, shipped, cancelled), prices are kept and summed, the application starts with data |
The library and shop recipes need ElastiCORE 3.0.261021 or later - on Maven Central that is
3.0.261022-rc1 and later (the generated sign-in, the 409 of
a refused step, the 404 of a missing reference, @readonly, @search(isnull), @pattern,
ConflictException); the library recipe's last section says what to write by hand on 3.0.261020.
The shop recipe's model, in short:
Member:
meta: entity @root @editable @expose(20) @signin @owner(memberId) @access(read=owner, create=public, update=owner)
@Index(name="uk_member_login", columnList="login", unique=true) -- member
PurchaseOrder:
meta: entity @root @expose(20) @owner(memberId) @access(read=owner, create=user, cancel=owner)
@event(Shipped(total), Cancelled(total)) @sort(orderId-) -- order
fields:
orderedAt: datetime @readonly @default(now) -- ordered at, set by the server
shipTo: Address @Embedded -- delivery address
card: Card! @Embedded -- payment card
total: money(12.2) @compute(sum(lines.subTotal)) -- the lines added up
lines: List<OrderLine> @OneToMany(mappedBy="order") @dtype(List<OrderLineDTO>) @minsize(1, 'an order needs a line')
states:
status:
initial: PLACED
ship: PLACED -> SHIPPED
cancel: PLACED -> CANCELLED
delete: CANCELLED
plus three new Java files and one method added to PurchaseOrderService: start-up data in CurrentUser.runAsSystem, an @EventListener for the
shipped and cancelled events, and an administrator's report behind
ACCESS.require(currentUser, "report") with one small controller.