go-style

Standardize Go code style across source files and reviews.

Updated May 15, 2026
One-click install
npx skills add https://github.com/klaidliadon/claude-plugins --skill go-style-klaidliadon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-style
Source: https://github.com/klaidliadon/claude-plugins/tree/main/plugins/go-style/skills/go-style
Command: npx skills add https://github.com/klaidliadon/claude-plugins --skill go-style-klaidliadon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you apply a shared set of Go style conventions consistently, reducing review churn, accidental inconsistency, and style drift across repos.

Core Features & Use Cases

  • Pointer-field initialization: Use direct new(value) initialization for pointer fields instead of creating temporary locals.
  • Import and logger conventions: Keep imports unaliased by default and name slog loggers logger for clarity.
  • Testing and parser structure: Organize tests with subtests, collapse redundant assertions, and keep simple parsers colocated with the types they parse.
  • Use Case: When refactoring a Go service, this Skill helps you rewrite code to match established repo conventions and produce cleaner, more consistent diffs.

Quick Start

Ask me to review or rewrite your Go code so it follows these go-style conventions before you edit or commit it.

Frequently Asked Questions about go-style

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

FAQPage Schema
How do I standardize Go code style across a repository to reduce review churn?

To standardize Go code style, apply shared conventions for pointer initialization, import aliasing, logger naming, and test structure so code stays grepable and aligned with existing package patterns. This consistency reduces review churn and style drift across repositories.

What is the best way to handle pointer-field initialization in Go refactoring?

For pointer-field initialization in Go refactoring, use direct new(value) initialization instead of creating temporary locals. This approach keeps code cleaner and produces more consistent diffs when rewriting services to match established repository conventions.

Does this Go style convention require unaliased imports and specific logger naming?

Yes, these Go style conventions require keeping imports unaliased by default and naming slog loggers logger for clarity. Adhering to these shared repository conventions ensures code stays consistent and aligned with existing package patterns.

How do I structure Go tests to follow consistent repository conventions?

To structure Go tests consistently, organize them with subtests, collapse redundant assertions, and keep simple parsers colocated with the types they parse. This ensures test structure aligns with shared repository conventions and produces cleaner diffs.

Can I use this Skill to review Go code before committing changes?

Yes, you can use this Skill to review or rewrite Go code so it follows shared style conventions before you edit or commit it. This helps catch accidental inconsistency and style drift early in the development process.

When do I need consistent Go code style conventions for code review?

You need consistent Go code style conventions for code review when repositories require consistent pointer initialization, import aliasing, logger naming, test structure, assertion usage, and parser placement to stay grepable and aligned with existing package patterns.