typescript

typescript is a skill for Claude Code from kouroshez/coding-os. It costs 179 tokens per session (1,482 once invoked), scanned A, original, Apache-2.0.

A guide to using TypeScript's type checker to describe data accurately and catch certain programming mistakes before the code runs.

In plain words
What is it for?
Use it when configuring strict TypeScript projects, modelling application data, fixing type errors, and choosing safer patterns for null values, arrays, generics, and unions.
Why use it?
It helps prevent the type system from missing errors caused by loose settings, unchecked values, or escape hatches such as any.

Skill for Claude Code

Written for Claude Code: paths in frontmatter.

Good fit Use it when configuring strict TypeScript projects, modelling application data, fixing type errors, and choosing safer patterns for null values, arrays, generics, and unions.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kouroshez/coding-os/typescript"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 179 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,482 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.00179 $0.01482
Opus 5 $0.00089 $0.00741
Sonnet 5 $0.00036 $0.00296
Haiku 4.5 $0.00018 $0.00148

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

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check_tsconfig.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.

src/core/skills/typescript/SKILL.md · 111 lines

How it starts

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

TypeScript

TypeScript is only as safe as its strictness lets it be. With strict off (or any/! sprinkled in) it's JavaScript with extra syntax — the checker is on but blindfolded. The craft is letting the type system prove the bug can't happen, not narrating types after the fact.

Check a tsconfig for the strict flags that actually matter: python3 scripts/check_tsconfig.py tsconfig.json

Strict is the floor

// tsconfig.json — the flags that catch real bugs
{
  "compilerOptions": {
    "strict": true,                       // the umbrella — turn it on, always
    "noUncheckedIndexedAccess": true,     // arr[i] is T | undefined (it really is!)
    "noImplicitOverride": true,
    "exactOptionalPropertyTypes": true,
    "noFallthroughCasesInSwitch": true
  }
}

strict: true enables noImplicitAny, strictNullChecks, and more — without it, null/undefined are assignable everywhere and the #1 class of runtime crash goes uncaught. noUncheckedIndexedAccess is the highest-value non-default: it makes arr[i] honestly T | undefined. Full rationale → references/strictness.md.

unknown, never any

// Wrong — any disables the checker for everything downstream; the bug ships
function parse(json: string): any { return JSON.parse(json); }
const u = parse(s); u.naem.toUpperCase();   // typo compiles, crashes at runtime

// Correct — unknown forces you to narrow before use
function parse(json: string): unknown { return JSON.parse(json); }
const u = parse(s);
if (isUser(u)) u.name.toUpperCase();         // narrowed via a type guard

any is a hole in the type system that spreads — every value derived from an any is any. unknown is the safe top type: you must narrow it before you touch it. Reserve any for genuinely untypable third-party seams, and isolate it behind a typed wrapper.

Discriminated unions over optional-flag soup

// Wrong — every field optional; illegal combinations compile
type Result = { ok?: boolean; data?: User; error?: string };

// Correct — a discriminant makes illegal states unrepresentable
type Result =
  | { status: "ok"; data: User }
  | { status: "error"; error: string };

function render(r: Result) {
  if (r.status === "ok") r.data;     // narrowed — r.error doesn't exist here
  else r.error;                       // exhaustive
}

Read the full file on GitHub · 111 lines

Files

What ships with it

5 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. 5d ago First seen · 111 lines · 179 tokens per session scan A edead08b36c1

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 179 tokens to every session and 1,482 once invoked, about $0.0009 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-09-03.

Related

Other skills, from other repositories

typescript

TypeScript strict mode with eslint and jest.

alinaqi/maggy · 10 tokens

typescript-project

Modern TypeScript project architecture guide for 2025. Use when creating new TS projects, setting up configurations, or designing project structure. Covers tech stack selection, layered architecture, and best practices.

majiayu000/spellbook · 42 tokens

codebase-architecture

Designs module contracts, deepens existing boundaries, and installs enforceable repository guardrails. Use when asked to "design the architecture", "simplify our modules", or "harden the repo". For one feature plan use planning; for diff cleanup use tidy; for tenancy use multi-tenant-architecture.

mblode/agent-skills · 67 tokens

scaffold-cli

Scaffolds a TypeScript CLI and npm package with the house toolchain, dual tsdown outputs, CLI contracts, changesets, and publishing templates. Use when asked to "scaffold a CLI" or "start an npm package". For an existing package release use autoship; for existing API ergonomics use dx-audit.

mblode/agent-skills · 71 tokens

database-orm-expert

Expert guide for database schema design, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrations, query optimization, and type-safe SQL patterns in TypeScript / Panduan ahli untuk desain skema database, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrasi, optimasi query, dan pola SQL type-safe di TypeScript.

roedyrustam/vibes-plug · 82 tokens

js-backend-expert

Expert-level skill for Node.js 24+ (LTS), Bun 1.2+, and Deno 2.x backend development. Covers Express 5, Fastify 5, Hono v4, NestJS, Prisma 6, Drizzle ORM, WebSockets, BullMQ, OpenTelemetry, and microservices in English and Indonesian.

roedyrustam/vibes-plug · 77 tokens