← ClaudeAtlas

create-elysia-servicelisted

Generate the service (use-case) layer for ONE entity in an Elysia/Bun project wired to @labspangaea/ts-lib — the real service, the canned stub, the service-port interface, and the build-time stub factory. **Use this whenever someone wants to add a service file to an existing Bun project, implement business logic for an entity, or wire a service to an already-created repository** — phrasings like "create the service for X", "add business logic for Y", "wire up the use-case layer". Do NOT use to scaffold a fresh project (use `/elysia-scaffolder:create-elysia-app`), to generate the data layer only (use `create-elysia-repository`), or to expose endpoints (use `create-elysia-handler`).
labspangaea/pangaealabs-claude-plugins-marketplace · ★ 0 · Data & Documents · score 65
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