golang-lint

Configure golangci-lint with .golangci.yml and manage lint findings.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill golang-lint-hellopoisonx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-lint
Source: https://github.com/hellopoisonx/aim/tree/main/skills/golang-lint
Command: npx skills add https://github.com/hellopoisonx/aim --skill golang-lint-hellopoisonx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This Skill helps you set up and use golangci-lint to reliably detect Go bugs, unsafe patterns, style problems, and resource leaks before they ship.

Core Features & Use Cases

  • .golangci.yml setup: Establishes a clear, production-ready lint configuration with the right linters enabled, sensible run settings, and formatter rules (gofmt/gofumpt).
  • Actionable lint workflow: Covers running linters in normal, CI, and auto-fix modes, plus how to interpret the output (including linter names).
  • nolint hygiene: Enforces correct and justified suppression using nolintlint, and explains when to fix vs suppress (especially for security/resource linters).

Quick Start

Use this Skill to configure golangci-lint for a Go repo and produce a lint setup that runs consistently in development and CI.

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?

You configure golangci-lint by setting up a v2-compatible .golangci.yml file that enables the right linters, sensible run settings, and gofmt or gofumpt formatter rules to establish a production-ready lint configuration.

How do I interpret and fix golangci-lint output in CI?

Interpreting golangci-lint output involves reading the reported linter names to identify correctness, style, security, or resource leak issues. You can then run golangci-lint with the --fix flag for auto-fixable findings or apply manual corrections.

When should I use nolint directives to suppress Go lint findings?

You should use nolint directives to suppress Go lint findings only when a fix is impractical, ensuring each suppression is properly justified. Strong nolintlint enforcement is required to maintain nolint hygiene and prevent hiding security or resource linter regressions.

What Go code issues can golangci-lint prevent before shipping?

golangci-lint can prevent Go code issues including bugs, unsafe patterns, style problems, security vulnerabilities, and resource leaks. It enforces code quality by running prioritized linter categories to catch these regressions before they ship.

Can I run specific linters selectively with golangci-lint?

Yes, golangci-lint supports selective runs, allowing you to target specific linters or paths. This operationalizes the lint workflow for normal development, CI integration, and auto-fix modes while maintaining consistent code quality checks.