effective-typescript

effective-typescript is a skill for Claude Code, Codex from booklib-ai/booklib. It costs 101 tokens per session (3,446 once invoked), scanned A, original, MIT.

A TypeScript coding and review guide based on the 62 practices in Dan Vanderkam’s Effective TypeScript. TypeScript adds type checking to JavaScript programs.

In plain words
What is it for?
Use it to write or review TypeScript, improve type design, reduce unsafe use of any, and migrate JavaScript code to TypeScript.
Why use it?
It helps design clearer types and catch common problems involving unsafe values, declarations, inference, and JavaScript interoperability.

Skill for Claude CodeCodex

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

Good fit Use it to write or review TypeScript, improve type design, reduce unsafe use of any, and migrate JavaScript code to TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/booklib-ai/booklib/effective-typescript
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 booklib-ai/booklib --skill effective-typescript
Clone the repo
git clone --depth 1 https://github.com/booklib-ai/booklib

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 effective-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/booklib-ai/booklib/effective-typescript/github.svg)](https://agentmods.dev/skills/booklib-ai/booklib/effective-typescript)
Your own site
<a href="https://agentmods.dev/skills/booklib-ai/booklib/effective-typescript"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/effective-typescript/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 effective-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/booklib-ai/booklib/effective-typescript"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/effective-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,446 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.00101 $0.03446
Opus 5.5 $0.00040 $0.01378
Sonnet 5.5 $0.00020 $0.00689
Haiku 4.5 $0.00010 $0.00345

Measured 1mo ago against content hash 9997d669da45, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

effective-typescript 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/review.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/effective-typescript/SKILL.md · 263 lines

How it starts

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

Effective TypeScript Skill

Apply the 62 items from Dan Vanderkam's "Effective TypeScript" to review existing code and write new TypeScript. This skill operates in two modes: Review Mode (analyze code for violations) and Write Mode (produce idiomatic, well-typed TypeScript from scratch).

Reference Files

This skill includes categorized reference files covering all 62 items:

  • ref-01-getting-to-know-ts.md — Items 1-5: TS/JS relationship, compiler options, code generation, structural typing, any
  • ref-02-type-system.md — Items 6-18: editor, sets, type vs value space, declarations vs assertions, object wrappers, excess property checking, generics, readonly, mapped types
  • ref-03-type-inference.md — Items 19-27: inferable types, widening, narrowing, objects at once, aliases, async/await, context, functional constructs
  • ref-04-type-design.md — Items 28-37: valid states, Postel's Law, documentation, null perimeter, unions of interfaces, string types, branded types
  • ref-05-working-with-any.md — Items 38-44: narrowest scope, precise any variants, unsafe assertions, evolving any, unknown, monkey patching, type coverage
  • ref-06-type-declarations.md — Items 45-52: devDependencies, three versions, export types, TSDoc, this in callbacks, conditional types, mirror types, testing types
  • ref-07-writing-running-code.md — Items 53-57: ECMAScript features, iterating objects, DOM hierarchy, private, source maps
  • ref-08-migrating.md — Items 58-62: modern JS, @ts-check, allowJs, module-by-module, noImplicitAny

How to Use This Skill

Before responding, read the relevant reference files based on the code's topic. For a general review, read all files. For targeted work (e.g., type design), read the specific reference (e.g., ref-04-type-design.md).


Mode 1: Code Review

When the user asks you to review existing TypeScript code, follow this process:

Step 1: Read Relevant References

Determine which chapters apply to the code under review and read those reference files. If unsure, read all of them.

Read the full file on GitHub · 263 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 263 lines · 101 tokens per session scan A 9997d669da45

Subscribe to this mod's changes

effective-typescript is a skill published in the GitHub repository booklib-ai/booklib (39 stars, last pushed 6mo ago), licensed MIT. It adds 101 tokens to every session and 3,446 once invoked, about $0.0004 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-30.