go-linters
Skill5.3k starsChanged 6 months agoMITView on GitHub
Add and validate custom Go analysis linters in gh-aw.
Trending
Quiet since March.thin dataabout the whole repository
Who's talking about github/gh-aw
- A Hacker News story“GitHub Agentic Workflows”Hacker News · Feb 11, 2026 · 2 points
- @kcieslak.io“We see that a lot in our OSSed AW repository which uses fully agentic development - github.com/github/gh-aw …”Bluesky · Mar 24, 2026 · 1 likes
- @github-trending.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 github / gh-aw ⭐ 2,482 (+213) 🗒 Go GitHub Agentic Workflows”Bluesky · Feb 15, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/src/content/docs/engines/claude.mdCLAUDE.md
- pkg/workflow/data/engines/claude.mdCLAUDE.md
- .squad/templates/copilot-instructions.mdCopilot instructions
- playwright-cliSkill
- agentic-workflowsSkill
- awf-release-integratorSkill
- checkout-credential-reviewSkill
- console-renderingSkill
- copilot-reviewSkill
- create-canvasSkill
- custom-agentsSkill
- custom-engine-implementationSkill
- debugging-workflowsSkill
- developer-code-organizationSkill
- developer-internalsSkill
- developer-releaseSkill
- developer-securitySkill
- developerSkill
- documentationSkill
- error-messagesSkill
- error-pattern-safetySkill
- error-recovery-patternsSkill
- gh-agent-sessionSkill
- gh-agent-taskSkill
- github-copilot-agent-tips-and-tricksSkill
- github-discussion-querySkill
- github-issue-querySkill
- github-labels-querySkill
- github-mcp-serverSkill
- github-pr-querySkill
- github-scriptSkill
- github-workflows-querySkill
- go-codemodSkill
- http-mcp-headersSkill
- javascript-refactoringSkill
- jqschemaSkill
- messagesSkill
- npmSkill
- open-pull-requestSkill
- operational-value-designerSkill
- optimize-agentic-workflowSkill
- otel-queriesSkill
- pr-finisherSkill
- prompt-token-efficiencySkill
- pr-to-go-linterSkill
- reportingSkill
- resolve-merge-conflictsSkill
- restricted-tool-triageSkill
- review-agentic-workflowsSkill
- security-advisory-compat-enforcerSkill
- sergo-examplesSkill
- skillz-integrationSkill
- ssl-skill-normalizerSkill
- temporary-id-safe-outputSkill
- workflow-step-summariesSkill
- GitHub Agentic WorkflowsSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this guide when adding a new custom Go analysis linter in this repository.
- Very specific: line 14
Create a new package under pkg/linters/<linter-name>/.
- Very specific: line 16
Add tests in the same package using analysistest with fixtures under testdata/src/....
- Distinctive: line 21
Test only your linter package:
- Distinctive: line 25
Run all custom linters across the repo:
- Distinctive: line 62
Before submitting a linter, check expression-shape assertions for parenthesis unwrapping and verify its node filter covers relevant …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go Linters
Use this guide when adding a new custom Go analysis linter in this repository.
For PR-driven linter generation (derive a rule from a specific pull request pattern), use .github/skills/pr-to-go-linter/SKILL.md.
Where to add a new linter
- Create a new package under
pkg/linters/<linter-name>/. - Define an analyzer in that package (exported as
Analyzer). - Add tests in the same package using
analysistestwith fixtures undertestdata/src/.... - Register the analyzer in
cmd/linters/main.goso it runs via the multichecker binary.
Build and test linters
- Test only your linter package:
go test ./pkg/linters/<linter-name>/...
- Build the custom linter runner:
go build ./cmd/linters
- Run all custom linters across the repo:
make golint-custom
make golint-custom builds cmd/linters and runs it against ./cmd/... and ./pkg/....
Common AST pitfalls
Unwrap parenthesized expressions
Expressions wrapped in parentheses appear as *ast.ParenExpr. Unwrap expressions before
asserting their AST type or comparing identifiers, so forms such as (nil) and (err) are
handled like nil and err. Use the shared helper:
if ident, ok := astutil.UnwrapParenExpr(expr).(*ast.Ident); ok && ident.Name == "nil" {
// Handle nil.
}Match all relevant statement shapes
Semantically similar calls can appear in different statement nodes. A call that discards a
result may be a bare *ast.ExprStmt or part of an *ast.AssignStmt; filtering only for one
shape misses the other. Include and handle each relevant node shape:
nodeFilter := []ast.Node{(*ast.AssignStmt)(nil), (*ast.ExprStmt)(nil)}
return analyzerutil.Preorder(pass, nodeFilter, func(n ast.Node) {
switch stmt := n.(type) {
case *ast.AssignStmt:
analyzeAssign(stmt)
case *ast.ExprStmt:
analyzeExpr(stmt)
}
})Before submitting a linter, check expression-shape assertions for parenthesis unwrapping and verify its node filter covers relevant equivalent syntax forms.
Coverage-aware perf gating
For linters that flag micro-optimizations (allocation/perf rules), only apply them on lines that
tests actually exercise — "hot paths" — rather than on dead or rarely-executed code where the
optimization brings no measurable benefit. Use the shared pkg/linters/internal/coverage package:
In your analyzer file, register a
-hot-thresholdflag ininit()(not as a var initializer, to avoid anAnalyzer/run/flag initialization cycle):var hotThreshold *int func init() { hotThreshold = coverage.RegisterHotThresholdFlag(Analyzer) }Immediately before reporting a diagnostic, gate it with
coverage.ShouldApply:if !coverage.ShouldApply(pass, node.Pos(), *hotThreshold) { return }
coverage.ShouldApply is permissive by default: when no coverage profile is loaded via the
GH_AW_LINT_COVERAGE_PROFILE environment variable, or when hot-threshold is 0, it always
returns true, preserving pre-coverage-aware behavior. Only wire this into linters whose fix has
a genuine performance rationale (extra allocations, O(n²) behavior, etc.) — purely
readability/style linters should not be coverage-gated.
Generating the coverage profile
go test -covermode=count -coverprofile=/tmp/coverage.out ./...
export GH_AW_LINT_COVERAGE_PROFILE=/tmp/coverage.out
make golint-customThis profile is read once per linter-runner process. To lint only a specific subtree, scope
the go test and golint-custom commands to the same package path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

