By JetBrains
Apply modern Go syntax guidelines and features (slices, maps, cmp, min/max, etc.) based on project's detected Go version from go.mod, avoiding outdated patterns.
This repository contains guidelines for code agents that help them write modern Go code.
For example, an agent with these guidelines uses max(a, b) instead of an if-else block, slices.Contains instead of a manual loop, 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.
The guidelines cover the most useful features from Go 1.0 through Go 1.26, including everything targeted by the modernize analyzer. An agent will:
go.modAll coding agents tend to generate outdated Go. Two reasons:
Training data lag. Models don't know about features added after their training cutoff. They can't use errors.AsType[T] (Go 1.26) if they've never seen it.
Frequency bias. Even for features the model knows, it often picks older patterns. There's more for i := 0; i < n; i++ in the training data than for i := range n, so that's what comes out.
These guidelines fix both problems by giving the agent an explicit reference.
This aligns with the Go team's direction. The modernize analyzer exists to automatically update existing code to use newer idioms (see this talk from the Go team). These guidelines serve the same goal for new code: agents write modern Go from the start, so there's less to fix later.
The guidelines are available for Junie and Claude Code.
Starting with version 2xx.620.xx, Junie includes the modern Go guidelines out of the box. No manual setup is required — just make sure you're running a compatible version.
Go to Settings → Plugins → Installed, find Junie, and click Update if a newer version is available.
The guidelines are controlled via Settings → Tools → Junie → Project Settings → Go. The Provide modern Go guidelines option is enabled by default. Disable it if you prefer Junie to generate code without these guidelines.
For convenience, the guidelines are distributed as a Claude Code plugin.
Run the following commands inside a Claude Code session.
/plugin marketplace add JetBrains/go-modern-guidelines
/plugin install modern-go-guidelines
The plugin adds the /use-modern-go command. Run it at the start of a session to activate the guidelines:
/use-modern-go
The command detects the Go version from go.mod and tells the agent to use features up to that version:
> /use-modern-go
This project is using Go 1.24, so I'll stick to modern Go best practices
and freely use language features up to and including this version.
If you'd prefer a different target version, just let me know.
After this, any Go code the agent writes will follow the guidelines.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub jetbrains/go-modern-guidelines --plugin modern-go-guidelinesMaintains IdeaVim test suite quality. Reviews disabled tests, ensures Neovim annotations are documented, and improves test readability. Use for periodic test maintenance.
Maintains IdeaVim changelog (CHANGES.md) and build.gradle.kts changeNotes. Use when updating changelog, documenting releases, or reviewing commits/PRs for changelog entries.
Keeps IdeaVim documentation in sync with code changes. Use this skill when you need to verify documentation accuracy after code changes, or when checking if documentation (in doc/, README.md, CONTRIBUTING.md) matches the current codebase. The skill can work bidirectionally - from docs to code verification, or from code changes to documentation updates.
Agent skill for interacting with TeamCity CI/CD using the teamcity CLI. Enables Claude to explore builds, view logs, start jobs, manage queues, agents, and more.
PhpStorm plugin for advanced IDE integration
Enhances code agents with Go best practices covering performance, modern syntax, generics, patterns, testing, error handling, and concurrency.
Go development following Google Go style guide with Go 1.25+ features and best practices
Go-specific development tools with idiomatic best practices
gopilot is your Go copilot - a skill for writing idiomatic Go code, covering design patterns, error handling, testing, concurrency, generics, and stdlib patterns up to Go 1.26.
Release engineering for Go modules and applications — semantic versioning, breaking-change detection, deprecation conventions, go.mod hygiene, and binary distribution with GoReleaser.
Expert Go 1.26+ — idioms, concurrency, backend services, cargo-grade tooling (golangci-lint v2, govulncheck), with SOLID principles