| name | lint |
| description | Run golangci-lint and static analysis on Go code. Use before pushing or to check code quality. |
| disable-model-invocation | false |
| argument-hint | package-path |
Go Linting
Run golangci-lint to check code quality and catch issues before CI.
Usage
/lint - Lint all packages
/lint ./internal/repo/... - Lint a specific package
Steps
-
Run golangci-lint
golangci-lint run $ARGUMENTS 2>&1
If no arguments provided, run on all packages:
golangci-lint run ./... 2>&1
-
If golangci-lint is not installed, install it:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
Then re-run step 2.
-
Parse and report findings
Group issues by severity and file:
## Lint Results
### Errors
- [list of errors with file:line references]
### Warnings
- [list of warnings with file:line references]
### Summary
- Total issues: N
- Files affected: N
-
Offer to fix auto-fixable issues
If issues are auto-fixable, offer to run:
golangci-lint run --fix $ARGUMENTS 2>&1
Configuration
The project uses .golangci.yml in the repo root. Read this file to understand which linters are enabled/disabled before interpreting results.
Current exclusions:
internal/codesearch/ - excluded from linting and formatting (forked upstream code)
CI Alignment
The CI pipeline runs golangci-lint, go vet ./..., and gosec (see /security-scan skill).
Running /lint locally before pushing catches most CI failures.