# Go Service Scaffolder

> Scaffold a production-ready Go HTTP service with OpenTelemetry observability, TLS, lifecycle management, Dockerfile, GitHub Actions CI/CD, and golangci-lint. Use when creating or regenerating a full Go service skeleton (project layout, config package, server package, CI workflows, and container build files). Use when this capability is needed.

- Skill: `tomevault-io/go-service-scaffolder` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/go-service-scaffolder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/go-service-scaffolder/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/go-service-scaffolder

---


# Go Service Scaffolder

Create a production-ready Go HTTP service skeleton and keep outputs consistent.

## Workflow

1. Ask for required inputs:
- App name (kebab-case)
- Go module path
- GitHub owner/org
- If the user asks for database support, ask which database to scaffold: Postgres, SQLite, or both.

2. Derive:
- `CONFIG_ENV_VAR`: uppercase app name without hyphens + `_CONFIG`
- `METRICS_PREFIX`: lowercase app name without hyphens

3. Generate the full project file tree and file contents using the canonical spec in `references/go-service-scaffold-spec.md`.

4. Replace placeholders everywhere:
- `{{APP_NAME}}`
- `{{MODULE_PATH}}`
- `{{GITHUB_OWNER}}`
- `{{CONFIG_ENV_VAR}}`
- `{{METRICS_PREFIX}}`

Database constraints when database support is requested:
- Never use an ORM.
- For Postgres, use PGX: `github.com/jackc/pgx/v5`.
- For SQLite, use `modernc.org/sqlite`.

5. Run:
- `go mod init <module-path>` (only if `go.mod` does not already exist)
- `go mod tidy`
- `go test ./...`

6. Initialize git only when needed:
- Run `git init` only if the target directory is not already a git repository.

## Reference

Use `references/go-service-scaffold-spec.md` as the single source of truth for:
- Required directory structure
- Exact file templates
- Post-scaffold steps and architecture notes

Load only the sections needed for the current task instead of reading the entire reference at once.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/italypaleale) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

