<< All versions

Skill v1.0.1

currentAutomated scan100/100
techmefr/mentis/go-conventions

+11 new

──Details
PublishedNovember 7, 2026 at 01:32 PM
Content Hashsha256:7f4ce7d358674ed1...
Git SHAf2a8e60bba80
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 3.0 KB)
SKILL.md3.0 KBactive
SKILL.md · 49 lines · 3.0 KB

name: go-conventions description: "Use when writing or reviewing Go: concurrency, errors, context, defensive correctness, database access, tests, layout and idioms, standard-library security." metadata: version: "1.0.1"


go-conventions

Step 6 of the pipeline (WORKFLOW.md). Frames the writing and review of Go code. Special status: unlike the frontend blocks (vue-nuxt-vuetify, react-nextjs), there is no in-house production experience behind this file yet: the content comes from deterministic tooling (golangci-lint, staticcheck, govet) and published style and practice guides, not from real review feedback. To be treated as a solid base to be confronted with the first real Go project, not as proven doctrine.

When

As soon as Go code is written or modified, during code (6) or tdd (5).

Steps

Read only the sections the task touches. One file per section under references/; a section read is a section that has to be applied.

§CoversRead it whenFile
1Concurrency and goroutinesa goroutine, channel, lock or wait group is written`01-concurrency.md`
2Error handlinga function can fail, an error is wrapped, logged or shown`02-errors.md`
3Contexta context is created, passed, stored or cancelled`03-context.md`
4Other correctnessa response body, a defer, an err shadow, a slice at an API edge, an exit call`04-correctness.md`
5Defensive correctnessan interface return, a map, an append, a numeric conversion or comparison, a zero value`05-safety.md`
6database/sqla query, a transaction, a pool or a migration appears`06-database.md`
7Testsa test is written or reviewed`07-tests.md`
8Layout and idiomsa package, an interface, a module path or a version-dependent idiom`08-layout-and-idioms.md`
9Security with the standard libraryuntrusted input reaches SQL, a process, a template, a path, a random value or a server`09-security-stdlib.md`

Output / checkpoint

Code compliant with the sections read, and golangci-lint run (default config: errcheck, govet, staticcheck, gosimple, ineffassign, unused, plus contextcheck/bodyclose/noctx if enabled) with no new finding introduced by the diff. Checked by gate (7) and review (8).

Guardrails

No comments in the code produced. Don't enable shadow (govet) by default: noisy, only if the project explicitly wants it. The agent does not design a database schema (§6.8). This block hasn't been confronted with a real production Go project in house yet: if a rule here diverges from a real observed need, fix this block rather than treating it as settled.

Origin

Provenance, source versions and the dogfood record in `references/origin.md`.

← v1.0.0All versions