TypeScript

TypeScript is a skill for Claude Code, Codex from kok-o/contextos-agents. It costs 10 tokens per session (898 once invoked), scanned A, original, Apache-2.0.

A strict TypeScript coding guide for typed JavaScript projects. It requires explicit, checked data types and safer handling of missing or unknown values.

In plain words
What is it for?
Use it when writing or reviewing TypeScript or JavaScript, especially public functions, domain models, and code that handles different data shapes.
Why use it?
It helps prevent type errors and unsafe shortcuts such as unrestricted any values, unchecked type casts, and non-null assertions. It also keeps exported functions and shared constants predictable for their users.

Skill for Claude CodeCodex

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

Good fit Use it when writing or reviewing TypeScript or JavaScript, especially public functions, domain models, and code that handles different data shapes.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/kok-o/contextos-agents/typescript/github.svg)](https://agentmods.dev/skills/kok-o/contextos-agents/typescript)
Your own site
<a href="https://agentmods.dev/skills/kok-o/contextos-agents/typescript"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/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/kok-o/contextos-agents/typescript"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 898 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.00010 $0.00898
Opus 5.5 $0.00004 $0.00359
Sonnet 5.5 $0.00002 $0.00180
Haiku 4.5 $0.00001 $0.00090

Measured today against content hash 663023eb2bb4, 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 today.

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.

catalog/skills/typescript/SKILL.md · 127 lines

How it starts

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

TypeScript

Overview

Strict TypeScript engineering standard. Enforces noImplicitAny, discriminated unions, branded types, immutability, exhaustive switch checks, and zero unsafe any or as unknown as T casts.

When to Use

Activate on all TypeScript and JavaScript codebases to ensure compile-time type safety, robust domain modeling, and foolproof function contracts.

Negative Constraints (What NOT to Do)

  1. NEVER use any: Use unknown with type guards, discriminated unions, or Zod schemas.
  2. NEVER use type assertions (as Type or as unknown as Type) to bypass safety: Fix the underlying type signature or use runtime narrowing (instanceof, typeof, in).
  3. NEVER use non-null assertions (foo!.bar): Handle null and undefined with optional chaining (?.) or explicit error guards.
  4. NEVER export mutable global arrays or object constants: Always mark constant objects and arrays with as const and readonly.
  5. NEVER omit explicit return types on exported functions: Exported public APIs must declare explicit return types to protect consumers.

Rules & Patterns

Strict Mode

Always use strict TypeScript configuration:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true
  }
}

Types

  • Prefer interface for object shapes, type for unions/intersections
  • No any - use unknown if type is truly unknown, then narrow
  • Explicit return types for exported functions
  • Const assertions - as const for literal types
// Good
interface User {
  id: string;
  name: string;
  role: 'admin' | 'user';
}

// Unions
type Result<T> = { ok: true; data: T } | { ok: false; error: string };

Utility Types

  • Partial<T> - all properties optional
  • Required<T> - all properties required
  • Pick<T, K> - select specific properties
  • Omit<T, K> - remove specific properties
  • Record<K, V> - key-value map

Read the full file on GitHub · 127 lines

Files

What ships with it

4 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. today First seen · 127 lines · 10 tokens per session scan A 663023eb2bb4

Subscribe to this mod's changes

TypeScript is a skill published in the GitHub repository kok-o/contextos-agents (10 stars, last pushed today), licensed Apache-2.0. It adds 10 tokens to every session and 898 once invoked, about $0.0000 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-10-25.

Related

Other skills, from other repositories

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

deepelementlab/jupyter-studio · 28 tokens

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project, or migrating its existing lint and format config onto Ultracite (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or…

haydenbleasel/ultracite · 179 tokens

type-safety

TypeScript type safety conventions for the Playwright scaffold — the "no any" rule, Zod 4 schema patterns (z.strictObject, top-level validators like z.uuid / z.email / z.url / z.int / z.enum), schemas built directly from the documented OpenAPI / Swagger contract (response envelope spelled out per endpoint), type…

idavidov13/agentic-playwright · 208 tokens

jest-unit

Unit testing skill using Jest for TypeScript and JavaScript, covering mocking, spies, snapshots, coverage, async testing, and custom matchers.

PramodDutta/qaskills · 32 tokens

refactor-values

Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification. Use BEFORE changing any enum member's string value (ApiEndpoints., Messages., Roles, StorageStatePaths), renaming any enum key, or editing any existing…

idavidov13/agentic-playwright · 125 tokens

bun-runtime-expert

Expert guide for Bun 1.2+ JavaScript/TypeScript runtime — native Bun.sql Postgres client, Bun.s3 object storage, text lockfile, multi-core HTTP clusters, and bun:test / Panduan ahli runtime Bun 1.2+.

roedyrustam/vibes-plug · 57 tokens