← all repositories
JetBrains/go-modern-guidelines

JetBrains wrote a style guide for your robot intern

A rulebook that stops AI agents from writing Go like it’s 2015.

★3.8k stars Go Coding Assistants
go-modern-guidelines
Velocity · 7d
+4.9
★ / day
Trend
↘cooling
star history

What it does

This repository is a set of guidelines for AI coding agents. It teaches them to reach for modern Go idioms—max(a, b), slices.Contains, cmp.Or(a, b, c)—instead of older boilerplate, covering features from Go 1.0 up through Go 1.27. A small CLI detects the project’s Go version from go.mod and constrains suggestions to what is actually available.

The interesting bit

The project treats LLM training lag as a bug to be patched. Models default to older patterns simply because they appear more frequently in training data; these guidelines act as an explicit override, aligning new code with the Go team’s own modernize analyzer.

Key highlights

  • Covers the full span from Go 1.0 to Go 1.27, including recent additions like new(42) for pointer literals and errors.AsType[T] from Go 1.26.
  • Detects the target Go version from go.mod so agents don’t suggest features that would break the build.
  • Distributed as plugins for Junie, Claude Code, Codex, Cursor, and generic agents via skills.sh.
  • The underlying CLI is installed on first use into a local cache and never touches your project files.

Caveats

  • The CLI itself requires Go 1.25 or newer to run; on older versions it relies on Go’s automatic toolchain switching being enabled.
  • Cursor does not currently provide a non-interactive CLI command for updating an installed plugin, so maintenance there is slightly more manual.

Verdict

Worth a look if you use AI agents for Go and are tired of manually modernizing their output. If you already enforce the modernize analyzer strictly and don’t use agentic coding, it solves a problem you don’t have.

Frequently asked

What is JetBrains/go-modern-guidelines?
A rulebook that stops AI agents from writing Go like it’s 2015.
Is go-modern-guidelines open source?
Yes — JetBrains/go-modern-guidelines is open source, released under the Apache-2.0 license.
What language is go-modern-guidelines written in?
JetBrains/go-modern-guidelines is primarily written in Go.
How popular is go-modern-guidelines?
JetBrains/go-modern-guidelines has 3.8k stars on GitHub and is currently cooling off.
Where can I find go-modern-guidelines?
JetBrains/go-modern-guidelines is on GitHub at https://github.com/JetBrains/go-modern-guidelines.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.