go-code-audit

go-code-audit is a skill for Claude Code, Codex from gopherguides/gopher-ai. It costs 84 tokens per session (1,117 once invoked), scanned A, original, MIT.

A review tool for Go source code that checks whether it follows common Go practices and is easy to maintain. It reports code smells, anti-patterns, naming issues, package-structure problems, and error-handling concerns.

In plain words
What is it for?
Auditing a Go project, reviewing code changes, finding non-idiomatic Go, and checking areas such as interfaces, goroutines, errors, package structure, global state, and overly complex functions.
Why use it?
It helps find design and quality problems that ordinary compilation or linting may not reveal. Findings are grouped so larger issues can be addressed first.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .github/skills/scripts/audit.sh.

Good fit Auditing a Go project, reviewing code changes, finding non-idiomatic Go, and checking areas such as interfaces, goroutines, errors, package structure, global state, and overly complex functions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gopherguides/gopher-ai
agentmods
npx agentmods add skills/gopherguides/gopher-ai/go-code-audit

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-code-audit

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gopherguides/gopher-ai/go-code-audit"><img src="https://agentmods.dev/badge/skills/gopherguides/gopher-ai/go-code-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00084 $0.01117
Opus 5.5 $0.00034 $0.00447
Sonnet 5.5 $0.00017 $0.00223
Haiku 4.5 $0.00008 $0.00112

Measured 2mo ago against content hash 8731b79298d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-code-audit scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Authorization: Bearer $GOPHER_GUIDES_API_KEY" \
agent-skills/skills/go-code-audit/SKILL.md · 159 lines

How it starts

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

Go Code Audit

Comprehensive code quality analysis against Go best practices. Identifies code smells, anti-patterns, and non-idiomatic patterns with categorized findings.

What It Checks

Idiomatic Go Patterns

  • Proper use of interfaces (accept interfaces, return structs)
  • Channel and goroutine patterns
  • Error wrapping with %w and sentinel errors
  • Use of context.Context as first parameter
  • Functional options pattern where appropriate

Naming & Style

  • Package naming (short, lowercase, no underscores)
  • Exported name stuttering (user.UserService → user.Service)
  • Acronym consistency (URL, HTTP, ID)
  • Variable scope and naming length conventions

Package Structure

  • internal/ usage for non-public packages
  • Circular dependency detection
  • Package cohesion (single responsibility)
  • cmd/ and pkg/ conventions

Error Handling

  • Unchecked errors (errcheck patterns)
  • Bare log.Fatal in library code
  • Panics in recoverable code paths
  • Error wrapping without context

Code Smells

  • Global mutable state
  • init() function overuse
  • Empty interfaces where concrete types suffice
  • Overly complex functions (cyclomatic complexity)
  • Dead code and unused exports

How to Run

API Integration (Optional)

If GOPHER_GUIDES_API_KEY is set, verify it:

curl -s -H "Authorization: Bearer $GOPHER_GUIDES_API_KEY" \
  https://gopherguides.com/api/gopher-ai/me

If not set, local analysis tools (go vet, staticcheck, golangci-lint) still provide comprehensive analysis. Set the key for enhanced API-powered insights. Get your key at gopherguides.com.

Full Project Audit

Analyze the entire Go project:

# Run static analysis tools
go vet ./...
staticcheck ./...
golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 ./...

Then review the codebase for patterns the tools don't catch:

  1. Read each package's exported API — check for stuttering, interface bloat, and naming
  2. Trace error paths — ensure all errors are wrapped with context
  3. Review concurrency — check goroutine lifecycle management
  4. Check test coverage — identify untested critical paths

Read the full file on GitHub · 159 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. 2mo ago First seen · 159 lines · 84 tokens per session scan A 8731b79298d5

Subscribe to this mod's changes

go-code-audit is a skill published in the GitHub repository gopherguides/gopher-ai (21 stars, last pushed 4d ago), licensed MIT. It adds 84 tokens to every session and 1,117 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

go-code-audit compared with skills from other repositories

go-code-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-code-auditgopherguides/gopher-aiSkill214d agoMITA84Claude Code, Codex
pr-to-go-lintergithub/gh-awSkill5.6kyesterdayMITA22Claude Code, Codex
golang-refactoringsamber/cc-skills-golangSkill3.8k5d agoMITA220Claude Code
go-spec-reviewerspf13/go-skillsSkill697yesterdayMITA99Claude Code
design-reviewdimetron/pi-goSkill2223d agoMITA30Claude Code, Codex
agents-mddimetron/pi-goSkill2223d agoMITA138Claude Code, Codex
ring:verifying-codeLerianStudio/ringSkill2186d agoApache-2.0A101Cursor