new-module-scaffoldlisted
Install: claude install-skill prilive-com/go-tdd-pack
# New Module Scaffold
Create a new logical unit (service, package, module, subsystem) in this
repo without guessing at structure or leaving missing pieces.
## Step 1: Before writing anything, ask
- What kind of unit is this?
- Standalone binary (CLI tool, worker, HTTP server)
- Library / internal package (not separately deployed)
- Shared module (used by multiple binaries)
- Where do other units like this live in the repo?
- What's the naming convention — find 2–3 existing examples and match
them.
Do not propose a layout before reading existing code. Every repo has
conventions; guessing violates them.
## Step 2: Match existing conventions
Read 2–3 existing modules of the same kind. Specifically note:
- Directory structure (`cmd/<name>/`, `internal/<area>/<name>/`)
- File naming conventions
- Entry point conventions (`main.go`, package init)
- Test file locations and naming
- Configuration loading pattern
- Logging setup pattern (`log/slog`)
- Error handling pattern
## Step 3: Propose the layout
State explicitly:
- Directory path
- Each file to create and its one-line purpose
- Which existing files/packages will import this new module
- Which tests will be created alongside
Wait for user confirmation before creating files. Do not create and ask
forgiveness; scaffolding is irreversible in practice.
## Step 4: Create, but minimally
- One entry-point file with a skeletal implementation
- At least one smoke test (confirms it builds and loads)
- A doc comment a