Go Linting
Identifies potential code errors and style issues in various programming languages using cxuu's go-linting tool.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add go-linting npx -- -y @trustedskills/go-linting
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"go-linting": {
"command": "npx",
"args": [
"-y",
"@trustedskills/go-linting"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables AI agents to identify potential errors and style issues in Go code using golangci-lint. It leverages a configurable set of linters to enforce consistent coding standards, catch common mistakes, and improve overall code quality. The tool prioritizes consistency over strict adherence to any single linter's ruleset.
When to use it
- When ensuring code adheres to project style guidelines.
- Before committing code changes to a repository.
- As part of an automated CI/CD pipeline for continuous code analysis.
- To identify and address potential security vulnerabilities in Go applications (with the
goseclinter). - When refactoring existing Go codebases to improve maintainability.
Key capabilities
- Runs a suite of linters including
errcheck,goimports,revive,govet, andstaticcheck. - Supports configuration via
.golangci.ymlfiles, allowing customization of enabled linters and their settings. - Provides guidance on resolving linting errors category by category (formatting, vet, then style).
- Includes example configurations for common scenarios.
- Offers recommendations for additional linters to enhance code quality and security.
Example prompts
- "Run the Go linter on this file:
main.go." - "Analyze the entire project directory for linting issues."
- "Check if these changes introduce any new linting errors."
Tips & gotchas
- A
.golangci.ymlconfiguration file is required in the project root. The skill provides an example to use as a baseline. - When suppressing linting warnings using
//nolint, always include a justification for why the warning is being ignored. - For optimal results, run linters consistently across the entire codebase.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.