create-elysia-handlerlisted
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.