type-design-reviewer

type-design-reviewer is an agent for Claude Code from KhaledSaeed18/dotclaude. It costs 128 tokens per session (1,319 once invoked), scanned A, original, MIT.

A code-review agent focused on the shapes of data in a change, such as types, interfaces, schemas, and API or database records. It finds cases where invalid combinations can be represented and proposes more accurate type definitions or boundary checks.

In plain words
What is it for?
Use it to review type and schema changes, their callers, and the validation of data crossing API, database, or event boundaries.
Why use it?
It catches bugs caused by data structures that allow impossible or ambiguous states, including incorrect optional fields, incomplete choices, and unchecked external data. It judges types in the context of how the code constructs and uses them.

Agent for Claude Code

Written for Claude Code: a Claude Code plugin manifest. Also seen: model in frontmatter.

Part of the pr-toolkit plugin — 1 command, 5 agents shipped together

Good fit Use it to review type and schema changes, their callers, and the validation of data crossing API, database, or event boundaries.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/khaledsaeed18/dotclaude/type-design-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install pr-toolkit, the plugin that ships this one along with the rest of its 1 command, 5 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/khaledsaeed18/dotclaude/type-design-reviewer/github.svg)](https://agentmods.dev/agents/khaledsaeed18/dotclaude/type-design-reviewer)
Your own site
<a href="https://agentmods.dev/agents/khaledsaeed18/dotclaude/type-design-reviewer"><img src="https://agentmods.dev/badge/agents/khaledsaeed18/dotclaude/type-design-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 type-design-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/khaledsaeed18/dotclaude/type-design-reviewer"><img src="https://agentmods.dev/badge/agents/khaledsaeed18/dotclaude/type-design-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 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,319 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.00128 $0.01319
Opus 5.5 $0.00051 $0.00528
Sonnet 5.5 $0.00026 $0.00264
Haiku 4.5 $0.00013 $0.00132

Measured 25d ago against content hash 66395a90313d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 25d 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-plugin/plugins/pr-toolkit/agents/type-design-reviewer.md · 83 lines

How it starts

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

You review the shape of data, not the flow of control. Good types make a class of bugs unwritable; bad types make every function defensive. You look at the types a change touches and ask whether they make the right things easy and the wrong things impossible. You read; you do not edit.

Operating rules

  • Scope: type, interface, enum, schema, and DTO changes in the diff, plus every site that constructs or narrows them. A type is judged by how it is used.
  • Findings cite the invalid state: "with status: 'shipped' and shippedAt: undefined this compiles" is a finding; "consider stronger types" is not.
  • Propose the type, not the idea: show the discriminated union, the branded type, the narrowed enum.
  • Weigh the cost. A stricter type that forces changes in forty call sites needs to earn it; say when the pragmatic choice is a runtime check at the boundary instead.

What to look for

Illegal states representable

  • Parallel optionals that must move together (error?: string; data?: T) instead of a discriminated union ({ ok: true; data } | { ok: false; error }).
  • Status strings plus fields that only apply in some statuses; booleans that combine into impossible pairs (isLoading && isError).
  • Numbers used for ids, quantities, and money interchangeably with no branding or units.

Nullability and optionality

  • ? on fields that are always present after construction (should be required; the optionality belongs to the builder input).
  • | null and | undefined both used for the same absence; null meaning "not loaded" and "empty" at once.
  • Non-null assertions (!) and as casts papering over a type that is wrong at the source.

Openness

  • String unions that should be closed enums, and enums that should be string unions (interop, serialisation).
  • Record<string, unknown> and any at internal boundaries where the shape is known; object where a specific type exists.
  • Exhaustiveness: switch over a union without a never default; new variant added and old handlers silently fall through.

Read the full file on GitHub · 83 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. 25d ago First seen · 83 lines · 128 tokens per session scan A 66395a90313d

Subscribe to this mod's changes

type-design-reviewer is an agent published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 2d ago), licensed MIT. It adds 128 tokens to every session and 1,319 once invoked, about $0.0005 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-09-22.

Related

Other agents, from other repositories

fastapi-reviewer

Reviews FastAPI applications for async correctness, dependency injection, Pydantic schemas, security, OpenAPI quality, testing, and production readiness.

affaan-m/ECC · 33 tokens

information-architect

Adversarial information architect who assumes the current documentation is harder to find, orient in, and comprehend than it needs to be. Audits READMEs, API docs, plugin docs, ADR collections, tutorials, and reference content against established IA practice — the four IA systems (organization, labeling, navigation…

testdouble/han · 193 tokens

spring-boot-reviewer

Reviews Spring Boot codebases against all spring-boot skills for correctness, best practices, and Spring Boot 4 compatibility. Use when reviewing Spring Boot projects, validating implementations, or user mentions "review my Spring Boot code", "check Spring best practices", "Spring Boot review", "validate Spring…

joaquimscosta/arkhe-claude-plugins · 66 tokens

api-contract-sync

Verify OpenAPI/Swagger spec matches actual route registrations, handler DTOs, and documented error codes.

RaNDoM6913/claude-code-superkit · 23 tokens

backend-reviewer

Reviews backend code for patterns, async correctness, and security. Use after backend code changes.

Jartan-LLC/grimoire · 22 tokens

fastify-reviewer

Reviews Fastify application code for anti-patterns, encapsulation violations, and production readiness issues. Use when completing Fastify feature work, before code review, or when the user says "review my Fastify code", "check for Fastify anti-patterns", "is my Fastify app production ready", "validate Fastify…

RadOrigin-LLC/RAD-Claude-Skills · 72 tokens