gcon: Skill for Claude Code

.agents/skills/go-code-review/SKILL.md

go-code-review is a skill for Claude Code, Codex from slayer/gcon. It costs 41 tokens per session (810 once invoked), scanned A, original, MIT.

A review guide for Go, a programming language, focused on code style, error handling, concurrency, interfaces, and resource management. It provides checks and points to more detailed guidance for each area.

In plain words
What is it for?
Use it when reviewing Go files, especially code that handles errors, starts goroutines, uses channels or mutexes, defines interfaces, or manages resources.
Why use it?
It helps reviewers spot ignored errors, unsafe goroutine or channel use, resource leaks, and interfaces that make code harder to maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is slayer/gcon's own configuration. It tells Claude Code and Codex how to work on gcon itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gcon configures →

View source ↗ slayer/gcon
Reuse

Borrowing it

Nothing to install: this file belongs to slayer/gcon. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/slayer/gcon/master/.agents/skills/go-code-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/slayer/gcon

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/slayer/gcon/go-code-review"><img src="https://agentmods.dev/badge/skills/slayer/gcon/go-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 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.00041 $0.00810
Opus 5.5 $0.00016 $0.00324
Sonnet 5.5 $0.00008 $0.00162
Haiku 4.5 $0.00004 $0.00081

Measured 13d ago against content hash aee4790fcbe1, 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-review 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.

.agents/skills/go-code-review/SKILL.md · 84 lines

How it starts

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

Go Code Review

Quick Reference

Issue Type Reference
Missing error checks, wrapped errors references/error-handling.md
Race conditions, channel misuse references/concurrency.md
Interface pollution, naming references/interfaces.md
Resource leaks, defer misuse references/common-mistakes.md

Review Checklist

  • All errors are checked (no _ = err)
  • Errors wrapped with context (fmt.Errorf("...: %w", err))
  • Resources closed with defer immediately after creation
  • No goroutine leaks (channels closed, contexts canceled)
  • Interfaces defined by consumers, not producers
  • Interface names end in -er (Reader, Writer, Handler)
  • Exported names have doc comments
  • No naked returns in functions > 5 lines
  • Context passed as first parameter
  • Mutexes protect shared state, not methods

When to Load References

  • Reviewing error return patterns → error-handling.md
  • Reviewing goroutines/channels → concurrency.md
  • Reviewing type definitions → interfaces.md
  • General Go review → common-mistakes.md

Review Questions

  1. Are all error returns checked and wrapped?
  2. Are goroutines properly managed with context cancellation?
  3. Are resources (files, connections) closed with defer?
  4. Are interfaces minimal and defined where used?

Valid Patterns (Do NOT Flag)

These patterns are acceptable and should NOT be flagged as issues:

  • _ = err with reason comment - Intentionally ignored errors with explanation
    _ = conn.Close() // Best effort cleanup, already handling primary error
    
  • Empty interface interface{} - For truly generic code (pre-generics codebases)
  • Naked returns in short functions - Acceptable in functions < 5 lines with named returns
  • Channel without close - When consumer stops via context cancellation, not channel close
  • Mutex protecting struct fields - Even if accessed only via methods, this is correct encapsulation
  • //nolint directives with reason - Acceptable when accompanied by explanation
    //nolint:errcheck // Error logged but not returned per API contract
    
  • Defer in loop - When function scope cleanup is intentional (e.g., processing files in batches)
  • Functional options pattern - type Option func(*T) with With* constructors is idiomatic for configurable types
    func NewServer(addr string, opts ...Option) *Server { ... }
    
  • sync.Pool for hot paths - Acceptable for reducing allocation pressure in performance-critical code
    var bufPool = sync.Pool{New: func() any { return new(bytes.Buffer) }}
    

Read the full file on GitHub · 84 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 84 lines · 41 tokens per session scan A aee4790fcbe1

Subscribe to this mod's changes

go-code-review is a skill published in the GitHub repository slayer/gcon (8 stars, last pushed 16d ago), licensed MIT. It adds 41 tokens to every session and 810 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-10-02.

Related

Other skills, from other repositories

pr-to-go-linter

Generate a new pkg/linters analyzer from a merged or open PR pattern.

github/gh-aw · 22 tokens

golang-refactoring

Golang refactoring — safe, at-scale restructuring of existing Go code: a coverage-adaptive safety net, behavior-preserving transforms (gopls Rename/Extract, gofmt -r, gopatch), the Fowler catalog mapped to Go, breaking import cycles, and small stacked PRs. Apply when a function or type has grown too large, a code…

samber/cc-skills-golang · 220 tokens

design-review

Deep design review of Go codebase — naming, structure, consistency, interfaces, error handling. Scores each dimension and provides actionable fixes.

dimetron/pi-go · 30 tokens

agents-md

Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects. Use this skill whenever the user asks to create, scaffold, bootstrap, update, or review an AGENTS.md (or agent-instructions, CLAUDE.md, repo guide for agents) file in a codebase. Also trigger when the user says "add AGENTS.md", "make this repo…

dimetron/pi-go · 138 tokens

ring:verifying-code

Verifying a Go project: runs every quality check (lint, vet, imports, format, docs, unit, integration, E2E) and returns a single MERGEREADY or NEEDSFIX verdict. Report-only: never fixes anything. Use for a quick pre-merge or pre-PR check outside a full dev-cycle. Skip when not a Go project, when you want a single…

LerianStudio/ring · 101 tokens

go-concurrency-safety

L1 supplement - audits Go-specific concurrency hazards in node client code: map iteration non-determinism, goroutine leaks, mutex ordering, panic boundaries, context cancellation.

PlamenTSV/plamen · 40 tokens