go-linting

go-linting is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 44 tokens per session (653 once invoked), scanned A, original, Apache-2.0.

A Go code-checking skill that uses gofmt to format code, go vet to find likely mistakes, and golangci-lint to report style problems. It follows the project's existing linter settings and asks before applying changes.

In plain words
What is it for?
It is for checking Go files, reviewing reported problems by file and line, and applying formatting or approved automatic fixes.
Why use it?
It removes the need to remember several Go checks and helps identify formatting, style, and possible correctness issues before code is shared or deployed.

Skill for Claude CodeCodex

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

Good fit It is for checking Go files, reviewing reported problems by file and line, and applying formatting or approved automatic fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/go-linting
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 abdullahkhawer/devops-skills --skill go-linting
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

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-linting

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/go-linting/github.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/go-linting)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/go-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/go-linting/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-linting

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/go-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/go-linting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 653 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.
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.00044 $0.00653
Opus 5.5 $0.00018 $0.00261
Sonnet 5.5 $0.00009 $0.00131
Haiku 4.5 $0.00004 $0.00065

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

Security

Grade A, and why

go-linting 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 23d 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.

skills/go-linting/SKILL.md · 87 lines

How it starts

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

Go Linting Skill

Run this skill when asked to lint, format, or check style for Go code.

Step 1 — Detect available tooling

which golangci-lint go 2>/dev/null
ls .golangci.yml .golangci.yaml 2>/dev/null

If golangci-lint is not installed, inform the user and ask before installing:

brew install golangci-lint

gofmt and go vet ship with the Go toolchain, so no separate install is needed for those.


Step 2 — Run formatting check

gofmt -l .

This lists files that are not correctly formatted (empty output means everything is formatted). Show the diff for any listed file:

gofmt -d <file>

Step 3 — Run vet (correctness checks)

go vet ./...

Step 4 — Run the linter

golangci-lint run ./...

Respect the project's .golangci.yml/.golangci.yaml if present — do not pass extra flags that override its enabled/disabled linters.

Report all findings grouped by file, with line numbers and linter names.


Step 5 — Apply fixes (only with user confirmation)

gofmt -w <file>
golangci-lint run --fix ./...

Only run auto-fix commands after showing the user what will change and getting explicit confirmation. go vet findings and most golangci-lint findings require manual code changes — present each with a suggested fix.


Standard conventions enforced

  • Formatting is always gofmt-compliant — this is non-negotiable in Go and never a matter of style preference.
  • Package names: short, lowercase, no underscores.
  • Exported identifiers (PascalCase) must have a doc comment starting with the identifier's name.
  • Errors are returned, not panicked, except at true program-fatal boundaries; always check if err != nil.
  • No unused imports or variables (enforced by the compiler itself, but golangci-lint catches shadowed/ignored errors too).

Rules

  • NEVER install golangci-lint without asking the user first.
  • Always run in check mode first — only apply --fix/-w after the user confirms.
  • Respect the project's existing .golangci.yml — do not suggest a different linter set without asking.
  • Report the exact command run and its full output — do not summarize away findings.
  • Flag any ignored error (_ = someFunc() where the error matters) or unchecked type assertion as a correctness finding, even if the linter configuration does not flag it.

Read the full file on GitHub · 87 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. 23d ago First seen · 87 lines · 44 tokens per session scan A db731bf51228

Subscribe to this mod's changes

go-linting is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 24d ago), licensed Apache-2.0. It adds 44 tokens to every session and 653 once invoked, about $0.0002 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-09-23.