← ClaudeAtlas

create-elysia-handlerlisted

Generate the HTTP controller (inbound adapter) for ONE entity in an existing Elysia/Bun project — a thin idiomatic Elysia instance with TypeBox DTOs, cursor pagination, request validation, and the humares-style response envelopes, wired to the entity's service. Has Mode A (new schema → also generates the upstream domain/port/repo/service) and Mode B (existing service → just the controller + DTO). **Use this whenever the user wants to expose an entity over HTTP in an existing project — phrasings like 'add REST endpoints for X', 'create the handler/controller for Y', 'wire up HTTP routes for entity Z', 'expose Subscription over HTTP', 'add CRUD endpoints for the Customer entity'.** Do NOT use to scaffold a fresh project (use `create-elysia-app`), data-layer only (use `create-elysia-repository`), or service-layer only (use `create-elysia-service`).
labspangaea/pangaealabs-claude-plugins-marketplace · ★ 0 · Data & Documents · score 65
Install: claude install-skill labspangaea/pangaealabs-claude-plugins-marketplace
# Skill: create-elysia-handler Generate the Elysia controller + TypeBox DTO for one entity, wired to its service. ## Prerequisites | Item | Action if missing | |------|-------------------| | `package.json` in cwd | Tell the user this works inside an existing Bun project | | `src/service/{entityLower}.ts` | Mode A generates it; Mode B requires it | ## Step 1 — Choose mode ``` AskUserQuestion({ question: "How should we source the entity for this controller?", header: "Mode", options: [ { label: "New schema (Recommended)", description: "No service exists yet — generate the full stack (repo → service → controller)" }, { label: "Existing service", description: "Service already exists in src/service/ — just generate the controller + DTO" } ] }) ``` **Mode A — New schema**: run, in order, `/create-elysia-repository` (Mode A) then `/create-elysia-service` (Mode B), `tsc` clean, then generate the controller. **Mode B — Existing service**: `find src/service -maxdepth 1 -name '*.ts' -not -name '*.test.ts'`, surface the pick. Derive `Entity` from the filename. Verify `src/service/{entityLower}.ts` exists; if missing, tell the user to run `/create-elysia-service` first and stop. Read `src/domain/{entityLower}.ts` to reconstruct `Fields` (for the DTO). ## Step 2 — Render Templates at `${CLAUDE_SKILL_DIR}/../create-elysia-app/references/`: | Template | Output | |---|---| | `dto.ts.tmpl` | `src/adapter/inbound/http/{entityLower}.dto.ts` | | `controller.ts.