# golang-lint

> Claude/Codex skill by [@samber](https://omgskills.com/library/samber/index.md) · 3.7k stars · Updated 2026-10-23

Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code quality tooling, or choosing linters. Also use when the user mentions golangci-lint, go vet, staticcheck, or revive. Not for wiring a lint step into a GitHub Actions pipeline (→ See \`samber/cc-skills-golang@golang-continuous-integration\` skill).

Tags: agent, agent-skills, ai, antigravity, claude, claude-code, code, codex, coding, copilot, cursor, gemini, gemini-cli-extension, openclaw, opencode, plugin, skills, skillsmp, vibe-coding

## Install

```sh
git clone https://github.com/samber/cc-skills-golang /tmp/cc-skills-golang && ln -s /tmp/cc-skills-golang/skills/golang-lint ~/.claude/skills/golang-lint
```

## From README

Go Linting Overview golangci-lint is the standard Go linting tool. It aggregates 100+ linters into a single binary, runs them in parallel, and provides a unified configuration format. Run it frequently during development and always in CI. Every Go project MUST have a .golangci.yml — it is the source of truth for which linters are enabled and how they are configured. See the recommended configuration for a production-ready with 48 linters enabled. Quick Reference Configuration The recommended .golangci.yml provides a production-ready with 33 linters. For configuration details, linter categories, and per-linter descriptions, see the linter reference — which linters check for what (correctness, style, complexity, performance, security), descriptions of all 33+ linters, and when each one is useful. Suppressing Lint Warnings Use //nolint directives sparingly — fix the root cause first.

## Links

- HTML page: https://omgskills.com/library/samber/cc-skills-golang/golang-lint/
- GitHub: https://github.com/samber/cc-skills-golang
- Author: [@samber](https://omgskills.com/library/samber/index.md)

## More from this repo

- [golang-benchmark](https://omgskills.com/library/samber/cc-skills-golang/golang-benchmark/index.md) — Golang benchmarking, profiling, and performance measurement.
   - [@samber](https://omgskills.com/library/samber/index.md) · 3.7k stars
- [golang-cli](https://omgskills.com/library/samber/cc-skills-golang/golang-cli/index.md) — Golang CLI application development.
   - [@samber](https://omgskills.com/library/samber/index.md) · 3.7k stars
- [golang-code-style](https://omgskills.com/library/samber/cc-skills-golang/golang-code-style/index.md) — Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments...
   - [@samber](https://omgskills.com/library/samber/index.md) · 3.7k stars
