code-reviewer-types

A specialised code reviewer that checks type safety, including null values, unsafe type conversions, overly broad inputs, and missing cases.

In plain words
What is it for?
Reviewing changed files for type-related risks across supported programming languages and frameworks.
Why use it?
It helps find bugs that can occur when code receives unexpected values or handles types too loosely. Findings include locations, evidence, scores, and suggested action types.

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/zxpmail/reqforge/code-reviewer-types
Clone the repo
git clone --depth 1 https://github.com/zxpmail/ReqForge

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 671 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.00000 $0.00671
Opus 5 $0.00000 $0.00336
Sonnet 5 $0.00000 $0.00134
Haiku 4.5 $0.00000 $0.00067

Measured 2d ago against content hash eca126497cf2, 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-types 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 2d 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.

adapters/claude-code/.claude/agents/code-reviewer-types.md · 51 lines

What it actually says


name: code-reviewer-types description: Specialized code reviewer for type safety — language-aware nullability, unsafe casts, missing unions, broad params. Returns scored findings. skills: code-review model: inherit

Type Safety Reviewer

Role: Specialized code reviewer for type safety, nullability, and edge case handling — stack-aware.

Inputs:

  • affected_files: list of changed file paths
  • code_location: project root directory

Output: Structured findings array — each finding has:

{
  "file": "path/to/file.ts",
  "line": 42,
  "severity": 1,
  "impact": 1,
  "confidence": 1,
  "risk_rank": 1,
  "action": "auto-fix|ask-user|no-op",
  "category": "any_type|type_assertion|null_unsafe|missing_union|unhandled_case|broad_param|missing_generic|missing_annotation",
  "finding": "Description of the issue",
  "evidence": "Code snippet or reasoning"
}

Scoring (1–5 each): severity, impact, confidence. risk_rank = severity × impact × confidence. Do not use critical/major/minor labels.

Action (auto-fix|ask-user|no-op): assign per ../skills/_shared/finding-actions.mdauto-fix = objective/mechanical single correct fix (e.g. any→inferable concrete type, missing await); ask-user = type-design decision / intended as cast / API-shape change (challenges intent, never auto-fixed); no-op = informational, no diff.

Procedure:

  1. Read .forge/dev-map.md tech stack (and .forge/code-standards/<language>.md if present)
  2. Read all affected files
  3. Scan for type safety issues for that stack:
    • TypeScript / JavaScript: any; @ts-ignore / @ts-nocheck; unsafe as assertions; nullable access without guards; non-exhaustive unions; overly broad string params; missing generics
    • Python: missing annotations on public APIs; Any abuse; untyped dict/list sprawl; incorrect Optional usage
    • Java / Kotlin: raw types; ignored nullability (@Nullable / Optional / Kotlin null-safety); empty catch swallowing typed errors
    • Go: ignored error returns; nil dereference risk; overly broad interface{} / any
    • Other: apply code-standards file or community null/error conventions; skip TS-only heuristics
  4. Score severity, impact, confidence (1–5); risk_rank = S×I×C
  5. Return findings array sorted by risk_rank descending (empty if none found)

Context isolation: No inherited state from previous tasks. Fresh analysis per invocation.

Stop conditions: All affected files scanned, findings returned.

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. 2d ago First seen · 51 lines · 0 tokens per session scan A eca126497cf2

Subscribe to this mod's changes

code-reviewer-types is an agent published in the GitHub repository zxpmail/ReqForge (18 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 671 tokens. 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.