golang-code-style

Evaluate Go code against golangci-lint style guidelines.

Updated May 19, 2026
One-click install
npx skills add https://github.com/monforje/.opencode --skill golang-code-style-monforje
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-code-style
Source: https://github.com/monforje/.opencode/tree/main/skills/cc-skills-golang/skills/golang-code-style
Command: npx skills add https://github.com/monforje/.opencode --skill golang-code-style-monforje

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, golangci-lint, and includes scripts (resource) and references (resource) and evals (resource) components.

What problem does it solve?

This Skill helps maintain consistent code style and readability in Go projects, addressing issues like line length, variable declarations, control flow, and documentation.

Core Features & Use Cases

  • Style Guidelines: Defines clear style conventions for line length, variable declarations, control flow, and string handling.
  • Early Returns: Encourages early returns for clarity and reduces nesting depth.
  • Code Evaluation: Includes a set of evaluations to ensure adherence to the defined style rules.
  • Use Case: Ensure your Go code follows best practices by utilizing this skill, particularly in collaborative coding environments and before merging code into the main repository.

Quick Start

Implement Go code with style guidelines using the golang-code-style skill.

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 Go code style standards for consistency and readability?

Enforce Go code style standards by applying style guidelines for line length, variable declarations, and control flow. This approach targets administrative code review processes and automated code quality checks to maintain clarity and consistency.

What is the best way to reduce nesting depth in Golang projects?

Reduce nesting depth in Golang projects by encouraging early returns in your functions. This style guideline minimizes deep control flow structures, significantly improving overall code readability and maintainability.

How do I use golangci-lint to check Golang coding standards?

Use golangci-lint to check Golang coding standards by running automated code quality checks against your codebase. This ensures compliance with defined style conventions for string handling and documentation during development.

Do I need Go and golangci-lint installed to check code style?

Yes, you need a Go environment with supported linters like golangci-lint installed to check code style. These dependencies are required to run the automated code quality checks and ensure adherence to style guidelines.

When should I use automated code quality checks for Go projects?

Use automated code quality checks for Go projects in collaborative coding environments and before merging code into the main repository. This ensures your Go code follows best practices and maintains consistent readability.