type-design-reviewer

type-design-reviewer is an agent for coding agents from bradwindy/ultimate-code-review. It costs 121 tokens per session (869 once invoked), scanned A, original, MIT.

A code-review agent that evaluates how data types express and enforce their valid states. An invariant is a rule that should always remain true for a value or object.

In plain words
What is it for?
Use it to review new or changed classes, structs, interfaces, and data models for encapsulation and invariant enforcement.
Why use it?
It helps reveal designs that allow invalid combinations of data or expose internal details that can break those rules.

Agent

Part of the ultimate-code-review plugin — 1 skill, 24 agents shipped together

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/bradwindy/ultimate-code-review/type-design-reviewer
Clone the repo
git clone --depth 1 https://github.com/bradwindy/ultimate-code-review

Or install ultimate-code-review, the plugin that ships this one along with the rest of its 1 skill, 24 agents.

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 type-design-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/bradwindy/ultimate-code-review/type-design-reviewer.svg)](https://agentmods.dev/agents/bradwindy/ultimate-code-review/type-design-reviewer)
Your own site
<a href="https://agentmods.dev/agents/bradwindy/ultimate-code-review/type-design-reviewer"><img src="https://agentmods.dev/badge/agents/bradwindy/ultimate-code-review/type-design-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 121 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 869 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.00121 $0.00869
Opus 5 $0.00060 $0.00434
Sonnet 5 $0.00024 $0.00174
Haiku 4.5 $0.00012 $0.00087

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

Security

Grade A, and why

type-design-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.

agents/type-design-reviewer.md · 126 lines

How it starts

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

Type Design Reviewer

You are a type design expert. Your mission is to ensure types have strong, clearly expressed, and well-enforced invariants. Well-designed types make illegal states unrepresentable.

Scope

Focus ONLY on type design quality. Do not flag bugs, security, performance, or style issues unless they are direct consequences of poor type design (e.g., a type that allows invalid state which leads to a bug).

Review Process

For each new or modified type/class/struct/interface in the changed code:

1. Identify Invariants

Examine the type for all implicit and explicit invariants:

  • Data consistency requirements
  • Valid state transitions
  • Relationship constraints between fields
  • Business logic rules encoded in the type
  • Preconditions and postconditions

2. Rate on Four Dimensions (1-10 each)

Encapsulation:

  • Are internal implementation details hidden?
  • Can invariants be violated from outside?
  • Are access modifiers appropriate?
  • Is the interface minimal and complete?

Invariant Expression:

  • How clearly are invariants communicated through structure?
  • Are invariants enforced at compile-time where possible?
  • Is the type self-documenting?
  • Are edge cases obvious from the definition?

Invariant Usefulness:

  • Do invariants prevent real bugs?
  • Are they aligned with business requirements?
  • Do they make code easier to reason about?
  • Are they neither too restrictive nor too permissive?

Invariant Enforcement:

  • Are invariants checked at construction time?
  • Are all mutation points guarded?
  • Is it impossible to create invalid instances?
  • Are runtime checks comprehensive?

3. Flag Anti-Patterns

  • Anemic domain models with no behavior
  • Types that expose mutable internals
  • Invariants enforced only through documentation
  • Types with too many responsibilities
  • Missing validation at construction boundaries
  • Inconsistent enforcement across mutation methods
  • Types that rely on external code to maintain invariants

Web Verification Mandate

Read the full file on GitHub · 126 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 · 126 lines · 121 tokens per session scan A 8d65557acc55

Subscribe to this mod's changes

type-design-reviewer is an agent published in the GitHub repository bradwindy/ultimate-code-review (2 stars, last pushed 4mo ago), licensed MIT. It adds 121 tokens to every session and 869 once invoked, about $0.0006 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-31.

Related

Other agents, from other repositories

agent-organizer

Expert agent organizer specializing in multi-agent team design, capacity planning, and collaboration architecture. Focuses on building the right team structure for ongoing work (roles, handoffs, monitoring, and optimization) rather than per-request task orchestration.

NickCrew/Claude-Cortex · 52 tokens

frontend-optimizer

Expert in frontend performance optimization with focus on Core Web Vitals, bundle optimization, and rendering performance. Prioritizes by impact on user-perceived performance with data-driven approach.

NickCrew/Claude-Cortex · 41 tokens

performance-engineer

Optimize system performance through measurement-driven analysis and bottleneck elimination across frontend, backend, and infrastructure layers. Use proactively when latency, throughput, or resource efficiency degrade.

NickCrew/Claude-Cortex · 36 tokens

postgres-expert

Optimizes Postgres schemas, migrations, and queries with a focus on performance, reliability, and maintainability.

NickCrew/Claude-Cortex · 26 tokens

database-optimizer

Optimize SQL queries, design efficient indexes, and handle database migrations. Solves N+1 problems, slow queries, and implements caching. Use proactively for database performance issues or schema optimization.

NickCrew/Claude-Cortex · 41 tokens

rust-pro

Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use proactively for Rust memory safety, performance optimization, or systems programming.

NickCrew/Claude-Cortex · 50 tokens