# Strengthen Go Projects with golangci-lint

Go teams often struggle to choose linters, understand warnings, and manage legacy backlogs. This skill provides practical golangci-lint configuration, triage, suppression, and cleanup guidance.

## Install

```bash
npx skillstore add samber/golang-lint
```

## Metadata

- Status: approved
- Slug: samber-golang-lint
- Version: 1.4.1
- Author version: 1.4.1
- Skillstore revision: r1
- Version status: valid
- Tree hash: e23c446f5cbaf5c84a15a63fba63cf8c9b0cd5924fd85c87fc8df624f79312b1
- Author: samber
- GitHub username: samber
- License: MIT
- Repository: https://github.com/samber/cc-skills-golang/tree/22c58a55a0a799b901aa251172923180bad9e010/skills/golang-lint
- Ref: e5464e662405de6361fdde6b984f9ea865635f64
- Supported tools: Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem, network
- Quality score: 72
- Public page: https://skillstore.pages.dev/skills/samber-golang-lint
- Manifest: https://skillstore.pages.dev/api/skills/samber-golang-lint/manifest

## Capabilities

- Creates golangci-lint v2 configurations with selected linters, formatters, timeouts, and settings.
- Explains lint findings and recommends whether to fix or suppress each issue.
- Writes specific nolint directives with linter names and justification comments.
- Prioritizes linters for correctness, security, style, performance, testing, and modernization.
- Plans incremental and parallel cleanup for large legacy Go repositories.

## Use Cases

- Configure a New Project: Create a balanced golangci-lint v2 configuration with practical defaults and documented exclusions.
- Triage Existing Warnings: Classify lint findings, fix defects, and add justified suppressions only for verified false positives.
- Adopt Linting Incrementally: Plan staged cleanup that protects new code while reducing a large legacy warning backlog.

## Prompt Templates

### Explain One Warning

```
Explain this golangci-lint warning: [warning]. Tell me what it means and whether I should fix or suppress it.
```

### Create a Lint Configuration

```
Create a golangci-lint v2 configuration for [project type]. Prioritize correctness and security, set practical thresholds, and explain each choice.
```

### Review Suppressions

```
Review the nolint directives in my Go changes. Identify unsafe suppressions and propose specific directives with clear justifications.
```

### Plan Legacy Cleanup

```
Design an incremental lint adoption plan for [repository details]. Group independent work, protect new code, and define verification steps.
```

## Limitations

- Does not build GitHub Actions pipelines; it refers that work to a separate continuous integration skill.
- Requires Go and golangci-lint to run checks or apply fixes.
- Suggested linter sets still need project-specific validation.
- Automatic fixes can change source files and still require review.

## Best Practices

- Run lint checks after significant changes and before merging.
- Fix root causes before adding scoped suppressions with explanations.
- Pin the golangci-lint version and review all automatic changes.

## Anti Patterns

- Do not use bare nolint directives without a linter name and reason.
- Do not suppress security or resource findings without strong evidence.
- Do not apply automatic fixes across a repository without reviewing the diff.

## Security Audit

- Audited at: 2026-09-06T11:53:32.974\+00:00
- Summary: All 55 static alerts are false positives caused by Markdown, comments, standard configuration paths, defensive security terminology, or repository metadata. One medium-risk semantic issue remains: the installation guidance fetches an unpinned latest executable.

## Stats

- Views: 0
- Downloads: 2
- Favorites: 0
- Popularity score: 0
