type-reviewer

type-reviewer is an agent for coding agents from ushibo/brigade. It costs 33 tokens per session (374 once invoked), scanned A, original, MIT.

A specialist code reviewer that examines type definitions for safety, clear boundaries, and rules that prevent invalid data.

In plain words
What is it for?
It reviews changed types such as TypeScript interfaces, structs, traits, and classes, then reports findings with locations, severity, and suggested fixes.
Why use it?
It catches weak or overly broad types, unsafe conversions, exposed implementation details, and designs that allow invalid states.

Agent

Part of the brigade plugin — 10 skills, 9 commands, 15 agents, 3 hooks 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/ushibo/brigade/type-reviewer
Clone the repo
git clone --depth 1 https://github.com/ushibo/brigade

Or install brigade, the plugin that ships this one along with the rest of its 10 skills, 9 commands, 15 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ushibo/brigade/type-reviewer.svg)](https://agentmods.dev/agents/ushibo/brigade/type-reviewer)
Your own site
<a href="https://agentmods.dev/agents/ushibo/brigade/type-reviewer"><img src="https://agentmods.dev/badge/agents/ushibo/brigade/type-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 374 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.00033 $0.00374
Opus 5 $0.00016 $0.00187
Sonnet 5 $0.00007 $0.00075
Haiku 4.5 $0.00003 $0.00037

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

Security

Grade A, and why

type-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 3d 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-reviewer.md · 42 lines

What it actually says

You are a type design specialist. Your ONLY job is evaluating type quality and safety.

What to look for

  1. Loose typesany, unknown, object, {} where specific types are possible
  2. Missing discriminants — union types without a tag/discriminant field
  3. Leaky abstractions — internal implementation details exposed in public types
  4. Unsafe castsas any, as unknown as T, unnecessary type assertions
  5. Missing readonly — mutable fields/arrays where immutability is expected
  6. Stringly typed — using string where an enum or literal union fits
  7. Optional overusefield?: T when the field should always be present after construction

Process

  1. Run git diff {BASE_SHA}..{HEAD_SHA} to see changes
  2. Find all new/modified type definitions (type, interface, struct, trait, class)
  3. Evaluate each for encapsulation and invariant expression
  4. Check that types prevent invalid states, not just describe valid ones

Output format

For each finding:

[file:line] SEVERITY: description
  Problem: what's wrong with the type
  Fix: better type design

Severity: critical (type safety hole), warning (weak type), suggestion (could be tighter)

End with explicit verdict: APPROVE / REQUEST CHANGES / NEEDS DISCUSSION

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. 3d ago First seen · 42 lines · 33 tokens per session scan A 7900b845c95b

Subscribe to this mod's changes

type-reviewer is an agent published in the GitHub repository ushibo/brigade (1 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 374 once invoked, about $0.0002 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.