go-linter-fixer

star 2

Run golangci-lint on Go code and fix any issues found. Use after writing or modifying Go code, or when the user explicitly requests linting.

lestrrat By lestrrat schedule Updated 3/21/2026

name: go-linter-fixer description: Run golangci-lint on Go code and fix any issues found. Use after writing or modifying Go code, or when the user explicitly requests linting.

Run golangci-lint run <target> > .tmp/golangci-lint.txt 2>&1 (default target ./...), then Read/Grep the output file. Respect existing .golangci.yml.

Fix order (safest first)

  1. Formatting/style — unused imports/variables, comments, gofmt
  2. Error handling — unchecked errors, wrapping with %w
  3. Code quality — unnecessary conversions, dead code

Rules:

  • Minimal, targeted changes. Preserve original logic.
  • NEVER commit or run git commands.
  • Do NOT auto-fix if it might change behavior or involves security/architecture. Report those and ask user.

Verify

Re-run golangci-lint run after fixes. If new issues appear from your changes, fix them.

Report

Linting: X found, Y fixed, Z need manual review
Files modified: [list]
Remaining: [unfixed issues with recommendations]
Install via CLI
npx skills add https://github.com/lestrrat/claude-code --skill go-linter-fixer
Repository Details
star Stars 2
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator