EGC: Command for Claude Code

.opencode/commands/go-review.md

go-review is a command for Claude Code, OpenCode from Fmarzochi/EGC. It costs 7 tokens per session (445 once invoked), scanned A, a copy of go-review, Apache-2.0.

A Go code-review command that checks code for common Go conventions, error handling, concurrency, performance, and organization.

In plain words
What is it for?
Use it to review Go changes involving goroutines, channels, mutexes, APIs, package structure, or error handling.
Why use it?
It helps find unsafe patterns, ignored errors, data races, needless allocations, and code that is difficult to maintain.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/. Also seen: agent in frontmatter.

This is Fmarzochi/EGC's own configuration. It tells Claude Code and OpenCode how to work on EGC 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 EGC configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Fmarzochi/EGC. 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/Fmarzochi/EGC/main/.opencode/commands/go-review.md
Clone the repo
git clone --depth 1 https://github.com/Fmarzochi/EGC

Made for: Claude Code, OpenCode.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/fmarzochi/egc/go-review"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/go-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 445 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 98% copy Near-identical to another mod 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.00007 $0.00445
Opus 5 $0.00003 $0.00222
Sonnet 5 $0.00001 $0.00089
Haiku 4.5 $0.00001 $0.00044

Measured 5d ago against content hash 9e85b2047d95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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

Origin

This is a copy

98% identical to go-review — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.opencode/commands/go-review.md · 72 lines

What it actually says

Go Review Command

Review Go code for idiomatic patterns and best practices: $ARGUMENTS

Your Task

  1. Analyze Go code for idioms and patterns
  2. Check concurrency - goroutines, channels, mutexes
  3. Review error handling - proper error wrapping
  4. Verify performance - allocations, bottlenecks

Review Checklist

Idiomatic Go

  • Package naming (lowercase, no underscores)
  • Variable naming (camelCase, short)
  • Interface naming (ends with -er)
  • Error naming (starts with Err)

Error Handling

  • Errors are checked, not ignored
  • Errors wrapped with context (fmt.Errorf("...: %w", err))
  • Sentinel errors used appropriately
  • Custom error types when needed

Concurrency

  • Goroutines properly managed
  • Channels buffered appropriately
  • No data races (use -race flag)
  • Context passed for cancellation
  • WaitGroups used correctly

Performance

  • Avoid unnecessary allocations
  • Use sync.Pool for frequent allocations
  • Prefer value receivers for small structs
  • Buffer I/O operations

Code Organization

  • Small, focused packages
  • Clear dependency direction
  • Internal packages for private code
  • Godoc comments on exports

Report Format

Idiomatic Issues

  • [file:line] Issue description Suggestion: How to fix

Error Handling Issues

  • [file:line] Issue description Suggestion: How to fix

Concurrency Issues

  • [file:line] Issue description Suggestion: How to fix

Performance Issues

  • [file:line] Issue description Suggestion: How to fix

TIP: Run go vet and staticcheck for additional automated checks.

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. 5d ago First seen · 72 lines · 7 tokens per session scan A 9e85b2047d95

Subscribe to this mod's changes

go-review is a command published in the GitHub repository Fmarzochi/EGC (49 stars, last pushed today), licensed Apache-2.0. It adds 7 tokens to every session and 445 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to go-review, differing in 2 lines, and is treated as a copy.