Go Guidelines plugin

A skill plugin makes an agent write modern Go: version from go.mod, generics, concurrency safety and a go fix pass.

  • 104 ★ on the repository
  • Last commit
Plugin

Extended access

Why this level

  • The skill makes the agent run a linter, tests and `go fix`, and the latter edits source files.
All reasons and checks

mhmtszr/go-guidelines

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add plugins/go-guidelines

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The skill makes the agent run a linter, tests and `go fix`, and the latter edits source files.

This is third-party code. Review the repository files before installing.

What it does

Go Guidelines gives an agent an explicit Go reference tied to the language version. The agent detects the version from `go.mod`, loads only the relevant reference files and writes code with idioms available up to that version. References cover modern syntax, generics, slices and maps, error handling, context, concurrency, performance, common pitfalls and tests. After changes the agent runs a linter (or `go vet`), tests with `go test -race` and, on Go 1.26 and newer, `go fix`. The plugin targets typical AI weaknesses: training data lagging behind new language features, a habit of picking the most frequent old patterns, unbounded goroutines and a wrong shutdown order for server and database. Installation is separate for Claude Code, Codex CLI, Cursor, OpenCode and Pi.

Who it is for. Go developers who ask an agent to write services and want code without outdated idioms and goroutine leaks.

Good fit when

  • An agent writes a new Go service and must respect the version in `go.mod`.
  • You need a shutdown order: HTTP server first, then the database.
  • Code is checked with the race detector and `go fix` after every change.
  • An old project moves to Go 1.25 or 1.26 and the agent should use new features.

Not a fit when

  • The project is not written in Go: the references cover this language only.
  • The team has its own code standards that differ from these rules.
  • The agent cannot run a linter and tests in the environment.

Example request

Write an HTTP service with graceful shutdown and a worker pool for the Go version in go.mod and run tests with the race detector.

Limitations

The skill tells an agent the rules but does not guarantee they are followed: a linter, tests and review still check code quality. The agent detects the Go version from `go.mod` files, so in multi-module projects it takes the most common version. The `go fix` pass applies only to Go 1.26 and newer. Some described features belong to recent Go versions and work only once those are installed. The plugin is installed separately for each tool: an install in Claude Code does not carry over to Cursor or Codex. Pi has its own extension.

How to disable. Remove the plugin with `/plugin uninstall go-guidelines@go-guidelines-marketplace`. For Cursor delete the `~/.cursor/plugins/local/go-guidelines` folder.

FAQ

How do I install Go Guidelines in Claude Code?

Run `/plugin marketplace add mhmtszr/go-guidelines`, then `/plugin install go-guidelines@go-guidelines-marketplace`.

How do I install it in Cursor?

Clone with `git clone https://github.com/mhmtszr/go-guidelines.git ~/.cursor/plugins/local/go-guidelines` and restart Cursor or reload the window.

How can I see which Go version the agent uses?

The skill reads the version from the project's `go.mod` and shows it at the start. Without the file the version is unknown.

What is checked after changes?

A linter or `go vet`, tests with `go test -race` and, on Go 1.26 and newer, `go fix`.

How do I install it for Pi?

Run `pi install git:github.com/mhmtszr/go-guidelines`. For local development run Pi with `-e` and the folder path.

Discussion

No questions or reviews yet.

Plugins

go-modern-guidelines

Modern Go Guidelines

Guideline skill that teaches an agent to write modern Go: new language and stdlib idioms scoped to the project version

SkillMinimal access4KRepository stars

The csharp-guidelines plugin checks agent-written .NET code against Dennis Doomen's AV0100–AV2400 rules, up to language v14.

PluginMinimal access784Repository stars

Seven Go skills from the creator of Cobra and Hugo: idiomatic style, CLI design, releases, Wails, file operations and afero tests

PluginMinimal access702Repository stars

A 33-skill plugin with gates: question the request, verify facts against sources, test first, review by a second model

PluginExtended access119Repository stars

Procoder is a single Go binary with a commit gate, quality controllers and a lessons ledger so agents cannot ship unfinished work

PluginExtended access211Repository stars

Thirty-five Go skills that an agent loads on demand: errors, goroutines, testing, architecture and code review.

SkillMinimal access88Repository stars

README in short

The README explains why the plugin exists, a four-step workflow and installation for five tools. Reference files sit in `skills/go-guidelines/references`.

README badge

Original SKILL.md

---
name: go-guidelines
description: Go best practices for performance, modern syntax, generics, patterns, testing, error handling, and concurrency. Use when writing or reviewing Go code.
---

# Go Guidelines

## Detected Go Version

!`grep -rh "^go " --include="go.mod" . 2>/dev/null | cut -d' ' -f2 | sort | uniq -c | sort -nr | head -1 | xargs | cut -d' ' -f2 | grep . || echo unknown`

## How to Use

DO NOT search for go.mod files or try to detect the version yourself. Use ONLY the version shown above.

**If version detected (not "unknown"):**
- Say: "This project is using Go X.XX, so I'll follow Go best practices and modern syntax up to and including this version. If you'd prefer a different target version, just let me know."
- Do NOT list features, do NOT ask for confirmation

**If version is "unknown":**
- Say: "Could not detect Go version in this repository"
- Use AskUserQuestion: "Which Go version should I target?" with options ... / [1.20] / [1.21] / [1.22] / [1.23] / [1.24] / [1.25] / [1.26] / [1.27] / ...

## Reference Loading

**Read ONLY the reference file(s) relevant to your current task. Do NOT load all files at once.**

When reading reference files, **stop at the detected Go version boundary** — ignore features from newer versions.

| When you are... | Read this reference |
|---|---|
| Using version-specific Go syntax or idioms | [references/modern-syntax.md](references/modern-syntax.md) |
| Optimizing performance, struct layout, escape analysis | [references/performance.md](references/performance.md) |
| Working with goroutines, channels, sync, select, false sharing | [references/concurrency.md](references/concurrency.md) |
| Writing HTTP servers, shutdown, health checks, middleware, interfaces, io.Reader | [references/patterns.md](references/patterns.md) |
| Writing tests, mocks, benchmarks, fuzz tests | [references/testing.md](references/testing.md) |
| Handling errors, wrapping, custom error types | [references/error-handling.md](references/error-handling.md) |
| Working with slices, maps, append, memory leaks | [references/slices-and-maps.md](references/slices-and-maps.md) |
| Using context.Context, values, cancellation, timeouts | [references/context-patterns.md](references/context-patterns.md) |
| Using generics, type parameters, constraints | [references/generics.md](references/generics.md) |

Report a problem