go-expert

Apply idiomatic Go coding practices for formatting, naming, error handling, concurrency, and security.

1|Updated Jan 5, 2023
One-click install
npx skills add https://github.com/riez/dots --skill go-expert-riez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-expert
Source: https://github.com/riez/dots/tree/main/.config/agentic/skills/go-expert
Command: npx skills add https://github.com/riez/dots --skill go-expert-riez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers need guidance to produce idiomatic, secure, and maintainable Go code, reducing review cycles and bugs by standardizing formatting, naming, and error handling across teams.

Core Features & Use Cases

  • Formatting & Style: enforce gofmt/goimports usage, consistent indentation, and package naming.
  • Naming & Error Handling: enforce Go naming conventions, errors wrapped with %w, and clear error messages.
  • Concurrency & Security: guidance on goroutine lifetimes, synchronization patterns, and security best practices.
  • Use Case: when reviewing or writing Go modules, apply these guidelines to improve readability, correctness, and safety across projects.

Quick Start

Paste your Go code or project and ask for an idiomatic review and security audit.

Frequently Asked Questions about go-expert

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

FAQPage Schema
How do I review Go code for idiomatic practices and security vulnerabilities?

Idiomatic Go code adheres to language conventions and Effective Go principles, ensuring proper formatting with gofmt, clear naming, and correct error wrapping with %w to produce maintainable and reliable modules.

How do I handle concurrency in Go securely to avoid bugs?

Handle Go concurrency securely by applying guidance on goroutine lifetimes and synchronization patterns, ensuring safe execution across modules while aligning with Go language conventions and security best practices to prevent race conditions.

What is the best way to format Go code and enforce naming conventions?

The best way to format Go code and enforce naming conventions is by applying gofmt and goimports usage, ensuring consistent indentation and package naming to standardize style and improve readability across teams.

Does this approach work for large Go projects with varying module sizes?

Yes, these idiomatic and secure Go coding practices are applicable to code reviews, development, and debugging across Go projects of varying sizes, ensuring code quality and safety regardless of module scale.

Why does idiomatic Go error handling require wrapping errors with %w?

Idiomatic Go error handling requires wrapping errors with %w to preserve the original error context while adding clear messages, allowing callers to inspect errors using errors.Is and errors.As for reliable debugging.