typescript-expert

typescript-expert is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 45 tokens per session (1,853 once invoked), scanned A, original, MIT.

A coding and review guide for TypeScript and JavaScript. TypeScript is JavaScript with optional type checks that can catch many mistakes before the program runs.

In plain words
What is it for?
Use it when writing or reviewing TypeScript and JavaScript, building React components or Node.js services, configuring projects, migrating code, or debugging type errors.
Why use it?
It helps make code easier to check and maintain by encouraging safer types, consistent patterns, and suitable approaches for React, Node.js, tests, and build tools.

Skill for Claude CodeCodex

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

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/apexiq/skillsmith/typescript_expert
Any agent
npx skills add ApexIQ/skillsmith --skill typescript_expert
Clone the repo
git clone --depth 1 https://github.com/ApexIQ/skillsmith

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/typescript_expert.svg)](https://agentmods.dev/skills/apexiq/skillsmith/typescript_expert)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/typescript_expert"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/typescript_expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,853 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.1 $0.00045 $0.01853
Opus 5 $0.00023 $0.00927
Sonnet 5 $0.00009 $0.00371
Haiku 4.5 $0.00005 $0.00185

Measured 6d ago against content hash 0ad50d0a17ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

.agent/skills/typescript_expert/SKILL.md · 272 lines

How it starts

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

📘 TypeScript Expert — Production-Grade TypeScript

Philosophy: TypeScript's type system is your first line of defense. If it compiles, it should be mostly correct. If you're using any, you're using JavaScript with extra steps.

1. When to Use This Skill

  • Writing new TypeScript/JavaScript modules
  • Reviewing TS/JS code for patterns and type safety
  • Building React components or Node.js services
  • Configuring TypeScript projects (tsconfig, bundlers)
  • Migrating JavaScript to TypeScript
  • Debugging type errors

2. Type System Mastery

Use Discriminated Unions Over Enums

// GOOD: Discriminated union — exhaustive checking
type Result<T> =
  | { status: "success"; data: T }
  | { status: "error"; error: string }
  | { status: "loading" };

function handleResult(result: Result<User>) {
  switch (result.status) {
    case "success":
      console.log(result.data.name); // TS knows data exists
      break;
    case "error":
      console.error(result.error); // TS knows error exists
      break;
    case "loading":
      showSpinner();
      break;
    // If you miss a case, TS will warn you
  }
}

// BAD: Enum + separate error field — runtime bugs
enum Status { Success, Error, Loading }
interface Result { status: Status; data?: User; error?: string; }

Utility Types

// Don't reinvent — use built-in utility types
type UserCreate = Omit<User, "id" | "createdAt">;
type UserUpdate = Partial<Pick<User, "name" | "email">>;
type ReadonlyUser = Readonly<User>;
type UserRecord = Record<string, User>;

// Branded types for type-safe IDs
type UserId = string & { __brand: "UserId" };
type TeamId = string & { __brand: "TeamId" };

function getUser(id: UserId): User { ... }
// getUser("abc" as TeamId) → Type error!

Zod for Runtime Validation

import { z } from "zod";

const UserSchema = z.object({
  name: z.string().min(2).max(100),
  email: z.string().email(),
  role: z.enum(["member", "admin", "viewer"]).default("member"),
});

type User = z.infer<typeof UserSchema>; // Type derived from schema

// Validate at API boundary
const result = UserSchema.safeParse(requestBody);
if (!result.success) {
  return res.status(400).json({ errors: result.error.issues });
}
const user: User = result.data; // Fully typed and validated

Read the full file on GitHub · 272 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. 6d ago First seen · 272 lines · 45 tokens per session scan A 0ad50d0a17ba

Subscribe to this mod's changes

typescript-expert is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 5mo ago), licensed MIT. It adds 45 tokens to every session and 1,853 once invoked, about $0.0002 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.