typescript

typescript is a skill for Claude Code from dean0x/devflow. It costs 45 tokens per session (1,302 once invoked), scanned A, original, MIT.

A TypeScript coding guide for checking data and defining safer types, including generics, type guards, and API contracts.

In plain words
What is it for?
Use it when working in TypeScript files, handling unknown input, designing APIs, or making types more precise.
Why use it?
It helps catch invalid data and unfinished cases while coding, instead of leaving them to fail later at runtime.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when working in TypeScript files, handling unknown input, designing APIs, or making types more precise.

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

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/dean0x/devflow/typescript/github.svg)](https://agentmods.dev/skills/dean0x/devflow/typescript)
Your own site
<a href="https://agentmods.dev/skills/dean0x/devflow/typescript"><img src="https://agentmods.dev/badge/skills/dean0x/devflow/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/dean0x/devflow/typescript"><img src="https://agentmods.dev/badge/skills/dean0x/devflow/typescript.svg" alt="Reviewed on agentmods" width="80" 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,302 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.01302
Opus 5.5 $0.00018 $0.00521
Sonnet 5.5 $0.00009 $0.00260
Haiku 4.5 $0.00005 $0.00130

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

src/assets/skills/typescript/SKILL.md · 151 lines

How it starts

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

TypeScript Patterns

Iron Law

UNKNOWN OVER ANY

Never use any. Use unknown with type guards instead. any disables TypeScript's entire value proposition — if you need flexibility, use generics; if you need to handle arbitrary data, use unknown and validate. any is giving up. [1, Item 43]

When This Skill Activates

  • Working with TypeScript codebases or designing type-safe APIs
  • Using generics, type guards, branded types, or conditional types

Type Safety Fundamentals

Prefer Unknown Over Any [1, Item 43]

Types are sets of values [1, Item 7]. any opts out entirely; unknown forces narrowing.

// BAD: disables all type checking [4][17]
function parse(json: string): any { return JSON.parse(json); }
// GOOD: unknown forces narrowing before use [1, Item 43]
function parse(json: string): unknown { return JSON.parse(json); }
if (isUser(data)) console.log(data.name); // type-safe after guard

Exhaustive Checks [1, Item 33][13]

type Status = 'pending' | 'running' | 'completed' | 'failed';
function handleStatus(status: Status): string {
  switch (status) {
    case 'pending': return 'Waiting...';
    case 'running': return 'In progress...';
    case 'completed': return 'Done!';
    case 'failed': return 'Error occurred';
    default: const _: never = status; throw new Error(`Unhandled: ${_}`);
  }
}

Generic Patterns [2][6]

function first<T>(items: T[]): T | undefined { return items[0]; }
// Constrained key access [1, Item 54]
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] { return obj[key]; }
interface Repository<T, ID = string> { findById(id: ID): Promise<T | null>; save(entity: T): Promise<T>; }

Discriminated Unions [1, Item 28][24]

Make illegal states unrepresentable — encode variants in the type [24].

type Result<T, E> = { ok: true; value: T } | { ok: false; error: E };
type RequestState<T> =
  | { status: 'idle' } | { status: 'loading' }
  | { status: 'success'; data: T } | { status: 'error'; error: Error };

Read the full file on GitHub · 151 lines

Files

What ships with it

6 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. 7d ago Changed · -24 tokens per session c153f9061b3f
  2. 1mo ago First seen · 151 lines · 69 tokens per session scan A 15e81d000522

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository dean0x/devflow (20 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,302 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

printing-press

Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or Postman spec via the lean research -> generate -> build -> shipcheck loop. Use when the user says build a CLI, wrap this API, set up a new integration, add a connector, integrate with a…

mvanhorn/cli-printing-press · 86 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

go

Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…

ericrisco/rsc-harness · 86 tokens

laravel

Use when building or extending a Laravel 11/12 app — Eloquent models, migrations and relationships, routing with controllers and Form Requests, queues and background jobs, framework-native security (validation, mass-assignment, policies, signed URLs, rate limiting), and Pest/PHPUnit feature tests. NOT pure PHP…

ericrisco/rsc-harness · 76 tokens

design-review

Deep design review of Go codebase — naming, structure, consistency, interfaces, error handling. Scores each dimension and provides actionable fixes.

dimetron/pi-go · 30 tokens

django

Use when building, reviewing, securing, testing or shipping a Django app — models, migrations, QuerySets/managers, FBV/CBV views, forms, the admin, settings split, and Django REST Framework (serializers, ModelViewSet, permissions). NOT async FastAPI/Pydantic services (that is fastapi), NOT Postgres schema/index work…

ericrisco/rsc-harness · 84 tokens