golang-patterns

Review Go code against idiomatic patterns and best practices.

15|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AeonDave/malskill --skill golang-patterns-aeondave
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-patterns
Source: https://github.com/AeonDave/malskill/tree/main/programming/golang-patterns
Command: npx skills add https://github.com/AeonDave/malskill --skill golang-patterns-aeondave

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on writing idiomatic, robust, and maintainable Go code, ensuring consistency and adherence to best practices.

Core Features & Use Cases

  • Code Review Guidance: Offers a checklist for reviewing Go code for common issues.
  • Best Practices: Details principles for error handling, concurrency, interfaces, and more.
  • Use Case: When reviewing a Pull Request for a new Go service, use this Skill to ensure the code follows established Go conventions for error handling and concurrency.

Quick Start

Review the provided Go code snippet for adherence to idiomatic patterns.

Frequently Asked Questions about golang-patterns

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

FAQPage Schema
What are the best practices for idiomatic Go error handling and concurrency?

Idiomatic Go error handling and concurrency best practices involve robust patterns for wrapping errors and managing goroutines to ensure readable, maintainable code. This Skill provides established conventions for reviewing these aspects in Go services.

How do I review a Go pull request for adherence to established conventions?

To review a Go pull request for conventions, use a checklist focusing on APIs, packages, errors, interfaces, and concurrency. This Skill offers code review guidance to identify common issues and verify adherence to idiomatic patterns.

Does this Go patterns guidance apply to older Go versions or just Go 1.22+?

This Go patterns guidance has a baseline compatibility of Go 1.22+. It details idiomatic conventions for writing robust code, ensuring consistency across APIs, packages, errors, interfaces, and concurrency for versions meeting this threshold.

What's the best way to structure Go packages and interfaces for maintainability?

The best way to structure Go packages and interfaces for maintainability is to follow established conventions for APIs and robust design. This Skill provides idiomatic patterns and best practices to ensure your code remains readable and maintainable.

How do I configure tooling like golangci-lint and staticcheck for Go code review?

To configure tooling like golangci-lint, staticcheck, gofmt, and goimports for Go code review, apply the specific guidance included in this Skill. It covers these tools to help enforce idiomatic patterns and ensure code consistency.

Why does my Go code fail staticcheck checks for interface design?

Go code may fail staticcheck checks if it does not adhere to idiomatic interface design and package structuring conventions. This Skill provides the baseline patterns and tooling guidance needed to resolve these common code review issues.