go-lint

Lint Go code with golangci-lint and apply safe auto-fixes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kengou/go-guardian --skill go-lint-kengou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-lint
Source: https://github.com/kengou/go-guardian/tree/main/skills/go-lint
Command: npx skills add https://github.com/kengou/go-guardian --skill go-lint-kengou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Linting Go code often blocks progress when CI or PRs fail on style or correctness issues. go-lint automates running golangci-lint, applies safe fixes (errcheck, gofmt, goimports, misspell), and feeds results back into the learning loop to prevent regressions.

Core Features & Use Cases

  • Lint and auto-fix: run golangci-lint with a safe subset of rules and automatically apply fixes.
  • Learning loop: after fixes, write learning artifacts to the inbox so future sessions benefit from patterns.
  • Use Case: clean a failing CI due to lint errors and simultaneously enrich the knowledge base for ongoing improvements.

Quick Start

Lint the current Go module with golangci-lint, apply safe fixes, and feed the results into the learning inbox.

Frequently Asked Questions about go-lint

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

FAQPage Schema
How do I automatically fix golangci-lint errors in my Go project?

Automatically fix golangci-lint errors by applying safe auto-fixes for rules like errcheck, gofmt, goimports, and misspell directly to your Go code, resolving style and correctness issues without manual edits.

What is the best way to stop my CI pipeline from failing on Go lint issues?

Stop CI pipeline failures by running automated Go linting to apply safe auto-fixes for correctness and style issues before code is merged, preventing regressions from blocking progress.

Do I need a .golangci.yml configuration to lint my Go module?

You do not strictly need a .golangci.yml configuration to lint your Go module since a default config is supported, but a local Go module setup is required for the linter to run.

Can I use this automated Go linting in pre-commit hooks?

Yes, you can use automated Go linting in pre-commit hooks, as it supports local development, CI pipelines, and pre-commit workflows to catch style and correctness issues early.

How does automated Go linting prevent future code quality regressions?

Automated Go linting prevents future regressions by writing learning artifacts to a designated inbox after applying fixes, feeding results back into a learning loop so future sessions benefit from established patterns.