This is a practical guide to setting up golangci-lint with opinionated but sensible defaults. It recommends five core linters (errcheck, goimports, revive, govet, staticcheck) and emphasizes consistent linting over any particular toolset. The setup script generates a working config in one command, and the documentation covers nolint directives, CI integration, and when to add security or complexity checks. The advice is clearly derived from the Uber Style Guide, which means it's battle-tested on large codebases. If you're starting a Go project or tired of inconsistent linting across your repos, this gives you a solid baseline without drowning you in 50+ linter options.

skills.sh installs
1.3K
GitHub stars
193
last updated
Aug 21, 2026

Install

$ npx -y skills add cxuu/golang-skills --skill go-linting --agent claude-code

Installs into .claude/skills of the current project.

Files

Go Linting

Core Principle

More important than any "blessed" set of linters: lint consistently across a codebase.

Consistent linting helps catch common issues and establishes a high bar for code quality without being unnecessarily prescriptive.

Resource Routing

  • scripts/setup-lint.sh - Run when generating a .golangci.yml, validating the first lint pass, or producing JSON metadata.
  • assets/golangci.yml - Use as the v2 golangci-lint baseline for established projects.

Setup Procedure

  1. Create .golangci.yml with scripts/setup-lint.sh or copy assets/golangci.yml
  2. Run golangci-lint run ./...
  3. If errors appear, fix them category by category (formatting first, then vet, then style)
  4. Re-run until clean

After generating .golangci.yml, run golangci-lint config verify --config .golangci.yml to verify the configuration schema before relying on lint results.


Minimum Recommended Linters

These linters catch the most common issues while maintaining a high quality bar:

Sponsors

Details

Repository
github.com/cxuu/golang-skills
Categories
DevOps & CI/CD, Git & Pull Requests, Code Review & Quality, Automation & Workflows, Sales & Marketing, Go
First seen
May 16, 2026

More from cxuu/golang-skills

All 20
1capawesome-team avatarcapawesome-cloudcapawesome-team/skillsGuides the agent through setting up and using Capawesome Cloud for Capacitor and Cordova apps. Covers three core workflows: (1) Native Builds — cloud builds for1.3Kskills.sh installs
2neo4j-contrib avatarneo4j-graphrag-skillneo4j-contrib/neo4j-skillsBuild GraphRAG retrieval pipelines on Neo4j using the neo4j-graphrag Python package (v1.16.0+). Covers retriever selection (VectorRetriever, HybridRetriever, Ve1.2Kskills.sh installs
3zxkane avataraws-cdk-developmentzxkane/aws-skillsAWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python. Use when creating CDK stacks, defining CDK constructs, implemen1.2Kskills.sh installs
4vintasoftware avatardjango-celery-expertvintasoftware/django-ai-pluginsExpert Django Celery guidance for asynchronous task processing. Use when designing background tasks, configuring Celery workers, handling task retries and error1.2Kskills.sh installs
5heygen-com avatarliveavatar-integrateheygen-com/liveavatar-agent-skillsBuild a LiveAvatar integration end-to-end — assesses the user's existing stack, recommends the optimal path, and guides implementation. Use when: (1) Building a1.2Kskills.sh installs
6josiahsiegel avatarpowershell-masterjosiahsiegel/claude-plugin-marketplaceComplete PowerShell expertise system across ALL platforms (Windows/Linux/macOS). PROACTIVELY activate for: (1) ANY PowerShell task (scripts/modules/cmdlets), (21.1Kskills.sh installs