agentleFS
ItalyPaleAleItalyPaleAle/skills/go-service-scaffolder/SKILL.md

go-service-scaffolder

Skill1 starsChanged 9 months agoMITView on GitHub

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).

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

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

    line 8
  2. Distinctive:

    Ask for required inputs:

    line 12
  3. Distinctive:

    If the user asks for database support, ask which database to scaffold: Postgres, SQLite, or both.

    line 16
  4. Distinctive:

    Never use an ORM.

    line 32
  5. Distinctive:

    Run git init only if the target directory is not already a git repository.

    line 44
  6. Very specific:

    Use references/go-service-scaffold-spec.md as the single source of truth for:

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  1. Derive:
  • CONFIG_ENV_VAR: uppercase app name without hyphens + _CONFIG
  • METRICS_PREFIX: lowercase app name without hyphens
  1. Generate the full project file tree and file contents using the canonical spec in references/go-service-scaffold-spec.md.
  2. 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.
  1. Run:
  • go mod init <module-path> (only if go.mod does not already exist)
  • go mod tidy
  • go get -tool github.com/italypaleale/go-kit/tools/gen-config (adds the tool directive used by make gen-config)
  • make gen-config to produce config.md and config.sample.yaml from the Config struct
  • go test ./...
  1. Initialize git only when needed:
  • Run git init only if the target directory is not already a git repository.

Whenever pkg/config.Config (or any struct reachable from it) is regenerated or edited later, re-run make gen-config so config.md and config.sample.yaml stay in sync. CI enforces this with make check-config-diff.

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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.