golang-lint

Configure golangci-lint and interpret lint output for Go projects.

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/VerifiedOrganic/onboard --skill golang-lint-verifiedorganic
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golang-lint
Source: https://github.com/VerifiedOrganic/onboard/tree/main/.agents/skills/golang-lint
Command: npx skills add https://github.com/VerifiedOrganic/onboard --skill golang-lint-verifiedorganic

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Go projects need consistent linting, but golangci-lint has 100+ linters, a v2 config format that breaks v1 setups, and output that is hard to prioritize. This Skill provides a production-ready .golangci.yml, clear rules for when to fix versus suppress warnings, and workflows for adopting linting on legacy codebases. ## Core Features & Use Cases - Configuration: Ships a recommended .golangci.yml with 48 linters organized by domain (correctness, style, complexity, performance, security, testing), plus guidance on which linters to disable and why. - Suppression discipline: Enforces //nolint directives with linter names and justifications, backed by the nolintlint meta-linter. - Legacy adoption: Uses issues.new-from-rev and parallel sub-agents to roll out linting incrementally on large existing codebases. - Use Case: You inherit a Go repo with 2000 lint warnings. Use this Skill to configure new-from-rev so only new code is linted, auto-fix what golangci-lint can, and batch the rest by linter category. ## Quick Start Ask the agent to set up golangci-lint for your Go project with a recommended .golangci.yml and explain any existing lint warnings.

Frequently Asked Questions about golang-lint

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

FAQPage Schema
How do I configure golangci-lint for a Go project?▼

Create a .golangci.yml with version: "2" at the top, list linters under linters.enable, and put formatters like gofumpt under formatters.enable. Set run.timeout for large repos and use linters.settings for per-linter options like errcheck check-type-assertions.

How do I suppress a golangci-lint warning with nolint?▼

Add //nolint:lintername on the flagged line with a justification comment, for example //nolint:errcheck // fire-and-forget logging. Never use bare //nolint, and enable the nolintlint linter with require-specific and require-explanation to enforce this automatically.

Which golangci-lint linters should I enable first?▼

Prioritize correctness linters: govet, staticcheck, errcheck, and unused catch real bugs. Add a security linter like bodyclose or gosec for resource leaks, then style linters like revive only after correctness is covered.

How do I adopt golangci-lint on a legacy codebase with thousands of warnings?▼

Set issues.new-from-rev in .golangci.yml so only new or changed code is linted, then run golangci-lint run --fix for auto-fixable issues. Clean up remaining warnings gradually by linter category rather than mass-suppressing with //nolint.

Why does golangci-lint report config errors after upgrading to v2?▼

golangci-lint v2 changed the config format, requiring a version field and a separate formatters section. Run golangci-lint migrate to convert a v1 config automatically, and check golangci-lint linters to verify linter availability in your installed version.

When should I not suppress a lint warning?▼

Never suppress security and resource linters like bodyclose, sqlclosecheck, or gosec without strong justification, since they catch real leaks and vulnerabilities. Fix errcheck on production code paths instead of suppressing, because unchecked errors cause silent failures.