Tried JetBrains/go-modern-guidelines Today: A Better Context File for Go AI Agents
JetBrains/go-modern-guidelines is a compact set of instructions for helping AI coding agents produce idiomatic, current Go—not just Go that compiles.
It picked up +294 GitHub stars today, which makes sense: most teams are already using Cursor, Cline, Roo Code, or Aider, but agent output still often carries outdated patterns—overused interfaces, unnecessary abstractions, legacy error handling, or code that ignores Go’s standard tooling.
The practical value is simple: add these guidelines to the context your coding agent sees before it edits a repository. Instead of repeatedly prompting “keep it idiomatic,” “prefer stdlib,” or “don’t over-engineer this handler,” the rules become reusable project infrastructure.
For an indie product, that means fewer review cycles and less time cleaning generated code after shipping.
I’d wire it through an Anthropic-compatible gateway and cache the guideline prompt. The guideline document is stable across many requests, so prompt caching is a good fit:
curl https://b-lost.com/v1/messages \
-H "x-api-key: $B_LOST_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-fable-5",
"max_tokens": 1800,
"system": [{
"type": "text",
"text": "You are editing a Go service. Follow the attached modern Go guidelines.\n\n<GUIDELINES>\n...contents of go-modern-guidelines...\n</GUIDELINES>",
"cache_control": { "type": "ephemeral" }
}],
"messages": [{
"role": "user",
"content": "Refactor this HTTP handler and keep the public API unchanged."
}]
}'
B-Lost exposes the native Anthropic /v1/messages shape, so the same setup works with clients that support a custom Anthropic base URL. Its prompt-cache hits can receive a 90% discount, which matters when every agent task repeatedly sends a large guideline file, repository conventions, and architecture notes.
For OpenAI-compatible tools, point the base URL at:
https://b-lost.com/v1
Then use claude-fable-5 as the configured model where supported.
This repo is not a framework or dependency. That’s exactly why I like it: copy the guidance into agent context, enforce better defaults, and keep the Docker image and monthly tooling bill unchanged.
Top comments (0)