ts-review

ts-review is a skill for Claude Code, Codex from MH4GF/claude-code. It costs 190 tokens per session (1,709 once invoked), scanned A, original, MIT.

A TypeScript and TSX change reviewer focused on design issues that ordinary code checks may not catch. TypeScript is a programming language that adds type information to JavaScript, and TSX is its format for React interface code.

In plain words
What is it for?
Use it to review TypeScript or React diffs for unnecessary any types and casts, try/catch boundaries, state design, comment and test-language consistency, and related architectural concerns.
Why use it?
It helps find unsafe type escapes, overly broad error handling, awkward React state structures, and misleading generated comments without repeating routine lint checks.

Skill for Claude CodeCodex

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 skills/mh4gf/claude-code/ts-review
Any agent
npx skills add MH4GF/claude-code --skill ts-review
Clone the repo
git clone --depth 1 https://github.com/MH4GF/claude-code

Made for: Claude Code, Codex.

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 ts-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/mh4gf/claude-code/ts-review.svg)](https://agentmods.dev/skills/mh4gf/claude-code/ts-review)
Your own site
<a href="https://agentmods.dev/skills/mh4gf/claude-code/ts-review"><img src="https://agentmods.dev/badge/skills/mh4gf/claude-code/ts-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 190 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,709 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.00190 $0.01709
Opus 5 $0.00095 $0.00855
Sonnet 5 $0.00038 $0.00342
Haiku 4.5 $0.00019 $0.00171

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

Security

Grade A, and why

ts-review 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 5d 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.

user-scope-backup-2026-07-04/skills/ts-review/SKILL.md · 102 lines

How it starts

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

ts-review

TypeScript / TSX の diff から「lint で止められない設計レベル」だけを抽出するレビュー skill。

対象範囲

主な種類は次のとおり

  • フロントエンド — Next.js / React / Vite / Tailwind / Vitest / Storybook 系
  • バックエンド — Hono / Next.js API / Prisma 系

両方の変更が混在する diff は順に両方を見る。共通観点 → フロントエンド固有 → バックエンド固有の順で出力する。

対象外 (lint でカバーされる領域)

レビュー開始前に対象リポの lint / formatter / 型チェッカ設定を確認する。これらが既に止める領域は指摘しない。重複指摘は読み手の認知負荷を増やすだけ。

確認すべき設定の例

  • linter — biome / eslint (flat config 含む)、有効化された rule
  • formatter — prettier / biome formatter
  • 型チェック — tsc --noEmit の CI 連携、noUncheckedIndexedAccess 等の strict オプション
  • pre-commit hook — lefthook / husky / lint-staged の対象

リポ次第で lint が止める一般的な領域

  • import の並び順 / 未使用 import / 未使用変数
  • フォーマット (空白 / 改行 / quote)
  • React Hook の依存配列の漏れ
  • ファイル名規約 (kebab-case 強制等)
  • 型エラー
  • console.log / debugger の混入
  • パッケージ境界 (import-access / useImportRestrictions 系)
  • 一般的な a11y (eslint-plugin-jsx-a11y の領域)

報告前に再確認する。上の項目に該当する指摘は最終レポートから外す。

共通観点

any / 強制キャストの排除

any / as any / as unknown as X / // @ts-ignore / // @ts-expect-error は原則禁止。95% のケースは型で表現可能。本当に解消手段が尽きた時の最後の手段としてのみ許される。

レビュアーとして、diff に現れた強制キャストを 1 件も見逃さず列挙する。「なぜキャストが必要だったのか」を呼び出し元へ問い直す。型で解消する道が残っていないか再検討させる。「対応が難しい」という理由で指摘を見送らない。

型で解消する典型パターン (呼び出し元への参考)

  • 外部 API レスポンスの型が無いケース — Zod schema で受ければ unknown を排除できる
  • ジェネリクスの推論が効かないケース — 型引数を明示すればキャストは不要になる

try/catch の構造見直し

try/catch の構造は必ず疑う。次の 2 パターンを挙げる。

  • スコープ過大 — 関数全体や複数文を 1 つの try/catch で囲っている。どの行でどんなエラーが出るのか読み取れない構造はそれ自体が問題。発生行に絞った狭いスコープで囲う形へ見直すべき
  • 握り潰し — catch ブロックが空 / 無関係処理 / ログ出力だけ。信頼できる内部呼び出しに対する防御的 try/catch も同類

ライブラリ呼び出し / HTTP 境界 / DB / ファイル I/O など try/catch が本当に必要な場面でも、対象はエラー発生行のみに絞る。「とりあえず広く囲んでおく」を見過ごさない。

Hook の state shape

React の useState / useReducer で次のパターンを見る

  • 同期取れない複数 state — A の更新後に B を更新しないと矛盾する設計
  • 派生値を state にしている — useMemo で済む値を useState で持っている
  • 過剰な Optional Chaining a?.b?.c?.d を要求する state 設計

「データの持ち方が変だ」と感じる場面に直接対応する観点。state の置き場所そのものを問い直す。

コメント混入

既存 PR に AI 生成コメントが残っている場合、// This function does X 系の説明コメント、経緯コメント、TODO / FIXME / issue ID コメントを挙げる。

Read the full file on GitHub · 102 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. 5d ago First seen · 102 lines · 190 tokens per session scan A 3ff3c717f45c

Subscribe to this mod's changes

ts-review is a skill published in the GitHub repository MH4GF/claude-code (2 stars, last pushed yesterday), licensed MIT. It adds 190 tokens to every session and 1,709 once invoked, about $0.0010 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 skills, from other repositories

lint-js

Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).

denoland/deno · 29 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

typescript-magician

Designs complex generic types, refactors any types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing any types, strict typing, type errors, infer, extends…

mcollina/skills · 108 tokens