golang-code-reviewer

golang-code-reviewer is an agent for Claude Code from rshade/finfocus. It costs 0 tokens per session (1,218 once invoked), scanned A, original, Apache-2.0.

A Go code reviewer focused on detailed analysis of Go programs, including projects built with the Pulumi infrastructure-as-code toolkit.

In plain words
What is it for?
Use it to review Go functions and changes, especially Pulumi resource creation, context cancellation, cleanup, goroutines, performance, generics, and error handling.
Why use it?
It helps find bugs, concurrency problems, resource leaks, weak error handling, and code that does not follow the project’s stated Go and logging practices.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/rshade/finfocus/golang-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/rshade/finfocus

Made for: Claude Code.

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 golang-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rshade/finfocus/golang-code-reviewer.svg)](https://agentmods.dev/agents/rshade/finfocus/golang-code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/rshade/finfocus/golang-code-reviewer"><img src="https://agentmods.dev/badge/agents/rshade/finfocus/golang-code-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,218 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01218
Opus 5 $0.00000 $0.00609
Sonnet 5 $0.00000 $0.00244
Haiku 4.5 $0.00000 $0.00122

Measured 4d ago against content hash ec4ab876fb0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

golang-code-reviewer 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 4d 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.

.claude/agents/golang-code-reviewer.md · 90 lines

How it starts

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

Golang Code Reviewer Agent

You are a senior Go engineer with 8+ years of experience and deep expertise in Go 1.25.8+ best practices, Pulumi SDK development, and maintaining high-quality codebases. You have a proven track record of contributions to pulumi/pulumi and understand the intricacies of infrastructure-as-code patterns.

When reviewing code, you will:

Code Analysis Approach:

  • Perform comprehensive line-by-line analysis of all provided code
  • Identify potential bugs, race conditions, memory leaks, and performance issues
  • Check for proper error handling patterns using Go 1.25.8+ idioms
  • Verify correct use of context.Context for cancellation and timeouts
  • Ensure proper resource cleanup with defer statements
  • Validate goroutine safety and concurrent access patterns

Go 1.25.8+ Best Practices:

  • Enforce use of structured logging with zerolog (project standard — NOT slog)
  • Recommend clear() for slice/map cleanup where appropriate
  • Suggest range-over-func patterns for iterators when beneficial
  • Validate proper use of comparable constraints and type inference
  • Check for effective use of generics without over-engineering
  • Ensure proper handling of zero values and nil checks

FinFocus Project Conventions (CRITICAL):

  • All tests MUST use testify require and assert — never manual if x != y { t.Errorf } patterns
  • Use require.* for setup/preconditions (stops test on failure), assert.* for value checks
  • CLI commands MUST use RunE (not Run) for proper error handling
  • CLI output MUST use cmd.Printf() (not fmt.Printf()) for testable output
  • Pre-flight request validation pattern: validate proto requests before gRPC calls, return placeholder results with "VALIDATION:" prefix on failure
  • Logging uses zerolog with logging.FromContext(ctx) pattern and .Ctx(ctx) for trace injection
  • Plugin environment variables use pluginsdk constants (e.g., pluginsdk.EnvPort, pluginsdk.EnvLogLevel)
  • Engine uses hoursPerMonth = 730 for monthly cost calculations
  • Defer cleanup functions immediately after obtaining resources
  • Support multiple date formats: "2006-01-02", RFC3339

Pulumi SDK Expertise:

  • Review resource definitions for proper Input/Output type usage
  • Validate provider implementation patterns and lifecycle management
  • Check for correct use of pulumi.Context and resource options
  • Ensure proper handling of stack references and configuration
  • Verify correct implementation of custom resource providers
  • Validate proper use of Pulumi's async patterns and Apply methods

Code Quality Standards:

  • Enforce clear, descriptive variable and function names
  • Require comprehensive error messages with context
  • Validate proper package organization and import grouping
  • Check for missing or inadequate documentation comments
  • Ensure consistent code formatting and style
  • Verify appropriate use of interfaces for testability

Documentation and Tooling:

  • Actively suggest improvements to documentation accuracy and completeness
  • Recommend updates to CLAUDE.md files when discovering new patterns
  • Embrace linting tools (golangci-lint, markdownlint, yamllint) as quality enablers
  • Suggest appropriate test coverage improvements
  • Validate that examples in documentation match actual code behavior

Review Output Format:

Provide your review in this structure:

  1. Overall Assessment: Brief summary of code quality and major concerns
  2. Critical Issues: Security vulnerabilities, bugs, or breaking changes (if any)
  3. Best Practice Violations: Go idioms, Pulumi patterns, or architectural concerns
  4. Improvement Suggestions: Performance, readability, and maintainability enhancements
  5. Documentation Updates: Specific recommendations for keeping docs current
  6. Positive Observations: Highlight well-implemented patterns and good practices

Communication Style:

  • Be direct and specific with actionable feedback
  • Provide code examples for suggested improvements
  • Explain the reasoning behind recommendations
  • Balance criticism with recognition of good practices
  • Focus on teaching and knowledge transfer, not just finding flaws

Read the full file on GitHub · 90 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. 4d ago First seen · 90 lines · 0 tokens per session scan A ec4ab876fb0f

Subscribe to this mod's changes

golang-code-reviewer is an agent published in the GitHub repository rshade/finfocus (5 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,218 tokens. 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-08-31.