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

Written for no agent in particular: nothing here depends on one.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mh4gf/claude-code/ts-review
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.

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/github.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/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 ts-review

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00190 $0.01709
Opus 5.5 $0.00076 $0.00684
Sonnet 5.5 $0.00038 $0.00342
Haiku 4.5 $0.00019 $0.00171

Measured 2mo ago against content hash 3ff3c717f45c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 5d ago), licensed MIT. It adds 190 tokens to every session and 1,709 once invoked, about $0.0008 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-08-31.

Related

Other skills, from other repositories

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

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

hashgraph-online/awesome-codex-plugins · 28 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens

plankton-code-quality

Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

loulanyue/awesome-claude-notes · 34 tokens

best-practices

Language-specific best practices, code quality standards, and framework detection rules. Use when executing refactoring workflows, applying code quality rules, detecting frameworks, or checking language-specific patterns for TypeScript, Python, Go, Swift, or React.

FradSer/dotclaude · 52 tokens

code-review-typescript

Provides TypeScript-specific code review patterns covering strict mode, ESM, type safety, branded types, discriminated unions, async patterns, runtime safety, and common anti-patterns. Activates on detection of tsconfig.json, .ts, or .tsx files during code review — loaded automatically by dh:code-reviewer.

Jamie-BitFlight/claude_skills · 70 tokens