Official agent skill

Go Linters

by github in github/gh-aw

Add and validate custom Go analysis linters in gh-aw. An agent skill from github/gh-aw.

OfficialMITAuto-check passedDevelopment

Install Go Linters

skills CLI
$ npx skills add github/gh-aw --skill go-linters -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/gh-aw go-linters --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/gh-aw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/go-linters .claude/skills/go-linters && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
go-linters
GitHub stars
5.4k
Token cost
~922 tokens
SKILL.md length
379 words
Files
1
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Add and validate custom Go analysis linters in gh-aw. An agent skill from github/gh-aw.

  • Works in 4 steps: Create a new package under pkg/linters//. → Define an analyzer in that package… → Add tests in the same package using… → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers Where to add a new linter, Build and test linters, Common AST pitfalls and Coverage-aware perf gating
  • Calls go and make

What it does

Go Linters is an agent skill from github/gh-aw, published by the product's own GitHub organization. Add and validate custom Go analysis linters in gh-aw.

Its SKILL.md is about 920 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. It works with GitHub. The repository describes itself as: GitHub Agentic Workflows. The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/go-linters”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Create a new package under pkg/linters//.
  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.

What it can do on your machine

Read from SKILL.md and the folder at commit a4ca9f2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Go Linters loads about 922 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 379 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~922

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/gh-aw at commit a4ca9f2, republished under its MIT licence (© github). 379 words, ~922 tokens.

Download SKILL.mdSave it as .claude/skills/go-linters/SKILL.md (or your agent's skills folder).
name
go-linters
description
Add and validate custom Go analysis linters in gh-aw.

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:

go
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:

go
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.

Show full SKILL.md (168 more words)Show less

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:

  1. In your analyzer file, register a -hot-threshold flag in init() (not as a var initializer, to avoid an Analyzer/run/flag initialization cycle):

    go
    var hotThreshold *int
    
    func init() {
        hotThreshold = coverage.RegisterHotThresholdFlag(Analyzer)
    }
  2. Immediately before reporting a diagnostic, gate it with coverage.ShouldApply:

    go
    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
bash
go test -covermode=count -coverprofile=/tmp/coverage.out ./...
export GH_AW_LINT_COVERAGE_PROFILE=/tmp/coverage.out
make golint-custom

This 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.

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/go-linters of github/gh-aw.

Open the folder on GitHubat commit a4ca9f2

Compare with similar skills

Go Linters next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Go Linters compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Go Linters this skillgithub/gh-aw5.4k—~922Automated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k1 repos~2.2kAutomated safety check: PassMIT
Add Opik Code Quality Hookcomet-ml/opik22k—~2.3kAutomated safety check: PassApache-2.0
Mnemosyne Contextmnemosyne-oss/mnemosyne3.4k—~2.6kAutomated safety check: PassMIT
Create PRRLinf/RLinf5.5k—~2.2kAutomated safety check: PassApache-2.0
Rust Hygiene Audittsz-org/tsz577—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Checklist for wiring a new linter into Opik's Code Quality pipeline: the four files to edit, the silent-failure gotchas and the pass/fail verification loop.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Mnemosyne Context

    mnemosyne-oss/mnemosyne

    Load this when working on the mnemosyne memory system — its repo, sync server, memory databases, or CI.

    3.4k GitHub stars~2.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Create PR

    RLinf/RLinf

    Open a GitHub pull request for RLinf, or fix an existing one — checks the PR title against Conventional Commits, writes a precise description that follows .github/PULLREQUESTTEMPLATE.md, and lints…

    5.5k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Run a deep DRY + code-hygiene audit of the Rust workspace and turn the findings into verified, deduplicated, hierarchical GitHub tech-debt issues.

    577 GitHub stars~1.5k tokensUpdated 28 days ago
    DevelopmentAuto-check passed
  • Release

    hyhmrright/brooks-lint

    Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG…

    1.5k GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from github/gh-aw

All 52 skills in this repo
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.4k GitHub starsUsed in 24 repos~2.8k tokens
    Auto-check passed
  • Official

    Designs and verifies a deterministic grader that measures whether a GitHub Agentic Workflow run reached its real-world or repository outcome.

    5.4k GitHub stars~6.8k tokensUpdated today
    Auto-check passed
  • Official

    Scaffolds, edits, reloads and debugs a canvas extension that the GitHub Copilot CLI can open in its side panel.

    5.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Official

    Drives an open pull request to merge-ready from inside a GitHub Copilot cloud agent, resolving review threads and local checks concurrently, without merging or retriggering CI.

    5.4k GitHub stars~3.8k tokensUpdated today
    Auto-check: warnings
  • Official

    Bumps gh-aw's pinned gh-aw-firewall version, rebuilds generated artifacts, and flags upstream spec or schema changes that need follow-up work.

    5.4k GitHub stars~899 tokensUpdated today
    Auto-check passed
  • Official

    Guide to the console struct tag system in gh-aw: headers, titles, number and cost formats, omitempty, and how structs, slices and maps render in the terminal.

    5.4k GitHub stars~736 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Go Linters

What does Go Linters do?

Add and validate custom Go analysis linters in gh-aw. An agent skill from github/gh-aw. Go Linters is an agent skill from github/gh-aw, published by the product's own GitHub organization. Add and validate custom Go analysis linters in gh-aw.

When should I use Go Linters?

Go Linters fits situations like: tasks that involve Linting and formatting.

How do I install Go Linters in Claude Code?

Run `npx skills add github/gh-aw --skill go-linters -a claude-code`. Or copy the skill folder (.github/skills/go-linters in github/gh-aw) into .claude/skills/go-linters in your project. Claude Code loads it when a task matches its description.

How do I install Go Linters in Codex?

Run `npx skills add github/gh-aw --skill go-linters -a codex`. Or copy the skill folder (.github/skills/go-linters in github/gh-aw) into .agents/skills/go-linters in your project. Codex loads it when a task matches its description.

Can I use Go Linters in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/gh-aw --skill go-linters -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-linters, .gemini/skills/go-linters, .github/skills/go-linters and .opencode/skills/go-linters in your project.

What does Go Linters need to run?

Going by SKILL.md and its folder, Go Linters needs the command-line tools its instructions call (go and make).

Does Go Linters access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Go Linters safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Go Linters use?

Go Linters is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Go Linters use?

About 922 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Go Linters?

Skills that share tags, products or a category with Go Linters: Summarise Ecosystem Results (astral-sh/ruff, 50k stars), Add Opik Code Quality Hook (comet-ml/opik, 22k stars), Mnemosyne Context (mnemosyne-oss/mnemosyne, 3.4k stars) and Create PR (RLinf/RLinf, 5.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Go Linters?

github (a GitHub organization, an official publisher) maintains it in github/gh-aw, which has 5,359 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 8, 2026.

Source: github/gh-aw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.