Go linting
AI plugin for coding standards for Go
npx -y skills add Cadasto/go-coding-plugin --skill go-lintingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
golangci-lint v2 setup and adoption for Go. This skill should be used when the user configures, upgrades, or debugs Go linting — the `.golangci.yml` file, the golangci-lint v2 schema (the versioned config, the `linters.default` set, the separate formatters section), the `modernize` linter, or stack linters (errorlint, bodyclose, rowserrcheck, sqlclosecheck, noctx, contextcheck). Not for what individual idioms mean (use the `go-idioms` skill) or writing rules by hand.
SKILL.md
3.4 KB, as published. Nobody here has run it
go-linting — golangci-lint v2
Bundled
references/is at the plugin root (besideskills/, two levels above this file) — not under this skill. Readreferences/golangci.v2.ymlas${CLAUDE_PLUGIN_ROOT}/references/golangci.v2.ymlon Claude Code, or../../references/golangci.v2.ymlfrom this skill's directory, or Glob for the installedreferences/golangci.v2.yml(host-agnostic).
golangci-lint v2 (Mar 2025) is the de-facto meta-linter and the deterministic core of this plugin. Its schema changed from v1 — v1 config will not parse:
- Top-level
version: "2"is required. linters.default: standard | all | none | fastselects the base set (no moreenable-all).standard= errcheck, govet, ineffassign, staticcheck, unused.- Formatters moved to their own
formatters:section (gofmt/gofumpt/goimports are no longer "linters").
Reference config (v2)
version: "2"
linters:
default: standard
enable:
- modernize # highest value: range-int, min/max, slices/maps, wg.Go, strings.Cut…
- errorlint # %w + errors.Is/As discipline
- bodyclose # unclosed http.Response.Body
- rowserrcheck # unchecked sql.Rows.Err
- sqlclosecheck # unclosed sql.Rows/Stmt
- noctx # HTTP/SQL without context
- contextcheck # context not propagated
- containedctx # context.Context stored in a struct
- perfsprint # fmt.Sprintf where a cheaper call exists
- revive # configurable golint successor
formatters:
enable: [gofumpt, goimports]
Adoption
- Run:
golangci-lint run; auto-fix what's fixable (incl.modernizeand formatters):golangci-lint run --fix. - Pin the version in CI for reproducibility (the Cadasto Go repos pin
v2.11.4); a version drift silently changes the rule set. modernizeis the single highest-leverage linter — it operationalizes mostgo-idiomsrules on the same engine as gopls/go fix, so the plugin's advice stays consistent with the toolchain. As of Go 1.26 the rewrittengo fix ./...runs that same modernizer suite from the toolchain itself; keepmodernizein golangci-lint for CI reproducibility and to cover toolchains older than 1.26. Use golangci-lint built with a Go version ≥ the module's toolchain (Go 1.26 support landed in the golangci-lint releases built with 1.26).- Adopt the shipped reference config
references/golangci.v2.yml, or run/go-lint-setupto scaffold it into a repo (it won't overwrite an existing config without asking).
Sources
- golangci-lint docs — https://golangci-lint.run/docs/
- v2 migration — https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/
modernize— https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize
Decomposition inspired by samber/cc-skills-golang (MIT © 2026 Samuel Berthe); rules grounded in the sources above.