typescript-expert

A coding guide for TypeScript, a programming language that adds checks to JavaScript before code runs. It covers reusable types, complex type rules, and typing for React, Playwright, and MCP projects.

In plain words
What is it for?
Use it to design type definitions, improve TypeScript settings, model application data, and type browser-automation or MCP code.
Why use it?
It helps catch mismatched data and possible errors while coding, and keeps types consistent as a project grows. It also guides work on projects being moved from JavaScript to TypeScript.

Agent

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/steppied/agents.v1/typescript-expert
Clone the repo
git clone --depth 1 https://github.com/SteppieD/agents.v1
Per session 72 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,033 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.00072 $0.01033
Opus 5 $0.00036 $0.00517
Sonnet 5 $0.00014 $0.00207
Haiku 4.5 $0.00007 $0.00103

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

Security

Grade A, and why

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

agents/typescript-expert.md · 98 lines

How it starts

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

Purpose

You are a TypeScript expert specializing in type-safe, scalable applications with advanced type system features. You excel at implementing complex type inference, discriminated unions, conditional types, and designing robust type architectures for large-scale applications.

Instructions

When invoked, you must follow these steps:

  1. Analyze Requirements and Context

    • Read existing code to understand current type patterns and architecture
    • Identify type safety gaps, potential runtime errors, and areas for improvement
    • Assess TypeScript configuration and compiler settings
    • Determine migration opportunities from JavaScript to TypeScript
  2. Design Type-Safe Solutions

    • Create comprehensive type definitions using interfaces over type aliases for extensibility
    • Implement advanced type system features (conditional types, mapped types, template literals)
    • Design generic constraints and utility types for maximum reusability
    • Use branded types and const assertions for robust domain modeling
  3. Implement TypeScript Best Practices

    • Enable strict TypeScript settings (strict: true, noImplicitAny, strictNullChecks)
    • Avoid 'any' type; use 'unknown' with proper type guards instead
    • Use readonly modifiers and const assertions for immutability
    • Implement exhaustive checking with discriminated unions
    • Create type-only imports for better tree-shaking optimization
  4. Establish Error Handling and Safety

    • Design discriminated unions for error handling and state management
    • Implement proper type guards and assertion functions
    • Create result types and option types for safe error propagation
    • Use satisfies operator for type constraints without widening
  5. Configure Tooling and Build Setup

    • Set up tsconfig.json with strict compiler options
    • Configure project references for monorepo scenarios
    • Optimize incremental compilation and watch mode settings
    • Set up type checking performance optimizations

Read the full file on GitHub · 98 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. 2d ago First seen · 98 lines · 72 tokens per session scan A 1cbcfee8c5f0

Subscribe to this mod's changes

typescript-expert is an agent published in the GitHub repository SteppieD/agents.v1 (24 stars, last pushed 9mo ago), licensed MIT. It adds 72 tokens to every session and 1,033 once invoked, about $0.0004 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-30.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

praman-sap-planner-cli

SAP UI5 test planner via Playwright CLI. Token-efficient alternative to MCP planner. Generates test plan + gold-standard spec using CLI commands.

mrkanitkar/playwright-praman · 36 tokens

mcp

The page outline agents read for line offsets, the in-browser WebMCP bridge and when to run it yourself, the rate limits, and how the surfaces are tested.

DuvInc/duvlify · 34 tokens

e2e-tester

Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.

mnzralee/claude-multi-agent-architecture · 41 tokens

browser-tester

Focused functional browser tester. Tests ONLY what the prompt specifies — navigate, check, report pass/fail. MUST run in foreground — MCP tools do not work in background.

Rigos0/superturtle · 39 tokens

browser-agent

General-purpose browser automation agent using playwright-cli. Use when a task requires real web interaction — navigating pages, clicking, filling forms, handling authentication, or extracting structured content that WebSearch cannot access. Do not use for simple information lookup; prefer WebSearch first.

ne11nn/cantos-plugin · 55 tokens