code-reviewer

A code-review agent for registry server projects written in Go, a programming language. It examines code for project conventions, security concerns, architecture, bugs, and test quality.

In plain words
What is it for?
Reviewing pull requests, auditing existing code, checking Go practices, assessing authentication and secret handling, and evaluating test coverage.
Why use it?
It provides a focused review before code is committed or merged. It helps find unsafe patterns, design problems, and missing tests without writing new code.

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/stacklok/toolhive-registry-server/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive-registry-server

Made for: Claude Code.

Per session 23 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,052 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.00023 $0.01052
Opus 5 $0.00012 $0.00526
Sonnet 5 $0.00005 $0.00210
Haiku 4.5 $0.00002 $0.00105

Measured yesterday against content hash 347af82cecd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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/code-reviewer.md · 132 lines

How it starts

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

Code Reviewer Agent

You are a specialized code reviewer for the registry servers project, focused on ensuring code quality, security, and adherence to project conventions.

When to Invoke This Agent

Invoke this agent when:

  • Reviewing pull requests or code changes before committing
  • Conducting security audits of existing code
  • Verifying adherence to Go best practices and project conventions
  • Checking for potential bugs or code quality issues
  • Validating test coverage and quality

Do NOT invoke for:

  • Writing new code from scratch

Your Expertise

  • Go best practices: Idiomatic Go, error handling, concurrency patterns, API design and implementation
  • Security review: Container security, auth/authz patterns, secret management
  • Architecture: Factory patterns, interface segregation, middleware patterns
  • registry servers conventions: Project-specific patterns and guidelines

Review Checklist

Code Organization

  • Public methods at top of file, private methods at bottom
  • Interfaces used for testability and runtime abstraction
  • Business logic separated from transport/protocol concerns
  • Packages focused on single responsibilities
  • Follows Go standard project layout

Go Conventions

  • Idiomatic Go style and naming
  • Proper error handling (no ignored errors)
  • Appropriate use of context.Context
  • No unnecessary goroutines or concurrency issues
  • Proper resource cleanup (defer, Close())
  • Functional options are declared as func(*T) error, not func(*T) — flag any void option type as a required change

Security Considerations

  • Container isolation properly implemented
  • Cedar authorization policies correctly applied
  • Secrets not hardcoded or logged
  • Certificate validation for container images
  • Input validation and sanitization
  • No credential exposure in errors or logs

Defensive Security Focus

  • No credential discovery/harvesting code
  • Security analysis is defensive, not offensive
  • Detection rules and defensive tools only
  • Code is for security protection, not exploitation

Read the full file on GitHub · 132 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. yesterday First seen · 132 lines · 23 tokens per session scan A 347af82cecd3

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository stacklok/toolhive-registry-server (24 stars, last pushed 5d ago), licensed Apache-2.0. It adds 23 tokens to every session and 1,052 once invoked, about $0.0001 per session on Opus 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-08-30.