use-modern-go
Skill1 starsChanged 2 months agoMITView on GitHub
Use this skill for any task that writes, modifies, reviews, fixes, or refactors Go source, tests, module files, or tooling. Invoke it when the user requests a Go feature, bug fix, migration, performance change, code review, test change, dependency update, or cleanup, even if they do not mention Go style. Do not invoke it only to read, explain, or answer questions about existing Go code.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- ardanlabs/kronktheir own version, first seen Nov 9, 2026
- compozy/compozytheir own version, first seen Nov 7, 2026
- whz1106/whz-harnesstheir own version, first seen Nov 1, 2026
- ardanlabs/servicetheir own version, first seen Oct 8, 2026
- stackrox/stackroxtheir own version, first seen Oct 8, 2026
- JetBrains/go-modern-guidelinestheir own version, first seen Aug 30, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- ardanlabs/service★ 4.1ksame name
- JetBrains/go-modern-guidelines★ 3.6ksame name
- compozy/compozy★ 2.9ksame name
- stackrox/stackrox★ 1.3ksame name
- ardanlabs/kronk★ 865same name
- whz1106/whz-harness★ 2same name
- xingkaixin/skills★ 0same 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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- autoreview/AGENTS.mdAGENTS.md
- autoreviewSkill
- codex-delegationSkill
- goagoSkill
- model-selectionSkill
- plansSkill
- starportSkill
- technical-writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 0 are common, 21 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 15
Write Go in one project-selected form.
- Distinctive: line 20
Read the nearest AGENTS.md and repository instructions.
- Distinctive: line 23
Read the affected source, tests, callers, interfaces, and recent changes.
- Distinctive: line 26
Do not use a feature only because the local toolchain accepts it.
- Very specific: line 34
Run the bundled modern-guidelines wrapper before you review or edit Go code.
- Distinctive: line 51
Use the host's approval flow when the install needs network or write access.
- Distinctive: line 53
If no target file exists, pass the known version:
- Distinctive: line 59
Read the complete output. Do not filter or truncate it.
- Very specific: line 68
If files use different module versions, run list once for each version.
- Very specific: line 74
Before a Go code change or review, inspect go.mod for this module tool:
- Very specific: line 80
Use go tool goago when the module declares the tool.
- Very specific: line 87
Do not install goago or add a policy unless the user requests adoption.
- Distinctive: line 90
When the repository owns a goago command, discover the resolved policy before you choose a Go form:
- Very specific: line 97
Use each rules[].enabled value as the active restriction set.
- Very specific: line 106
If the module still pins github.com/agentstation/ago/cmd/ago, use go tool ago until the user requests migration.
- Distinctive: line 113
Use the newest applicable form that the target version and policy accept.
- Distinctive: line 114
Keep new code consistent with the selected project policy.
- Distinctive: line 115
Prefer the simplest form that keeps control flow, ownership, and data visible.
- Distinctive: line 118
Keep the smallest coherent change.
- Distinctive: line 119
Prefer the standard library when it provides the required contract.
- Distinctive: line 120
Keep ownership with the package or type that owns the domain concept.
- Distinctive: line 121
Do not edit generated, vendored, or third-party code directly.
- Distinctive: line 122
Add a regression test when an automated test can reproduce a defect.
- Very specific: line 130
Run gofmt on each changed handwritten Go file.
- Distinctive: line 131
Run the affected package tests.
- Distinctive: line 132
Run the repository's complete Go check when the task scope permits it.
- Distinctive: line 133
Run race or platform checks when the changed behavior depends on them.
- Distinctive: line 134
Run goago when the repository owns an available command.
- Distinctive: line 136
Use the same goago command form that supplied the policy:
- Very specific: line 144
Read the JSON errors field before you change source after status 2.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modern Go
Write Go in one project-selected form. Use modern Go only inside the repository's compatibility, behavior, and policy boundaries.
Establish the contract
- Read the nearest
AGENTS.mdand repository instructions. - Locate the applicable
go.workandgo.modfiles. - Record the target Go version for each affected module.
- Read the affected source, tests, callers, interfaces, and recent changes.
- State the current behavior and the behavior that the task requires.
Do not use a feature only because the local toolchain accepts it. The affected module's declared Go version is the default compatibility boundary.
For a review or diagnosis, inspect and report. Do not edit unless the request includes a change.
Read modern Go guidance
Run the bundled modern-guidelines wrapper before you
review or edit Go code. Resolve <skill-directory> to this installed skill's
directory.
On Linux or macOS, run:
sh "<skill-directory>/scripts/run-tool.sh" list --file-path path/to/file.goOn Windows PowerShell, run:
& '<skill-directory>\scripts\run-tool.ps1' list --file-path path\to\file.goThe first run installs the pinned Modern Go Guidelines CLI in a user cache. Use the host's approval flow when the install needs network or write access.
If no target file exists, pass the known version:
sh "<skill-directory>/scripts/run-tool.sh" list --go-version 1.24Read the complete output. Do not filter or truncate it. Older entries can still apply to the target version.
Request details only for a relevant guideline:
sh "<skill-directory>/scripts/run-tool.sh" explain guideline-idIf files use different module versions, run list once for each version. If
the command is unavailable, use repository evidence and report the skipped
guidance check.
Resolve the goago policy
Before a Go code change or review, inspect go.mod for this module tool:
tool github.com/agentstation/goago/cmd/goagoUse go tool goago when the module declares the tool. Use a global goago
command only when repository instructions require it. Read the nearest
.goago.yml or .goago.yaml when one exists.
A goago policy file is optional. The pinned goago version supplies built-in defaults when no policy file exists.
Do not install goago or add a policy unless the user requests adoption. If the
goago Agent Skill is available, use its complete remediation workflow.
When the repository owns a goago command, discover the resolved policy before you choose a Go form:
go tool goago -list -format jsonUse each rules[].enabled value as the active restriction set. Also read
policy.ruleSource, policy.configPath, policy.tests, and policy.exclude.
A built-in rule source is a complete policy, not a
missing policy. A config rule source records the selected policy file.
An active goago restriction takes priority over a modern form. For example, do
not use expression-based new when no-new-expr is active. Keep a generic
operation as a package function when no-generic-methods is active.
If the module still pins github.com/agentstation/ago/cmd/ago, use go tool ago
until the user requests migration. Read legacy .ago.yml and .ago.yaml
policies too. The goago skill includes the migration procedure. Versions of
ago before v0.2.0 do not include the policy JSON metadata.
Make the change
- Use the newest applicable form that the target version and policy accept.
- Keep new code consistent with the selected project policy.
- Prefer the simplest form that keeps control flow, ownership, and data visible.
- Preserve behavior, exported APIs, wire formats, and error identity unless the task changes them.
- Keep the smallest coherent change. Do not modernize unrelated code.
- Prefer the standard library when it provides the required contract.
- Keep ownership with the package or type that owns the domain concept.
- Do not edit generated, vendored, or third-party code directly.
- Add a regression test when an automated test can reproduce a defect.
Skip a relevant modern guideline only when it would fail to compile, change
required behavior, or violate project policy. Read its explain output before
you skip it.
Verify the result
- Run
gofmton each changed handwritten Go file. - Run the affected package tests.
- Run the repository's complete Go check when the task scope permits it.
- Run race or platform checks when the changed behavior depends on them.
- Run goago when the repository owns an available command.
Use the same goago command form that supplied the policy:
go tool goago -stale-ignores -format json ./...Status 0 means the run completed without findings. Status 1 means the run
found a violation or stale ignore. Status 2 means the run was incomplete.
Read the JSON errors field before you change source after status 2.
Fix source when the selected goago policy reports a finding. Do not weaken the policy or add a suppression only to make the check pass.
Report the checks, results, skipped checks, and remaining uncertainty.
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.

