RepoDaily · 2026-08-28 · AI model / Agent framework

JetBrains' go-modern-guidelines stops AI agents from writing 2019-era Go

#15 AI model / Agent framework Go +314 JetBrains/go-modern-guidelines Open repository

An official JetBrains skill pack that teaches Junie, Claude Code, Codex, and Cursor the idioms of Go 1.21–1.27 — from slices.Contains to Go 1.26's errors.AsType — keyed to each project's go.mod version.

Repo typeAI model / Agent framework
Best forGo teams whose Junie, Claude Code, Codex, or Cursor agents still emit pre-1.21 idioms on Go 1.25+ toolchains
Risk levelLow — Apache-2.0 guidance plus a CLI cached in ~/.cache/go-modern-guidelines that never modifies your project
Time to evaluateAbout 10 minutes: install in one agent, generate one file, diff the idioms

Primary question: Does your agent pick `for i := 0; i < n; i++` over `for i := range n` because of training data rather than your go.mod?

93/100

RepoDaily adoption score

RepoDaily rates this as 93/100 (strong) for adoption: evidence, installation path, production risk, differentiation, license clarity, and AI/agent fit are scored from the article sources and adoption notes.

Directional score from RepoDaily sources and adoption notes, not a benchmark.Risk: Low
100Evidence quality

4 source(s) across 4 source category/categories, plus a RepoDaily-specific evidence module when available.

92Installability

6 workflow step(s), 5 next-action step(s), and 1 command/install signal(s) were detected.

70Maintenance confidence

Trending momentum is +314 stars, with maintenance/release/issue signals counted when present.

97Production readiness

Risk is marked low, with 5 security note(s) and 3 explicit skip condition(s).

100Differentiation

3 opportunity lens item(s), 3 alternative(s), and 3 type-specific section(s) support differentiation.

82License clarity

License source or license wording is present.

100Agent / AI fit

8 AI/agent-related signal(s) were detected in the article text and metadata.

Project overview

go-modern-guidelines is an official JetBrains repository — the README carries JetBrains' official-project badge — whose entire payload is a single skill file at plugin/skills/use-modern-go/SKILL.md that coding agents load before touching Go. On 2026-08-28 it ranked #15 on the trending list with 314 stars in the period. That traction for a documentation-only repo is the signal: developers have started treating agent context itself as versionable tooling, the same way they version linters and analyzers.

The output difference is concrete. An agent with these guidelines reaches for `max(a, b)` instead of an if-else block, `slices.Contains` instead of a manual loop, and `cmp.Or(a, b, c)` instead of a chain of nil checks. It also knows about recent additions like `new(42)` to get a pointer to a value and `errors.AsType[T](err)` for type-safe error matching — both from Go 1.26. Coverage spans the most useful features from Go 1.0 through Go 1.27, including everything targeted by the Go team's `modernize` analyzer.

The mechanism is version-aware rather than a blanket 'use the newest syntax' rule. The skill has the agent detect the project's Go version from `go.mod`, then use only language features and stdlib additions available up to and including that version, preferring modern idioms over older patterns. That matters because the README names the two root causes of stale output: training data lag (a model cannot use `errors.AsType[T]` if it postdates the cutoff) and frequency bias (there is more `for i := 0; i < n; i++` in the corpus than `for i := range n`, so that is what comes out).

Delivery is via agent marketplaces: Junie, Claude Code, Codex, and Cursor are supported out of the box, and other agents can consume it through skills.sh. The integrations run a small CLI installed on first use with `go install` into a local cache (for example ~/.cache/go-modern-guidelines) that, per the README, never modifies your project. The CLI targets Go 1.25 or newer; on an older Go it still works as long as automatic toolchain switching is enabled (`GOTOOLCHAIN=auto`, the default), which lets Go fetch a compatible toolchain on first run.

Problem it solves

  • Coding agents generate outdated Go: if-else where `max(a, b)` fits, hand-rolled loops where `slices.Contains` fits, nil-check chains where `cmp.Or(a, b, c)` fits.
  • Training data lag means models literally have never seen post-cutoff features such as `errors.AsType[T](err)` from Go 1.26.
  • Frequency bias means even known features lose to older patterns that dominate the corpus.
  • Agents typically ignore the version declared in `go.mod`, so output drifts from what the project's toolchain actually supports.
  • Style guides written for humans rarely enumerate stdlib additions release by release, so they do not close the gap for generated code.

How it works

  1. The agent loads the skill — invoked automatically when a task touches Go, or explicitly in Claude Code via `/modern-go-guidelines:use-modern-go`.
  2. The marketplace integration runs a small CLI installed on first use with `go install` into a local cache (example: ~/.cache/go-modern-guidelines); the CLI never modifies the project.
  3. The skill has the agent detect the project's Go version from `go.mod`.
  4. The guideline set — covering Go 1.0 through Go 1.27, including everything the `modernize` analyzer targets — is filtered to features that version supports.
  5. During generation the agent prefers modern idioms: `max`, `slices.Contains`, `cmp.Or`, `for i := range n`, `new(42)`, `errors.AsType[T]`.
  6. Updates arrive through the marketplace: `/extensions update modern-go-guidelines` in Junie; opt-in auto-update plus `/reload-plugins` in Claude Code.

Try-it path: zero to modern Go in one session

  • Prerequisite: the Go toolchain installed and available on PATH (go.dev/dl), since the CLI is installed with `go install` on first use.
  • Junie CLI: run `/extensions marketplace add JetBrains/go-modern-guidelines`, then `/extensions install modern-go-guidelines`. Junie invokes the skill automatically when a task is relevant to Go.
  • Claude Code: run `/plugin marketplace add JetBrains/go-modern-guidelines`, then `/plugin install modern-go-guidelines@goland-claude-marketplace`. Explicit call: `/modern-go-guidelines:use-modern-go`.
  • Codex and Cursor are supported through the same guidelines, and other agents consume them via skills.sh, per the README.
  • Version floor: the CLI targets Go 1.25 or newer. On older toolchains it still works when `GOTOOLCHAIN=auto` (the default) is left enabled, letting Go fetch a compatible toolchain on first run.
  • Nothing lands in your repo: the CLI lives in a user-level cache such as ~/.cache/go-modern-guidelines and does not modify project files.

Command surface: what you type to keep it current

  • Junie install: `/extensions install modern-go-guidelines`; Junie update: `/extensions update modern-go-guidelines` — both inside a Junie CLI session.
  • Claude Code install: `/plugin install modern-go-guidelines@goland-claude-marketplace`; explicit skill call: `/modern-go-guidelines:use-modern-go`.
  • Claude Code updates: run `/plugin`, open Marketplaces, select `goland-claude-marketplace`, choose Enable auto-update (off by default for third-party marketplaces), then `/reload-plugins` to apply the new version to the current session.
  • Behind the scenes: one CLI, one dependency — `go.mod` declares `go 1.25.0` and `require golang.org/x/mod v0.37.0` — so the surface staying resident on your machine is small.

Maintenance risk: where staleness could creep in

  • The guidelines track Go releases (1.0 through 1.27 in the current set); an out-of-date install simply omits newer idioms rather than breaking code.
  • Claude Code disables auto-update for third-party marketplaces by default, so a silent-stale plugin is the realistic failure mode unless you opt in via `/plugin`.
  • Junie updates are explicit: `/extensions update modern-go-guidelines`.
  • The repo is Apache-2.0 licensed, so pinning, vendoring the SKILL.md, or forking the guideline set is permitted if you need frozen behavior.
  • The only environment dependency is the Go toolchain on PATH; `GOTOOLCHAIN=auto` covers older local Go versions.

Who should pay attention?

Good fit if

  • Go services on Go 1.21 or newer where agents write new code — the skill caps itself at the version in `go.mod`, so older modules are handled too.
  • Organizations standardizing agent output across Junie, Claude Code, Codex, and Cursor from one source of truth.
  • Teams already running the `modernize` analyzer who want generation-side coverage, not just after-the-fact rewrites.
  • Any environment that can keep the Go toolchain on PATH, including CI runners with `GOTOOLCHAIN=auto`.

Skip for now if

  • Repositories with no AI agent in the write path — the guidelines only act through an agent.
  • Locked-down machines with no Go toolchain on PATH and `GOTOOLCHAIN` pinned to a version older than 1.25.
  • Teams whose policy requires generated code to stick to pre-1.21 idioms for library-compatibility reasons.

Risks and cautions

Low

Read-only guidance plus a cached CLI under Apache-2.0; the README states the CLI never modifies your project, and the realistic failure mode is stale guidance rather than broken code.

  • Apache License 2.0 covers use, modification, and redistribution.
  • The CLI installs into a user cache (for example ~/.cache/go-modern-guidelines) and, per the README, never modifies your project.
  • Updates are deliberate acts: `/extensions update` in Junie, opt-in auto-update plus `/reload-plugins` in Claude Code.
  • The single external dependency is the Go toolchain; `go.mod` shows one require line, golang.org/x/mod v0.37.0.
  • The marketplace integration runs a small CLI installed on first use via `go install` — verify you trust the JetBrains organization publishing it.
  • The CLI resides in a local cache (example path ~/.cache/go-modern-guidelines) and does not modify project files, per the README.
  • Apache-2.0 includes a patent grant, the standard terms for development tooling.
  • Claude Code leaves auto-update disabled for third-party marketplaces by default, so guideline updates do not arrive unattended; you enable them per marketplace.
  • The source pack documents no telemetry or data collection; the only configuration knobs mentioned are PATH availability and `GOTOOLCHAIN=auto`.

Alternatives to compare

ApproachWhen to useTrade-off
golang.org/x/tools modernize analyzer
You already have legacy Go and want automatic rewrites of old idioms to newer onesFree and open source; it edits files, so plan for diff review
Uber Go Style Guide
You want human-oriented style rules and review guidance rather than version-keyed feature coverageFree to read; not agent-native, so coding agents will not apply it automatically
Hand-written rules in AGENTS.md or CLAUDE.md
You need house-specific idioms or library conventions these guidelines do not coverYou own the maintenance; the text goes stale as each Go release ships

What this trend reveals

Ship Go 1.26 idioms on day one

`errors.AsType[T](err)` and `new(42)` are Go 1.26 additions most models cannot emit from memory; the skill puts them directly in the agent's context alongside older replacements like `cmp.Or(a, b, c)`.

In a Claude Code session with the plugin installed, ask for an error-handling path and check whether the output uses `errors.AsType[T](err)` instead of a type assertion on a concrete error type.

Cut modernize findings on new code

The Go team's `modernize` analyzer exists to update existing code to newer idioms; agents that write old patterns create the very backlog it fixes. Aligning generation reduces analyzer findings on newly written files.

Write the same function with and without the skill installed, run the modernize analyzer on both files, and compare the finding counts.

One rulebook across four agents

The same SKILL.md is served to Junie, Claude Code, Codex, and Cursor through marketplaces and to other agents via skills.sh, so idiom drift between tools has a single fix point.

Install in two different agents, issue the identical Go task in each, and diff whether both choose `for i := range n` over the classic three-clause loop.

Best next action

Install it in Claude Code and judge one generated file

Ten minutes inside one agent tells you whether your baseline output is actually dated; the skill auto-fires on Go tasks, so the test is a normal task you already do.

  1. Confirm `go version` resolves on PATH (1.25+ recommended, or keep `GOTOOLCHAIN=auto`).
  2. In Claude Code, run `/plugin marketplace add JetBrains/go-modern-guidelines`, then `/plugin install modern-go-guidelines@goland-claude-marketplace`.
  3. Ask for a small function involving a bounded loop, a max computation, and an error type check.
  4. Inspect the result for `for i := range n`, `max(a, b)`, `slices.Contains`, `cmp.Or`, and — on a Go 1.26 module — `errors.AsType[T]`.
  5. If the diff is what you want, enable auto-update for `goland-claude-marketplace` via `/plugin` and repeat the install on your other agents.

RepoDaily verdict

A rare piece of agent infrastructure that is pure context: Apache-2.0 guidelines, a CLI cached outside your project, and version detection driven by `go.mod`. If your repository is on Go 1.21+ and any of the four supported agents writes code for you, install it in one session and judge the diff yourself.

Sources