go-lint

mway's avatarfrom mway

Lint and format Go code via golangci-lint. Use when asked to lint code, fix lint errors, or check code quality.

⭐4stars🔀0forks📁View on GitHub🕐Updated Jan 8, 2026

When & Why to Use This Skill

This Claude skill integrates the powerful golangci-lint tool to provide automated linting and formatting for Go (Golang) source code. It enhances code quality by identifying stylistic inconsistencies, potential bugs, and performance issues, while offering automated fix capabilities to streamline the development workflow and maintain idiomatic Go standards.

Use Cases

  • Automated Code Quality Audits: Quickly scan entire Go projects or specific packages to identify code smells, dead code, and complex logic errors using industry-standard linters.
  • Automated Bug Fixing: Utilize the --fix flag to automatically resolve common linting issues and format code, reducing manual effort during the code review process.
  • Pre-submission Validation: Ensure that new Go code adheres to project-specific quality gates and best practices before it is committed to a repository or merged into production.
namego-lint
descriptionLint and format Go code via golangci-lint. Use when asked to lint code, fix lint errors, or check code quality.
allowed-tools["shell"]
short-descriptionLint Go code with golangci-lint

Go Linter

Reference: ~/.config/agent/domain/coding/go/tooling.md for Go linting details

Instructions

Lint Go code using golangci-lint per AGENT.md guidelines:

Standard Lint (with auto-fix)

golangci-lint run --new-false --fix ${ARGUMENTS}

Default to ./... if no package path is provided.

Lint Only (no fixes)

If user wants to see issues without applying fixes:

golangci-lint run --new-false ${ARGUMENTS}

Lint Flags

  • --new-false: Deprecated syntax for --new=false (show all issues)
  • --fix: Automatically fix issues where possible
  • Path defaults to ./... (all packages)

Common Usage

# Lint and fix all packages
golangci-lint run --new-false --fix ./...

# Lint specific package
golangci-lint run --new-false --fix ./path/to/package

# Check without fixing
golangci-lint run --new-false ./...

Arguments

Target package(s): ${ARGUMENTS:-./...}