Agent skill

Go Code Review

by cxuu in cxuu/golang-skills

A skill your agent uses when reviewing Go code or checking code against community style standards.

Apache-2.0Auto-check passedDevelopment

Install Go Code Review

skills CLI
$ npx skills add cxuu/golang-skills --skill go-code-review -a claude-code

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

GitHub CLI
$ gh skill install cxuu/golang-skills go-code-review --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/cxuu/golang-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/go-code-review .claude/skills/go-code-review && 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-code-review
GitHub stars
170
Token cost
~2.7k tokens
SKILL.md length
1,029 words
Files
4 (incl. scripts, references, assets)
Skills in repo
20
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when reviewing Go code or checking code against community style standards.

  • Works in 5 steps: Run gofmt -d . and go vet ./... to catch… → Read the diff file-by-file; for each… → Flag issues with specific line… → …
  • Reviewing Go code
  • SKILL.md covers Resource Routing, Review Procedure, Formatting and Documentation, plus 15 more sections
  • Runs Shell scripts from its folder; calls go and bash

What it does

Go Code Review is an agent skill from cxuu/golang-skills. Use when reviewing Go code or checking code against community style standards. Also use proactively before submitting a Go PR or when reviewing any Go code changes, even if the user doesn't explicitly request a style review. Does not cover language-specific syntax — delegates to specialized skills.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts, reference files and assets (for example `assets/review-template.md`, `references/WEB-SERVER.md` and `scripts/pre-review.sh`).

It sits in Development, covering Code review. The repository describes itself as: AI Agent Skills for idiomatic, production-ready Go code, distilled from Google, Uber, Community. The licence is Apache-2.0.

When your agent uses it

  • Reviewing Go code
  • Checking code against community style standards

Example prompts

  • “/go-code-review”

Requirements

  • A Bash shell
  • Pre-approved tools (allowed-tools): Bash(bash:*)

Workflow steps

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

  1. Run gofmt -d . and go vet ./... to catch mechanical issues first
  2. Read the diff file-by-file; for each file, check the categories below in order
  3. Flag issues with specific line references and the rule name
  4. After reviewing all files, re-read flagged items to verify they're genuine issues
  5. Summarize findings grouped by severity (must-fix, should-fix, nit)

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(bash:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • go
    • bash

    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 Code Review loads about 2.7k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 1,029 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from cxuu/golang-skills at commit 91f0c2e, republished under its Apache-2.0 licence (© cxuu). 1,029 words, ~2,731 tokens.

Download SKILL.mdSave it as .claude/skills/go-code-review/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
go-code-review
description
Use when reviewing Go code or checking code against community style standards. Also use proactively before submitting a Go PR or when reviewing any Go code changes, even if the user doesn't explicitly request a style review. Does not cover language-specific syntax — delegates to specialized skills.
allowed-tools
Bash(bash:*)

Go Code Review Checklist

Compatibility: references/WEB-SERVER.md uses log/slog examples that require Go 1.21+.

Resource Routing

  • assets/review-template.md - Use when formatting review output with Must Fix, Should Fix, and Nits sections.
  • scripts/pre-review.sh - Run before manual review to collect gofmt, go vet, and golangci-lint results.
  • references/WEB-SERVER.md - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior.

Review Procedure

Use assets/review-template.md when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping.

  1. Run gofmt -d . and go vet ./... to catch mechanical issues first
  2. Read the diff file-by-file; for each file, check the categories below in order
  3. Flag issues with specific line references and the rule name
  4. After reviewing all files, re-read flagged items to verify they're genuine issues
  5. Summarize findings grouped by severity (must-fix, should-fix, nit)

Validation: After completing the review, re-read the diff once more to verify every flagged issue is real. Remove any finding you cannot justify with a specific line reference.


Formatting

  • gofmt: Code is formatted with gofmt or goimports → go-linting

Documentation

  • Comment sentences: Comments are full sentences starting with the name being described, ending with a period → go-documentation
  • Doc comments: All exported names have doc comments; non-trivial unexported declarations too → go-documentation
  • Package comments: Package comment appears adjacent to package clause with no blank line → go-documentation
  • Named result parameters: Only used when they clarify meaning (e.g., multiple same-type returns), not just to enable naked returns → go-documentation

Error Handling

  • Handle errors: No discarded errors with _; handle, return, or (exceptionally) panic → go-error-handling
  • Error strings: Lowercase, no punctuation (unless starting with proper noun/acronym) → go-error-handling
  • In-band errors: No magic values (-1, "", nil); use multiple returns with error or ok bool → go-error-handling
  • Indent error flow: Handle errors first and return; keep normal path at minimal indentation → go-error-handling

Naming

  • MixedCaps: Use MixedCaps or mixedCaps, never underscores; unexported is maxLength not MAX_LENGTH → go-naming
  • Initialisms: Keep consistent case: URL/url, ID/id, HTTP/http (e.g., ServeHTTP, xmlHTTPRequest) → go-naming
  • Variable names: Short names for limited scope (i, r, c); longer names for wider scope → go-naming
  • Receiver names: One or two letter abbreviation of type (c for Client); no this, self, me; consistent across methods → go-naming
  • Package names: No stuttering (use chubby.File not chubby.ChubbyFile); avoid util, common, misc → go-packages
  • Avoid built-in names: Don't shadow error, string, len, cap, append, copy, new, make → go-declarations

Concurrency

  • Goroutine lifetimes: Clear when/whether goroutines exit; document if not obvious → go-concurrency
  • Synchronous functions: Prefer sync over async; let callers add concurrency if needed → go-concurrency
  • Contexts: First parameter; not in structs; no custom Context types; pass even if you think you don't need to → go-context

Interfaces

  • Interface location: Define in consumer package, not implementor; return concrete types from producers → go-interfaces
  • No premature interfaces: Don't define before used; don't define "for mocking" on implementor side → go-interfaces
  • Receiver type: Use pointer if mutating, has sync fields, or is large; value for small immutable types; don't mix → go-interfaces

Data Structures

  • Empty slices: Prefer var t []string (nil) over t := []string{} (non-nil zero-length) → go-data-structures
  • Copying: Be careful copying structs with pointer/slice fields; don't copy *T methods' receivers by value → go-data-structures

Security

  • Crypto rand: Use crypto/rand for keys, not math/rand → go-defensive
  • Don't panic: Use error returns for normal error handling; panic only for truly exceptional cases → go-defensive

Declarations and Initialization

  • Group similar: Related var/const/type in parenthesized blocks; separate unrelated → go-declarations
  • var vs :=: Use var for intentional zero values; := for explicit assignments → go-declarations
  • Reduce scope: Move declarations close to usage; use if-init to limit variable scope → go-declarations
  • Struct init: Always use field names; omit zero fields; var for zero structs → go-declarations
  • Use any: Prefer any over interface{} in new code → go-declarations

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

Functions

  • File ordering: Types → constructors → exported methods → unexported → utilities → go-functions
  • Signature formatting: All args on own lines with trailing comma when wrapping → go-functions
  • Naked parameters: Add /* name */ comments for ambiguous bool/int args, or use custom types → go-functions
  • Printf naming: Functions accepting format strings end in f for go vet → go-functions

Style

  • Line length: No rigid limit, but avoid uncomfortably long lines; break by semantics, not arbitrary length → go-style-core
  • Naked returns: Only in short functions; explicit returns in medium/large functions → go-style-core
  • Pass values: Don't use pointers just to save bytes; pass string not *string for small fixed-size types → go-performance
  • String concatenation: + for simple; fmt.Sprintf for formatting; strings.Builder for loops → go-performance

Logging

  • Use slog: New code uses log/slog, not log or fmt.Println for operational logging → go-logging
  • Structured fields: Log messages use static strings with key-value attributes, not fmt.Sprintf → go-logging
  • Appropriate levels: Debug for developer tracing, Info for notable events, Warn for recoverable issues, Error for failures → go-logging
  • No secrets in logs: PII, credentials, and tokens are never logged → go-logging

Imports

  • Import groups: Standard library first, then blank line, then external packages → go-packages
  • Import renaming: Avoid unless collision; rename local/project-specific import on collision → go-packages
  • Import blank: import _ "pkg" only in main package or tests → go-packages
  • Import dot: Only for circular dependency workarounds in tests → go-packages

Generics

  • When to use: Only when multiple types share identical logic and interfaces don't suffice → go-generics
  • Type aliases: Use definitions for new types; aliases only for package migration → go-generics

Testing

  • Examples: Include runnable Example functions or tests demonstrating usage → go-documentation
  • Useful test failures: Messages include what was wrong, inputs, got, and want; order is got != want → go-testing
  • TestMain: Use only when all tests need common setup with teardown; prefer scoped helpers first → go-testing
  • Real transports: Prefer httptest.NewServer + real client over mocking HTTP → go-testing

Automated Checks

Run automated pre-review checks:

bash
bash scripts/pre-review.sh ./...         # text output
bash scripts/pre-review.sh --json ./...  # structured JSON output

Or manually: gofmt -l <path> && go vet ./... && golangci-lint run ./...

Fix any issues before proceeding to the checklist above. For linter setup and configuration, see go-linting.


  • Style foundations: See go-style-core when resolving formatting debates or applying the clarity > simplicity > concision priority
  • Linting setup: See go-linting when configuring golangci-lint or adding automated checks to CI
  • Error strategy: See go-error-handling when reviewing error wrapping, sentinel errors, or the handle-once pattern
  • Naming conventions: See go-naming when evaluating identifier names, receiver names, or package-symbol stuttering
  • Testing patterns: See go-testing when reviewing test code for table-driven structure, failure messages, or helper usage
  • Concurrency safety: See go-concurrency when reviewing goroutine lifetimes, channel usage, or mutex placement
  • Logging practices: See go-logging when reviewing log usage, structured logging, or slog configuration

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

Files

SKILL.md and 3 other files (scripts, references, assets) in skills/go-code-review of cxuu/golang-skills.

  • SKILL.md
  • assets/review-template.md
  • references/WEB-SERVER.md
  • scripts/pre-review.sh

Open the folder on GitHubat commit 91f0c2e

Compare with similar skills

Go Code Review 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 Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Go Code Review this skillcxuu/golang-skills170—~2.7kAutomated safety check: PassApache-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Backend Code Reviewlangflow-ai/langflow156k—~3.5kAutomated safety check: NotesMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Backend Code Review

    langflow-ai/langflow

    Review backend code for quality, security, maintainability, and best practices based on established checklist rules.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check: notes
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Backend Code Review

    langgenius/dify

    Reviews backend code under api/ for concrete, reproducible defects, routes to rule packs for architecture, schema, repositories and SQLAlchemy, and ranks findings from P0 to P3.

    158k GitHub stars~676 tokensUpdated today
    DevelopmentAuto-check passed

More from cxuu/golang-skills

All 20 skills in this repo
  • Go Testing

    cxuu/golang-skills

    A skill your agent uses when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff.

    170 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Go Performance

    cxuu/golang-skills

    A skill your agent uses when optimizing Go code, investigating slow performance, or writing performance-critical sections.

    170 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Go Documentation

    cxuu/golang-skills

    A skill your agent uses when writing or reviewing documentation for Go packages, types, functions, or methods.

    170 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Go Error Handling

    cxuu/golang-skills

    A skill your agent uses when writing Go code that returns, wraps, or handles errors — choosing between sentinel errors, custom types, and fmt.Errorf (%w vs %v), structuring error flow, or deciding…

    170 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Go Interfaces

    cxuu/golang-skills

    A skill your agent uses when defining or implementing Go interfaces, designing abstractions, creating mockable boundaries for testing, or composing types through embedding.

    170 GitHub stars~1.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Go Naming

    cxuu/golang-skills

    A skill your agent uses when naming any Go identifier — packages, types, functions, methods, variables, constants, or receivers — to ensure idiomatic, clear names.

    170 GitHub stars~1.7k tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Go Code Review

What does Go Code Review do?

A skill your agent uses when reviewing Go code or checking code against community style standards. Go Code Review is an agent skill from cxuu/golang-skills. Use when reviewing Go code or checking code against community style standards.

When should I use Go Code Review?

Go Code Review fits situations like: reviewing Go code; checking code against community style standards.

How do I install Go Code Review in Claude Code?

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

How do I install Go Code Review in Codex?

Run `npx skills add cxuu/golang-skills --skill go-code-review -a codex`. Or copy the skill folder (skills/go-code-review in cxuu/golang-skills) into .agents/skills/go-code-review in your project. Codex loads it when a task matches its description.

Can I use Go Code Review 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 cxuu/golang-skills --skill go-code-review -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-code-review, .gemini/skills/go-code-review, .github/skills/go-code-review and .opencode/skills/go-code-review in your project.

What does Go Code Review need to run?

Going by SKILL.md and its folder, Go Code Review needs a shell for the scripts in its folder and the command-line tools its instructions call (go and bash). Our summary lists: A Bash shell. Its frontmatter pre-approves these tools: Bash(bash:*).

Does Go Code Review 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 Code Review 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Go Code Review use?

Go Code Review is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Go Code Review use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Go Code Review?

Skills that share tags, products or a category with Go Code Review: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Backend Code Review (langflow-ai/langflow, 156k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Go Code Review?

cxuu (a GitHub user) maintains it in cxuu/golang-skills, which has 170 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on June 20, 2026.

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