create-elysia-servicelisted
Install: claude install-skill labspangaea/pangaealabs-claude-plugins-marketplace
# Skill: create-elysia-service
Generate `service` + `stub` + `service-port` + `factory` for one entity.
## Prerequisites
| Item | Action if missing |
|------|-------------------|
| `package.json` in cwd | Tell the user this works inside an existing Bun project |
| `src/port/{entityLower}.ts` with `{Entity}Repository` | Mode A generates it; Mode B requires it |
## Step 1 — Choose mode
```
AskUserQuestion({
question: "How should we source the entity for this service?",
header: "Mode",
options: [
{ label: "New schema (Recommended)", description: "No repo exists yet — generate the full repository layer first via create-elysia-repository, then the service" },
{ label: "Existing repo", description: "Repository already exists in src/adapter/outbound/repository/ — just generate the service files" }
]
})
```
**Mode A — New schema**: run `/create-elysia-repository` Mode A in full first (domain + port + repository + schema + apperr), `ts_diagnose` + `tsc` clean, then continue.
**Mode B — Existing repo**: `find src/adapter/outbound/repository -name '*.ts' -not -name '*.test.ts'`, surface the pick (≤4 → `AskUserQuestion`; >4 → numbered prompt). Derive `Entity` from the filename. Verify `src/port/{entityLower}.ts` has `{Entity}Repository` — if missing, tell the user to run `/create-elysia-repository` first and stop.
## Step 2 — Collect inputs
Read `package.json` `name` for `Module`. Derive `Entity`/`EntityLower`. Mode A: parse the schema per `/create-e