go-linters

go-linters is a skill for Claude Code, Codex from github/gh-aw. It costs 17 tokens per session (918 once invoked), scanned A, original, MIT.

A development guide for adding custom Go code-analysis linters to gh-aw. A linter is a tool that checks source code for specific mistakes or patterns.

In plain words
What is it for?
Use it to create a Go analyzer, add test fixtures, build the linter runner, run custom linters, and apply coverage-aware performance checks.
Why use it?
It describes where to place the linter, how to test and register it, and how to run the repository's checks consistently.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create a Go analyzer, add test fixtures, build the linter runner, run custom linters, and apply coverage-aware performance checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/github/gh-aw/go-linters
About the project

GitHub Agentic Workflows is a GitHub CLI extension that lets developers define AI-assisted repository automation in Markdown and run it through GitHub Actions. It is intended for tasks requiring interpretation or reasoning, such as issue triage, pull-request review, CI investigation, documentation maintenance, and dependency analysis. The catalogue entries provide skills and agents for working with these workflows.

github/gh-aw · 5,406 stars · on GitHub · gh.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add github/gh-aw --skill go-linters
Clone the repo
git clone --depth 1 https://github.com/github/gh-aw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-linters

README.md
[![agentmods](https://agentmods.dev/badge/skills/github/gh-aw/go-linters/github.svg)](https://agentmods.dev/skills/github/gh-aw/go-linters)
Your own site
<a href="https://agentmods.dev/skills/github/gh-aw/go-linters"><img src="https://agentmods.dev/badge/skills/github/gh-aw/go-linters/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-linters

Your own site · 80×15
<a href="https://agentmods.dev/skills/github/gh-aw/go-linters"><img src="https://agentmods.dev/badge/skills/github/gh-aw/go-linters.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 10
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00918
Opus 5.5 $0.00007 $0.00367
Sonnet 5.5 $0.00003 $0.00184
Haiku 4.5 $0.00002 $0.00092

Measured 13d ago against content hash 9c18421e280a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-linters scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/go-linters/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Create a new package under pkg/linters/<linter-name>/.
  2. Define an analyzer in that package (exported as Analyzer).
  3. Add tests in the same package using analysistest with fixtures under testdata/src/....
  4. Register the analyzer in cmd/linters/main.go so 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.

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago Changed · +35 lines 9c18421e280a
  2. 1mo ago First seen · 71 lines · 17 tokens per session scan A fcb4998e73fc

Subscribe to this mod's changes

go-linters is a skill published in the GitHub repository github/gh-aw (5,406 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 918 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

stack-trace-go-probe

Internal helper for meta-stack-trace-investigator. Use when a Go panic or stack trace needs Go-specific nil/error checks, go test reproducer guidance, and patch targets.

opensquilla/opensquilla · 42 tokens

golang-error-handling

Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log…

samber/cc-skills-golang · 144 tokens

tree-sitter-language-pack-extracting-code-structure

Use when the user wants structured code metadata from a source file — functions, classes, imports, exports, symbols, docstrings, comments, or syntax diagnostics. Covers ts-pack process feature flags, the JSON result shape, and the default feature set.

xberg-io/tree-sitter-language-pack · 52 tokens

go-concurrency-patterns

Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.

rmyndharis/antigravity-skills · 37 tokens

tree-sitter-language-pack-parsing-source

Use when the user wants a tree-sitter syntax tree for a source file — an s-expression dump or JSON tree. Covers ts-pack parse, language auto-detection vs --language, stdin input, and reading haserrors.

xberg-io/tree-sitter-language-pack · 48 tokens