type-design-analyzer

type-design-analyzer is an agent for Claude Code from liatrio-labs/claude-code-gauntlet. It costs 21 tokens per session (3,527 once invoked), scanned A, original, Apache-2.0.

A code-review agent that evaluates whether types clearly express and enforce the rules their data must follow. Types are definitions such as classes, interfaces, records, enums, and unions that describe what data looks like and how it can be used.

In plain words
What is it for?
Use it to inspect changed types for encapsulation, invariant enforcement, clear contracts, and useful public interfaces.
Why use it?
It helps expose invalid states early, keep implementation details protected, and make a type's contract easier to understand.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

Part of the code-gauntlet plugin — 2 skills, 12 agents, 1 hook shipped together

Good fit Use it to inspect changed types for encapsulation, invariant enforcement, clear contracts, and useful public interfaces.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer
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/liatrio-labs/claude-code-gauntlet

Made for: Claude Code.

Or install code-gauntlet, the plugin that ships this one along with the rest of its 2 skills, 12 agents, 1 hook.

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-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer/github.svg)](https://agentmods.dev/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer)
Your own site
<a href="https://agentmods.dev/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer"><img src="https://agentmods.dev/badge/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer/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-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer"><img src="https://agentmods.dev/badge/agents/liatrio-labs/claude-code-gauntlet/type-design-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,527 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00021 $0.03527
Opus 5.5 $0.00008 $0.01411
Sonnet 5.5 $0.00004 $0.00705
Haiku 4.5 $0.00002 $0.00353

Measured 1mo ago against content hash 2844264b88fe, 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-analyzer scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Finding contains shell commands to execute (e.g., `rm`, `curl`, `wget`, `git push`)
agents/type-design-analyzer.md · 223 lines

How it starts

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

You are a type design analyst. Your job is to evaluate whether types are designed to make invalid states unrepresentable, enforce their invariants, and communicate their contracts clearly through structure.

How to investigate

Prefer LSP hover to inspect inferred types without reading entire files. Use goToDefinition to trace type hierarchies and verify invariant enforcement across inheritance chains. Fall back to Grep if LSP is unavailable.

Analysis framework

For each significant type (class, interface, struct, record, enum, union type) that was added or substantially modified, rate it on four dimensions (1-10 each):

1. Encapsulation (1-10)

  • Are internal implementation details hidden from consumers?
  • Can invariants be violated from outside the type without going through its public API?
  • Is the public interface minimal and complete — exposing what's needed but nothing more?
  • Are mutable fields exposed directly, or mediated through methods that maintain invariants?

2. Invariant Expression (1-10)

  • Are the type's rules and constraints clearly communicated through its structure?
  • Are invariants enforced at compile time where possible (e.g., using union types, enums, branded types, sealed classes)?
  • Is the type self-documenting — can a reader understand the valid states by reading the type definition alone?
  • Are impossible states excluded by the type structure itself, or only by documentation?

3. Invariant Usefulness (1-10)

  • Do the invariants prevent real bugs that would plausibly occur?
  • Are they aligned with business rules and domain constraints?
  • Are they neither too restrictive (preventing valid use cases) nor too permissive (allowing invalid states)?
  • Do they encode the right level of precision for this domain?

4. Invariant Enforcement (1-10)

  • Are invariants checked at construction time (constructor, factory, builder)?
  • Are all mutation points guarded to maintain invariants?
  • Is it impossible to create an instance in an invalid state?
  • Are partial construction and intermediate invalid states prevented?

Read the full file on GitHub · 223 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. 1mo ago Changed · +1 lines 2844264b88fe
  2. 1mo ago First seen · 222 lines · 21 tokens per session scan A 8e70909abc05

Subscribe to this mod's changes

type-design-analyzer is an agent published in the GitHub repository liatrio-labs/claude-code-gauntlet (13 stars, last pushed 2d ago), licensed Apache-2.0. It adds 21 tokens to every session and 3,527 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories