typescript

A set of guidelines for writing safer and faster TypeScript, a programming language that adds types to JavaScript. It covers the compiler, type checking, asynchronous code, imports, and type definitions.

In plain words
What is it for?
Use it when changing .ts, .tsx, or .d.ts files, tuning tsconfig or tsc, organizing modules, improving Promise-based code, or fixing type-safety issues.
Why use it?
It helps address slow builds, type errors, unsafe values, memory problems, and hard-to-maintain code without focusing on beginner TypeScript lessons or a particular framework.

Skill for Claude CodeCodex

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/plunderstruck/scip-query/typescript
Any agent
npx skills add PlunderStruck/scip-query --skill typescript
Clone the repo
git clone --depth 1 https://github.com/PlunderStruck/scip-query

Made for: Claude Code, Codex.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 858 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 $0.00057 $0.00858
Opus 5 $0.00028 $0.00429
Sonnet 5 $0.00011 $0.00172
Haiku 4.5 $0.00006 $0.00086

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

.agents/skills/typescript/SKILL.md · 92 lines

How it starts

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

TypeScript Best Practices

Use this skill as a compact router to the TypeScript rule pack. A TypeScript rule is a narrow, evidence-backed coding guideline whose purpose is to improve compile speed, runtime behavior, type safety, or maintainability for TypeScript projects.

The full compiled document is AGENTS.md. Individual detailed rules live under references/.

Rules

  1. Start with the highest-impact category that matches the work.
  2. Read the specific reference file before applying a non-obvious rule.
  3. Prefer project conventions when a rule conflicts with established local architecture.
  4. Verify with the project typecheck, test, or build command after edits.

Categories

Priority Category Use for Prefix
1 Type system performance slow type checking, complex types, exported APIs type-
2 Compiler configuration tsconfig, project references, included files tscfg-
3 Async patterns Promise concurrency, async wrappers, return types async-
4 Module organization imports, barrels, dynamic imports, @types scope module-
5 Type safety unknown, guards, exhaustive checks, nullability safety-
6 Memory management timers, listeners, closures, global caches mem-
7 Runtime optimization hot loops, lookups, object spread, string methods runtime-
8 Advanced patterns branded types, satisfies, template literal types advanced-

Quick Map

Type system:

  • type-interfaces-over-intersections
  • type-avoid-large-unions
  • type-extract-conditional-types
  • type-limit-recursion-depth
  • type-explicit-return-types
  • type-avoid-deep-generics
  • type-simplify-mapped-types

Compiler:

  • tscfg-enable-incremental
  • tscfg-skip-lib-check
  • tscfg-isolate-modules
  • tscfg-project-references
  • tscfg-exclude-properly
  • tscfg-strict-function-types

Async and modules:

  • async-parallel-promises
  • async-defer-await
  • async-avoid-loop-await
  • async-explicit-return-types
  • async-avoid-unnecessary-async
  • module-avoid-barrel-imports
  • module-avoid-circular-dependencies
  • module-use-type-imports
  • module-dynamic-imports
  • module-control-types-inclusion

Read the full file on GitHub · 92 lines

Files

What ships with it

46 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. 2d ago First seen · 92 lines · 57 tokens per session scan A 4e7abd3ecd51

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository PlunderStruck/scip-query (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 57 tokens to every session and 858 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

build-and-test

Build, run and debug this C++ project — CMake presets, CTest, sanitizers, clang-tidy, and which gate tier to run. Triggers: build, compile, test, ctest, cmake, sanitizer, asan, segfault, linker error.

developerz-ai/universal-lsp · 61 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens

custom-features

Author a TanStack Table v9 feature plugin across every FeatureMap and API installation surface: state, options, column definitions, table, column, row, cell, header, row-model functions/caches, defaults, prototypes, and table/row/column instance data lifecycles. Load for initTableInstanceData, resetTableInstanceData…

TanStack/table · 93 tokens

effect-and-errors

Composing Effect programs, domain errors, HttpError, repository error types, or error propagation at HTTP boundaries.

latitude-dev/latitude-llm · 26 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

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