Automated summary
Set up golangci-lint for a Go project with a configuration that balances code quality and development speed.
Strengths
- Parallel linter execution with caching (5x faster than individual linters)
- 90+ linters covering bugs, performance, style, and security
- Highly customizable via YAML configuration
- CI/CD integration ready (GitHub Actions, GitLab CI, pre-commit)
Limitations
- Requires golangci-lint installed (v2.4.0+)
- Default configuration may be too strict for some projects
- Does not replace thorough manual code review
When you want automated, consistent code quality enforcement across your Go codebase.
If you already have a suitable linting setup or if flexibility matters more than strict rules.
Security analysis
SafeThe skill provides instructions for copying a configuration file, running golangci-lint, and integrating with CI/CD. No destructive or obfuscated commands, no data exfiltration, no suppression of security features. All operations are standard development setup.
No concerns found
How this analysis is madeExamples
Set up golangci-lint in my Go project with a sensible default configuration and CI integration.Update my .golangci.yml to use the latest best practices and enable all useful linters.name: golangci-lint description: Initialize or update golangci-lint configuration for Go projects with comprehensive code quality checks, static analysis, and best practices enforcement
golangci-lint Setup Skill
Configure professional-grade linting for Go projects with sensible defaults that balance code quality with pragmatic development.
Overview
golangci-lint is a fast, parallel linter aggregator for Go that runs 90+ linters simultaneously. It's the industry standard for Go code quality enforcement.
Benefits:
- Speed: Runs linters in parallel with caching (5x faster than individual linters)
- Comprehensive: 90+ linters covering code quality, bugs, performance, and style
- Configurable: Highly customizable via YAML configuration
- CI/CD Ready: Seamless integration with GitHub Actions, GitLab CI, and pre-commit hooks
- Editor Integration: Works with VS Code, GoLand, Vim, and Emacs
This skill provides a battle-tested configuration (in assets/.golangci.yml) optimized for golangci-lint v2.4.0+ that enables all linters by default while disabling overly strict or opinionated ones.
Prerequisites
- Go installed: Go 1.21+ recommended (
go version) - golangci-lint installed: Version 2.4.0+
- macOS:
brew install golangci-lint - Other:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - Verify:
golangci-lint --version
- macOS:
- Go module: Project uses Go modules (
go.modexists)
Instructions
Step 1: Verify Project Setup
# Verify Go module
ls go.mod
# Check for existing config
ls -la .golangci.yml .golangci.yaml
# Verify installation (should be version >=2)
golangci-lint --version
Step 2: Copy Configuration File
Copy the base configuration from assets:
# Copy template to project root
cp assets/.golangci.yml .golangci.yml
The asset configuration follows these principles:
- Enable all by default: Maximum coverage with
default: all - Disable the noisy: Removes linters that are too opinionated or project-specific
- Pragmatic over perfect: Balances quality with development velocity
- Project-agnostic: Works for most Go projects out of the box
Step 3: Run Initial Lint Check
Test the configuration:
# Run linter on entire project
golangci-lint run ./...
# Verbose output to see active linters
golangci-lint run -v ./...
# Test specific linter
golangci-lint run --disable-all --enable=govet ./...
Step 6: Integrate with CI/CD
GitHub Actions
Already configured if using the github-workflows skill. Otherwise:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v2.4.0
args: --timeout=5m
GitLab CI
lint:
stage: test
image: golangci/golangci-lint:v2.4.0
script:
- golangci-lint run -v ./...
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Taskfile Integration
version: '3'
tasks:
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run --timeout=5m ./...
lint:fix:
desc: Run with auto-fix
cmds:
- golangci-lint run --fix --timeout=5m ./...
Pre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v2.4.0
hooks:
- id: golangci-lint
args: [--timeout=5m]
Step 7: Document in README
Add to your project's README.md:
## Code Quality
This project uses [golangci-lint](https://golangci-lint.run) for code quality enforcement.
**⚠️ All linting issues MUST be fixed before pushing commits.**
### Running the Linter
```bash
# Check for issues
golangci-lint run ./...
# Auto-fix where possible
golangci-lint run --fix ./...
Pre-commit Checklist
- ✅ Run
golangci-lint run ./... - ✅ Fix all reported issues
- ✅ Ensure tests pass:
go test ./... - ✅ Commit and push
CI automatically checks all PRs. PRs with linting errors will be blocked.
### Step 8: Configure Editor Integration
#### VS Code
Install [Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go) and add to `settings.json`:
```json
{
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"go.lintOnSave": "workspace"
}
GoLand/IntelliJ IDEA
- Settings → Tools → File Watchers → Add (+)
- Select "golangci-lint"
- Configure:
golangci-lint run $FileDir$
Vim/Neovim
With ale plugin:
let g:ale_linters = {'go': ['golangci-lint']}
let g:ale_go_golangci_lint_options = '--fast'
Additional Resources
- Official documentation: https://golangci-lint.run
- Configuration reference: https://golangci-lint.run/usage/configuration/
- Linters list: https://golangci-lint.run/usage/linters/
- GitHub repository: https://github.com/golangci/golangci-lint
- Editor integrations: https://golangci-lint.run/usage/integrations/
Expected Output
After using this skill, your project will have:
- Professional
.golangci.ymlconfiguration with 90+ linters - Balanced settings (strict but pragmatic)
- CI/CD integration ready
- Editor integration support
- Fast, cached linting
- Automated code quality enforcement
Your Go code will meet professional quality standards with comprehensive checks for bugs, security issues, performance problems, and best practices.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/golangci-lint-configuration-for-go-mmh8qrku/download' --output '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md.part' && mv '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md.part' '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Prerequisites
- Go installed: Go 1.21+ recommended (
go version) - golangci-lint installed: Version 2.4.0+
- macOS:
brew install golangci-lint - Other:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - Verify:
golangci-lint --version
- macOS:
- Go module: Project uses Go modules (
go.modexists)
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md' && test -s '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/golangci-lint' && cp -R '.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku' '.claude/skills/golangci-lint'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/golangci-lint-configuration-for-go-mmh8qrku'openskills read 'golangci-lint-configuration-for-go-mmh8qrku'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/golangci-lint-configuration-for-go-mmh8qrku/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.