SuperAPI AI Directory

pflow-golang-setup

Coding & development

View repository

Updated 10-16 08:04

About this skill

If setup-context.sh fails (non-zero exit or "status":"error" in its JSON) print ⚠️ <error.message> and stop. Other failing commands are findings — report and continue.

Steps

  1. Run .agents/skills/pflow-golang-setup/scripts/setup-context.sh → {go_version, toolchain, golangci_config, golangci_config_version, task_runner, github_workflows[], remote_host, dirs[], main_packages, files_present[], go_tools, dependabot, renovate, missing[]}.

  2. Tell the user what exists and what missing lists. Ask which gaps to fill; never overwrite an existing file — propose a diff instead.

  3. Read the reference for each chosen item and generate the files:

    Item Read
    New project, directory structure, multiple binaries, monorepo layout.md
    go.mod, go line, tool directives, versions, vendoring go-mod.md
    .golangci.yml (v2), formatters, nolint policy golangci.md
    Taskfile / Makefile: build, test, lint, race, coverage, gate task-runner.md
    CI workflow, caching, release, Dependabot/Renovate (when remote_host is github) ci-github-actions.md
  1. Match the project's existing choices: same task runner, same Go version as go_version, same generator tools from go_tools. Every generated gate must run locally with one command (task check / make check) and identically in CI.
  2. Finish by running the new gate once and reporting the result, or listing the exact command the user should run if it needs tools not installed.

Paths are relative to .agents/skills/pflow-golang-setup/.

Gotchas

  • golangci_config_version empty or 1 with a modern golangci-lint means a v1 config: propose golangci-lint migrate, don't rewrite by hand.
  • Templates here are starting points; drop anything the project has no use for (a library needs no Dockerfile, a CLI needs no api/).