golang-guidelines

Enforce Go coding guidelines for naming, formatting, error handling, and concurrency.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/BNTang/Sa-Token-Demo --skill golang-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-guidelines
Source: https://github.com/BNTang/Sa-Token-Demo/tree/main/.claude/skills/golang-guidelines
Command: npx skills add https://github.com/BNTang/Sa-Token-Demo --skill golang-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects often suffer from inconsistency and maintainability issues. This Skill codifies coding conventions to ensure uniform style, robust error handling, and predictable architecture across teams.

Core Features & Use Cases

  • Naming & style: Enforces Go naming conventions, export rules, and package naming for readability.
  • Code quality: Standardizes formatting with gofmt/goimports and consistent error handling practices.
  • Architecture & reviews: Guides interface design, concurrency patterns, and project structure; helps during code reviews and onboarding.
  • Use Case: When starting a new Go project or reviewing contributions, apply these guidelines to align with established best practices.

Quick Start

Review the current Go codebase with golang-guidelines to enforce naming, formatting, error handling, and concurrency patterns.

Frequently Asked Questions about golang-guidelines

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

FAQPage Schema
How do I enforce consistent Go naming conventions and export rules in my project?

To enforce consistent Go naming conventions, apply standardized patterns for package naming, export rules, and readability across your codebase. This ensures uniform style and improves maintainability for Go projects during code reviews and onboarding.

What is the best way to standardize Go error handling and formatting?

The best way to standardize Go error handling and formatting is to enforce consistent practices using tools like gofmt and goimports. This codifies coding conventions to ensure robust error handling and uniform style across teams.

Do I need Go modules enabled to apply these coding guidelines?

Yes, you need Go 1.18 or higher with modules enabled to apply these coding guidelines. The environment must also include tools like gofmt and goimports to enforce standardized patterns across your codebase effectively.

How do I guide interface design and concurrency patterns during a Go code review?

To guide interface design and concurrency patterns during a Go code review, apply established architectural guidelines that cover predictable structure and robust code quality. This helps align contributions with best practices for reliable Go development.

When do I need to codify coding conventions for a Go project?

You need to codify coding conventions for a Go project when starting a new codebase or reviewing contributions to prevent inconsistency and maintainability issues. This ensures uniform style, robust error handling, and predictable architecture across teams.