typescript

typescript is a skill for Claude Code from xobotyi/cc-foundry. It costs 43 tokens per session (6,199 once invoked), scanned B, original, MIT.

A guide to TypeScript, a version of JavaScript that adds compile-time type checking. It covers strict settings and patterns for expressing and checking data types.

In plain words
What is it for?
Use it when writing, reviewing, or debugging TypeScript files, type definitions, generics, compiler settings, and type-level code.
Why use it?
It helps catch many mistakes before the program runs and avoids hiding type problems with unsafe casts or untyped values.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions Claude Code.

Part of the javascript plugin — 5 skills shipped together

Good fit Use it when writing, reviewing, or debugging TypeScript files, type definitions, generics, compiler settings, and type-level code.

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

Made for: Claude Code.

Or install javascript, the plugin that ships this one along with the rest of its 5 skills.

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/xobotyi/cc-foundry/typescript/github.svg)](https://agentmods.dev/skills/xobotyi/cc-foundry/typescript)
Your own site
<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/typescript"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/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/xobotyi/cc-foundry/typescript"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,199 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00043 $0.06199
Opus 5.5 $0.00017 $0.02480
Sonnet 5.5 $0.00009 $0.01240
Haiku 4.5 $0.00004 $0.00620

Measured 7d ago against content hash ce483e5fa637, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

typescript scanned grade B with 1 finding 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

When **reviewing** TypeScript, cite the violation and show the fix inline. Do not lecture.
plugins/javascript/skills/typescript/SKILL.md · 356 lines

How it starts

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

A type earns its place by making a wrong program fail to compile. Three biases decide most calls:

  • Make the invalid state unrepresentable, then let inference carry the rest. An annotation that restates what the compiler already infers is noise; a type that admits a state the domain forbids is a defect that will be found at runtime.
  • Every escape hatch is a defect report against a type. any, as, !, and @ts-ignore each move a failure from the compiler to production. Reaching for one means the declaration is wrong, and that is where the fix belongs.
  • The tsconfig.json decides what the compiler catches; the pinned release decides what may be written. Read both before writing code.

Compiler Release

The typescript entry in the project's package.json sets the release. Read it before writing code and never reach for a feature or an option above it. Releases below 5.5 are not indexed here; a rule naming a feature older than 5.5 carries its version where it is named.

  • 5.5 — inferred type predicates; isolatedDeclarations; ${configDir}; regex literal syntax checking
  • 5.6 — noUncheckedSideEffectImports; noCheck; strictBuiltinIteratorReturn; always-truthy and always-nullish checks become errors; package.json "type" inside node_modules is respected in every module mode
  • 5.7 — rewriteRelativeImportExtensions; never-initialized variable checks; a JSON import into an ES module under nodenext requires with { type: "json" }; every TypedArray takes a buffer type parameter
  • 5.8 — erasableSyntaxOnly; module node18; libReplacement; require() of ESM under nodenext; each branch of a conditional in a return checked separately
  • 5.9 — import defer; module node20; the prescriptive tsc --init template; ArrayBuffer stops being a supertype of the TypedArray types
  • 6.0 — strict, module: esnext, target: es2025, noUncheckedSideEffectImports: true, libReplacement: false, rootDir: ".", and types: [] become the defaults; outFile, moduleResolution: classic/node10, target: es5, downlevelIteration, module: amd/umd/systemjs/none, baseUrl, esModuleInterop: false, and alwaysStrict: false are deprecated, each silenceable for one release with "ignoreDeprecations": "6.0"; the module keyword for a namespace and the assert import attribute are hard errors ignoreDeprecations does not reach; stableTypeOrdering; subpath imports starting #/
  • 7.0 — the compiler is a native Go binary; every 6.0 deprecation becomes a removal; the 6.0 programmatic API is gone; stableTypeOrdering is fixed on; --checkers, --builders, --singleThreaded; template-literal inference consumes whole Unicode code points

Read [${CLAUDE_SKILL_DIR}/references/versions/ts-N.N.md] — one file per release, ts-5.5.md through ts-7.0.md — when writing against a feature near the pinned release, and whenever raising it. Each carries what its release added, which existing behavior it changed, and the traps it introduced.

A 6.0 or 7.0 upgrade is a configuration change before it is a code change. Set rootDir and types explicitly before anything else. A rootDir left to the new default moves output into dist/src/ when the config sits above the sources, and reports TS5011 naming the directory it wants. types is the one that fails silently: its [] default drops every global declaration until the packages are listed, and the symptom is a burst of Cannot find name errors that say nothing about the option that caused them.

Read the full file on GitHub · 356 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. 7d ago Changed · +34 lines ce483e5fa637
  2. 1mo ago Changed · +77 lines · -17 tokens per session cc475196741f
  3. 1mo ago First seen · 245 lines · 60 tokens per session scan B d5f69f181266

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository xobotyi/cc-foundry (22 stars, last pushed 7d ago), licensed MIT. It adds 43 tokens to every session and 6,199 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). 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

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

league-akari-shard-development

Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.

LeagueAkari/LeagueAkari · 58 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

typescript-magician

Designs complex generic types, refactors any types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing any types, strict typing, type errors, infer, extends…

mcollina/skills · 108 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens