JetBrains/go-modern-guidelines
Help AI coding agents write modern Go
What it solves
Coding agents often generate outdated Go code because of training data lag (they aren't aware of features added after their cutoff) and frequency bias (they prefer common older patterns over newer, more efficient ones). This project provides explicit guidelines to ensure agents write modern Go from the start.
How it works
It provides a set of guidelines and a CLI tool that agents can use as a reference. The system detects the project's Go version from go.mod and instructs the agent to use language features and standard library additions available up to that version, preferring modern idioms over older patterns (e.g., using max(a, b) instead of if-else blocks or slices.Contains instead of manual loops).
Who it’s for
Developers using AI coding agents like Junie, Claude Code, Codex, Cursor, or other agents via skills.sh who want their generated Go code to follow the latest language standards and idioms.
Highlights
- Version-Aware: Automatically detects the Go version from
go.modto apply relevant features. - Broad Compatibility: Integrates with multiple popular AI agents including Cursor, Claude Code, and Junie.
- Comprehensive Coverage: Covers useful features from Go 1.0 through Go 1.27.
- Non-Intrusive: The CLI is installed in a local cache and does not modify the project files directly.
Written about in
Related
- Dispatch
- Project
- Project
- Project
- Project