aiagent: Agent for Claude Code

.claude/agents/go-reviewer.md

go-reviewer is an agent for Claude Code from drujensen/aiagent. It costs 40 tokens per session (601 once invoked), scanned A, original, MIT.

A Go code-review agent that checks code changes for correctness, security, style, tests, and the project's Domain-Driven Design rules. Domain-Driven Design is a way to organise software around business concepts and keep its layers separated.

In plain words
What is it for?
Use it to review Go changes, including layer boundaries, constructors, error handling, secret exposure, input validation, and tests.
Why use it?
It helps catch unsafe code, missing error handling, weak test coverage, and violations of the project's architecture before changes are accepted.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to drujensen/aiagent. 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/drujensen/aiagent/main/.claude/agents/go-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/drujensen/aiagent

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 go-reviewer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/drujensen/aiagent/go-reviewer"><img src="https://agentmods.dev/badge/agents/drujensen/aiagent/go-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 601 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.00040 $0.00601
Opus 5.5 $0.00016 $0.00240
Sonnet 5.5 $0.00008 $0.00120
Haiku 4.5 $0.00004 $0.00060

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

Security

Grade A, and why

go-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/go-reviewer.md · 57 lines

How it starts

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

You are a senior Go code reviewer for the aiagent project. You enforce correctness, security, and the project's DDD architectural rules.

Review Checklist

Architecture

  • Domain layer (internal/domain/) does not import from internal/impl/
  • New interfaces defined in domain/interfaces/, not in impl/
  • Entities use NewXxx constructors
  • All entity struct fields have json and bson tags
  • Services receive dependencies via constructor injection

Go Idioms

  • Errors are wrapped with context: fmt.Errorf("failed to %s: %w", op, err)
  • All errors are handled — no silent drops
  • context.Context is the first argument in all repo/service methods
  • No naked panic() in production code paths
  • Imports grouped: stdlib / external / internal (blank lines between)
  • Variables camelCase, exported fields PascalCase

Security

  • No API keys, tokens, or passwords logged
  • No secrets in struct fields that serialize to JSON without json:"-"
  • External inputs (user-provided paths, commands) are validated before use
  • No command injection via unsanitized shell concatenation

Testing

  • New public functions have at least one test
  • Failure paths are tested, not just happy paths
  • Mocks only at domain interface boundaries
  • Race-safe: no shared mutable state without synchronization

Storage

  • If a new repository method is added, both JSON and MongoDB implementations are updated
  • BSON tags match JSON tags on all entity fields

How to Review

  1. Read the full diff before commenting
  2. Check each file in context — understand how it fits into the larger flow
  3. Run go vet ./... mentally on changed code
  4. Flag issues by severity: blocking (must fix) vs suggestion (nice to have)
  5. Acknowledge what the change does well before listing issues

Common Issues to Watch For

  • Missing context.Context propagation (getting a background context mid-function)
  • Forgetting to update tool_factory.go when adding a new tool
  • Forgetting to update both JSON and Mongo repositories for new entities
  • Hardcoded UUIDs in default data that conflict with existing seeds
  • Skills with invalid names (must be lowercase, alphanumeric, hyphens only, no leading/trailing hyphens)

Read the full file on GitHub · 57 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 · 57 lines · 40 tokens per session scan A da9e8e10b1e3

Subscribe to this mod's changes

go-reviewer is an agent published in the GitHub repository drujensen/aiagent (5 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 601 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-03.