go-linters

go-linters is a skill for Claude Code, Codex from github/gh-aw. It costs 17 tokens per session (1,137 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,761 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 1,137 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.01137
Opus 5.5 $0.00007 $0.00455
Sonnet 5.5 $0.00003 $0.00227
Haiku 4.5 $0.00002 $0.00114

Measured 5d ago against content hash 213269c7da97, 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 5d 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 · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 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/....

Performance tiers

  • Analyzers are fast by default. Add a new analyzer to slowAnalyzers in pkg/linters/tiers.go (with a reason) when profiling shows ≥ ~0.3s per full run, or when it requires pkg/linters/internal/parentmap.
  • Profile: /tmp/gh-aw-linters -cpuprofile=/tmp/lint.prof ./cmd/... ./pkg/... then go tool pprof -top -cum /tmp/lint.prof.
  • Run one tier: make golint-custom-fast, make golint-custom-slow, or make golint-custom LINTER_TIER=fast LINTER_FLAGS="...".
  • When enforcing an analyzer in CI, add its flag to the lint-go-custom step matching its tier, in both native and wasm steps.
  • Reuse shared prerequisites (parentmap.Analyzer via analyzerutil.New(..., parentmap.Analyzer)) instead of rebuilding whole-file maps; avoid per-call walks over every file in the package.

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:

Read the full file on GitHub · 114 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. 5d ago Changed · +8 lines 213269c7da97
  2. 1mo ago Changed · +35 lines 9c18421e280a
  3. 3mo 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,761 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 1,137 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

go-linters compared with skills from other repositories

go-linters next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-lintersgithub/gh-awSkill5.8ktodayMITA17Claude Code, Codex
golang-troubleshootingsamber/cc-skills-golangSkill4.0ktodayMITA175Claude Code
golang-error-handlingsamber/cc-skills-golangSkill4.0ktodayMITA144Claude Code
tree-sitter-language-pack-parsing-sourcexberg-io/tree-sitter-language-packSkill4893d agoMITA48Claude Code
sentry-go-sdkgetsentry/sentry-for-aiSkill283todayMITA78Claude Code
pi-loop-forensicsdimetron/pi-goSkill233yesterdayMITA65Claude Code, Codex
nightly-session-watchdimetron/pi-goSkill233yesterdayMITA78Claude Code, Codex