create-go-servicelisted
Install: claude install-skill labspangaea/pangaealabs-claude-plugins-marketplace
# Skill: create-go-service
Generate the service (use-case) layer for one entity in a Go service, wired to its port interface. Use this skill whenever someone wants to add a service file to an existing Go project, implement business logic for an entity, or wire a service to an already-created repository. Trigger even if the user says "create the service for X" or "add business logic for Y entity".
## Prerequisites
| Item | Action if missing |
|------|-------------------|
| `go.mod` in working directory | Tell user this skill works inside an existing Go project |
| `internal/port/{{.EntityLower}}.go` with `{{.Entity}}Repository` interface | 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 service?",
header: "Mode",
options: [
{ label: "New schema (Recommended)", description: "No repo exists yet — generate the full repository layer first via /create-go-repository, then the service" },
{ label: "Existing repo", description: "Repository layer already exists in internal/adapter/outbound/repository/ — just generate the service file" }
]
})
```
**Mode A — New schema**: User provides the entity schema. Claude generates the full repository layer first (domain + port + repository + apperr), then generates the service.
**Mode B — Existing repo**: Run:
```bash
find internal/adap