go-code-review

Review Go code against official style guides and static analysis guidelines.

130|8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/sandgardenhq/sgai --skill go-code-review-sandgardenhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-code-review
Source: https://github.com/sandgardenhq/sgai/tree/main/cmd/sgai/skel/.sgai/skills/coding-practices/go-code-review
Command: npx skills add https://github.com/sandgardenhq/sgai --skill go-code-review-sandgardenhq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need a reliable way to ensure Go code follows official style guidelines, reducing bugs and maintaining consistency across projects.

Core Features & Use Cases

  • Formatting Checks: Verify code is formatted with gofmt or goimports and uses tabs for indentation.
  • Naming Conventions: Enforce idiomatic package, variable, receiver, and initialism naming.
  • Comment Standards: Ensure full‑sentence doc comments for exported symbols and packages.
  • Error Handling: Require explicit error checks, proper error messages, and avoid unnecessary panics.
  • Concurrency Practices: Detect goroutine leaks, promote sync over async, and recommend race detection.
  • Modern Idioms: Encourage use of slices, maps, generics, and other Go 1.21+ features. Use case: During a pull request, run this checklist to catch style violations before merging.

Quick Start

Use the go-code-review skill to evaluate the repository at ./my-go-project and generate a checklist report.

Frequently Asked Questions about go-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform a Go code review using a checklist for idiomatic code?

To perform a Go code review, use a checklist to validate formatting, naming conventions, comments, error handling, and concurrency patterns. This ensures the codebase adheres to official style guides and modern Go idioms during pull requests.

What should a Go code review checklist cover for error handling and concurrency?

A Go code review checklist should cover explicit error checks and proper error messages to avoid panics. For concurrency, it should detect goroutine leaks, promote synchronous patterns, and recommend race detection with static analysis guidelines.

Can I use gofmt and goimports to enforce Go style guide conventions?

Yes, you can use gofmt and goimports to enforce Go style guide conventions. These tools verify code formatting and tab indentation, ensuring exported symbols have full-sentence doc comments and package names follow idiomatic standards.

Does a Go code review checklist validate modern idioms and generics?

Yes, a Go code review checklist validates modern idioms by encouraging the use of slices, maps, and generics. It ensures code adheres to modern Go 1.21+ features alongside standard formatting and naming conventions.

What is the best way to catch style violations in a Go project before merging?

The best way to catch style violations in a Go project is to run a comprehensive code review checklist during pull requests or continuous integration checks. This standalone audit evaluates formatting, error handling, and concurrency to maintain consistency.