golang-code-style

Enforce Go code style, formatting, and conventions across a codebase.

2.9k|191|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/samber/cc-skills-golang --skill golang-code-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-code-style
Source: https://github.com/samber/cc-skills-golang/tree/main/skills/golang-code-style
Command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-code-style

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects struggle with inconsistent formatting and conventions across teams. This Skill provides a centralized set of style guidelines to improve readability and maintainability.

Core Features & Use Cases

  • Enforces line length, variable declarations, and idiomatic Go practices.
  • Provides naming and structural recommendations for files, packages, and types.
  • Use cases include code reviews, onboarding new contributors, and establishing project standards.

Quick Start

Run the Go code style checks against your project and apply the recommended formatting.

Frequently Asked Questions about golang-code-style

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

FAQPage Schema
How do I enforce consistent Go code style and naming conventions across my team?

To enforce Go code style, you apply centralized style guidelines that codify rules for line length, variable declarations, and naming conventions. This unifies readability and maintainability across the codebase for all contributors.

What are the best practices for structuring Go packages and types during code reviews?

During Go code reviews, best practices involve enforcing idiomatic Go practices and applying structural recommendations for files, packages, and types. This ensures consistent architecture decisions and code style across the project.

How do I standardize error handling and composite literals in a golang project?

Standardizing error handling and composite literals in a golang project involves applying codified style rules to your codebase. This enforces consistent formatting and conventions, improving overall code maintainability.

Can I use these golang code style rules for onboarding new contributors?

Yes, you can use these golang code style rules for onboarding new contributors. The centralized style guidelines provide clear standards for formatting and conventions, helping new team members quickly align with project expectations.

Does this Go code style enforcement work with CI linting workflows?

Yes, this Go code style enforcement works with CI linting workflows. It provides linter integration and templates to automatically check formatting and conventions, ensuring consistent style across continuous integration pipelines.