← ClaudeAtlas

create-go-handlerlisted

Generate the HTTP handler (inbound adapter) for ONE entity in an existing Go service — emits framework-agnostic huma handler funcs + `RegisterRoutes` wiring across nethttp/gin/chi/mux/echo, with cursor + offset pagination, request validation, and humares envelopes. Has Mode A (new schema → also generates upstream domain/port/repo/service automatically) and Mode B (existing service → just the handler file). **Use this skill whenever the user wants to expose an entity over HTTP in an existing project — phrasings like 'add REST endpoints for X', 'create the handler for Y', 'wire up HTTP routes for entity Z', 'expose Subscription over HTTP', 'add CRUD endpoints for the new Customer entity', 'add inbound HTTP handling for X'.** Do NOT use to scaffold a fresh project (use `create-go-app`), data-layer only (use `create-go-repository`), or service-layer only (use `create-go-service`).
labspangaea/pangaealabs-claude-plugins-marketplace · ★ 0 · Data & Documents · score 65
Install: claude install-skill labspangaea/pangaealabs-claude-plugins-marketplace
# Skill: create-go-handler Generate the HTTP handler (inbound adapter) for one entity in a Go service, wired to its service layer. Use this skill whenever someone wants to add REST endpoints, an HTTP handler file, or route registration to an existing Go project. Trigger even if the user says "add endpoints for X", "create the handler for Y", or "wire up HTTP routes for entity Z". ## Parameters | Parameter | Required | Default | Values | |-----------|----------|---------|--------| | `http_framework` | no | `gin` | `nethttp` · `gin` · `chi` · `mux` · `echo` | ## Prerequisites | Item | Action if missing | |------|-------------------| | `go.mod` in working directory | Tell user this skill works inside an existing Go project | | `internal/service/{entity}.go` | Mode A generates it inline; Mode B requires it to exist | --- ## Step 1 — Choose mode Ask via `AskUserQuestion` so the user sees a structured choice: ``` AskUserQuestion({ question: "How should we source the entity for this handler?", header: "Mode", options: [ { label: "New schema (Recommended)", description: "No service exists yet — generate the full stack (repo → service → handler)" }, { label: "Existing service", description: "Service layer already exists in internal/service/ — just generate the handler file" } ] }) ``` **Mode A — New schema**: User provides schema and framework. Claude generates repository layer, then service, then handler — all in sequence. **Mode B — Existing serv