go-guidelines
Skill3 starsChanged 8 days agoMITView on GitHub
Apply Go-specific policy to existing or approved Go modules, CLI tools, API services, tests, and reviews: module hygiene, standard toolchain checks, explicit errors and context, purpose-specific architecture, and delivery. Use as a language overlay; do not own language selection or lifecycle control.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- mhmtszr/go-guidelinestheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- mhmtszr/go-guidelines★ 105same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- analyze-projectSkill
- api-contract-strategySkill
- architecture-patternsSkill
- close-changeSkill
- design-changeSkill
- development-standardsSkill
- docker-multiarch-buildSkill
- error-patternsSkill
- herdr-implementSkill
- implement-changeSkill
- logging-standardsSkill
- lua-guidelinesSkill
- organize-docsSkill
- output-stylesSkill
- plan-changeSkill
- powershell-guidelinesSkill
- python-guidelinesSkill
- review-changeSkill
- review-designSkill
- review-implementationSkill
- review-planSkill
- routeros-scripting-guidelinesSkill
- runtime-diagnosisSkill
- security-guardrailsSkill
- shell-guidelinesSkill
- skill-authoringSkill
- skill-minerSkill
- skills-routingSkill
- smart-commitSkill
- sops-age-guardrailsSkill
- sync-truthSkill
- testing-strategySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use Go modules as the source of truth.
- Very specific: line 23
Keep go.mod and go.sum tracked and consistent.
- Very specific: line 25
Run go mod tidy when imports or tool dependencies change, then review the module diff.
- Distinctive: line 26
Use the standard toolchain first.
- Very specific: line 28
Run go test ./... to compile packages and execute tests.
- Very specific: line 29
Run go vet ./... for suspicious constructs that compilation accepts.
- Distinctive: line 30
Run project-owned analyzers such as Staticcheck or golangci-lint when configured.
- Distinctive: line 31
Keep developer tools project-owned when reproducibility matters.
- Distinctive: line 33
Use the repository's existing pre-1.24 mechanism when the module version requires it.
- Very specific: line 36
Add operation context with fmt.Errorf("operation: %w", err) when propagating an underlying error.
- Distinctive: line 44
Test behavior at the narrowest useful boundary.
- Very specific: line 45
Use the standard testing package by default, with table-driven tests when they improve coverage and readability.
- Very specific: line 46
Use httptest, fakes, temporary directories, and injected IO in place of global process state when practical.
- Distinctive: line 50
Use these when the project or risk profile calls for them:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Go Guidelines
Apply the shared baseline below, then load the reference that matches the archetype. An unfixed implementation-language decision uses references/language-selection.md in skills-routing; ad hoc command and tool choice uses references/tool-selection.md there; resilience and logging policy beyond Go-specific application belongs to error-patterns and logging-standards.
Progressive Disclosure
- CLI tools and operator commands:
references/cli-tool-patterns.md - API and network services:
references/api-service-patterns.md - Producing, running, testing or delivering a Go artifact (build output, scratch, coverage or fuzz files, target-host delivery):
references/build-and-delivery.md - Porting existing code or tests from another language:
references/migration.md - Implementation review:
references/review-checklist.md
Apply api-service-patterns to API or network services and cli-tool-patterns to CLIs; a library gets only the shared baseline. Load both profiles when one approved project owns both a CLI control surface and an API server.
Shared Baseline
- Use Go modules as the source of truth.
- Keep
go.modandgo.sumtracked and consistent. - Declare the minimum supported Go version in
go.mod. - Run
go mod tidywhen imports or tool dependencies change, then review the module diff.
- Keep
- Use the standard toolchain first.
- Format changed Go files with
gofmtand the repository's configured formatting step. - Run
go test ./...to compile packages and execute tests. - Run
go vet ./...for suspicious constructs that compilation accepts. - Run project-owned analyzers such as Staticcheck or golangci-lint when configured.
- Format changed Go files with
- Keep developer tools project-owned when reproducibility matters.
- On Go 1.24 or newer, use a
go.modtool directive for versioned Go developer tools. - Use the repository's existing pre-1.24 mechanism when the module version requires it.
- On Go 1.24 or newer, use a
- Handle errors explicitly.
- Handle every returned error; discard one only when the API documents the result as irrelevant, and record that reason.
- Add operation context with
fmt.Errorf("operation: %w", err)when propagating an underlying error. - Define sentinel or custom error types when callers need stable programmatic classification through
errors.Isorerrors.As. - Log an error once, at the boundary that owns presentation or recovery.
- Propagate cancellation and deadlines.
- Accept
context.Contextas the first parameter for request-scoped, blocking, network, subprocess, or other IO-heavy work. - Pass the request context as an argument on each call.
- Accept
- Keep abstractions demand-driven.
- Introduce an interface or layer when a second implementation, a fake, or an isolation need exists, and define it at the consuming boundary.
- Test behavior at the narrowest useful boundary.
- Use the standard
testingpackage by default, with table-driven tests when they improve coverage and readability. - Use
httptest, fakes, temporary directories, and injected IO in place of global process state when practical.
- Use the standard
Optional Checks
Use these when the project or risk profile calls for them:
go test -race ./...for concurrent or shared-state code- Staticcheck for low-noise semantic analysis
govulncheck ./...for applications with third-party dependencies or release artifacts
Pin reproducible Go tools through the owning module.
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
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.

