typescript

Current guidance for TypeScript, a programming language that adds type checking to JavaScript. It covers compiler settings, type definitions, asynchronous code, modules, runtime checks, memory use, and performance.

In plain words
What is it for?
Use it when configuring tsconfig.json, writing complex types or generics, reviewing async code and imports, diagnosing type errors, or improving compilation and runtime performance.
Why use it?
TypeScript projects can become difficult to compile, organize, and maintain as their types and dependencies grow. This add-on helps identify safer patterns and configuration choices for common code and performance problems.

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/pymodel/react-frontend-skills/typescript
Any agent
npx skills add PyModel/react-frontend-skills --skill typescript
Clone the repo
git clone --depth 1 https://github.com/PyModel/react-frontend-skills

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,971 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.00061 $0.01971
Opus 5 $0.00030 $0.00986
Sonnet 5 $0.00012 $0.00394
Haiku 4.5 $0.00006 $0.00197

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

Security

Grade A, and why

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

skills/typescript/SKILL.md · 93 lines

How it starts

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

TypeScript Best Practices

Comprehensive TypeScript 7-compatible guide with 44 rules across 8 categories, covering compiler configuration, type-system performance, async code, modules, safety, and measured runtime optimization.

When to Apply

Reference these guidelines when:

  • Configuring tsconfig.json for a new or existing project
  • Writing complex type definitions or generics
  • Optimizing async/await patterns and data fetching
  • Organizing modules and managing imports
  • Reviewing code for compilation or runtime performance

Rule Categories by Priority

Priority Category Impact Prefix
1 Type System Performance CRITICAL type-
2 Compiler Configuration CRITICAL tscfg-
3 Async Patterns HIGH async-
4 Module Organization HIGH module-
5 Type Safety Patterns MEDIUM-HIGH safety-
6 Memory Management MEDIUM mem-
7 Runtime Optimization LOW-MEDIUM runtime-
8 Advanced Patterns LOW advanced-

Table of Contents

  1. Type System Performance — CRITICAL
  2. Compiler Configuration — CRITICAL
  3. Async Patterns — HIGH
  4. Module Organization — HIGH
  5. Type Safety Patterns — MEDIUM-HIGH
  6. Memory Management — MEDIUM
  7. Runtime Optimization — LOW-MEDIUM
  8. Advanced Patterns — LOW

Read the full file on GitHub · 93 lines

Files

What ships with it

44 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. 2d ago First seen · 93 lines · 61 tokens per session scan A 079d426856ec

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository PyModel/react-frontend-skills (3 stars, last pushed 12d ago), licensed MIT. It adds 61 tokens to every session and 1,971 once invoked, about $0.0003 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

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…

haydenbleasel/ultracite · 142 tokens

type-safety

TypeScript type safety conventions for the Playwright scaffold — the "no any" rule, Zod 4 schema patterns (z.strictObject, top-level validators like z.uuid / z.email / z.url / z.int / z.enum), schemas built directly from the documented OpenAPI / Swagger contract (response envelope spelled out per endpoint), type…

idavidov13/agentic-playwright · 208 tokens

enums

TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums. Use when adding a new API endpoint path, UI message, role, storage-state…

idavidov13/agentic-playwright · 148 tokens

architecture-audit

Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…

org2AI/ORG2 · 70 tokens

lov-app-generator

Use when the user asks for "App生成器", "生成 Web App", "生成 Tauri App", "生成原生 macOS App", "Finder Quick Action", "只创建 web", or to standardize an existing app with branding, CI/CD, native integration, and Lovinsp where applicable.

lovstudio/skills · 66 tokens

lov-maintain-partners

Maintain the Skill Publisher website's partners section AND align partner logo rows on event posters / hero strips: reuse lov-find-logo for brand logo discovery, normalize collected logos to a 240px-tall content canvas (retina-ready), rasterize SVGs via rsvg-convert before normalizing (so SVG viewBox padding gets…

lovstudio/skills · 294 tokens