typescript

typescript is a skill for Claude Code from gaia-react/gaia. It costs 72 tokens per session (1,209 once invoked), scanned A, original, MIT.

A set of conventions for writing TypeScript code. TypeScript adds type checking to JavaScript and helps describe the data that code accepts and returns.

In plain words
What is it for?
Naming variables and functions, defining types, using schemas, typing imports, and mapping API field names consistently.
Why use it?
It makes code easier to understand and helps catch mismatched data or unclear names before runtime.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit Naming variables and functions, defining types, using schemas, typing imports, and mapping API field names consistently.

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

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/gaia-react/gaia/typescript/github.svg)](https://agentmods.dev/skills/gaia-react/gaia/typescript)
Your own site
<a href="https://agentmods.dev/skills/gaia-react/gaia/typescript"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/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/gaia-react/gaia/typescript"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 4
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00072 $0.01209
Opus 5.5 $0.00029 $0.00484
Sonnet 5.5 $0.00014 $0.00242
Haiku 4.5 $0.00007 $0.00121

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

frontend/.claude/skills/typescript/SKILL.md · 93 lines

How it starts

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

TypeScript

Patterns and conventions for all TypeScript code.

Types

  • import type {} for type-only imports: import type {ReactNode} from 'react'

Naming, camelCase

All identifiers use camelCase: Zod fields, form name/id/htmlFor, props, state, params.

Exceptions (snake_case OK):

  • types/database.ts, mirrors DB column names
  • Dynamic template literal names where variable part is already lowercase
  • Environment variable names (SUPABASE_URL)

Map snake_case ↔ camelCase at API call boundaries, not in schemas or UI code.

Naming, Descriptive and Self-Documenting

Owned by the naming-conventions skill (.claude/skills/naming-conventions/SKILL.md).

Exported Functions, Explicit Return Types

All exported functions must have explicit return types.

Exceptions:

  • Route loaders/actions (complex generics)
  • React components (props typed inline on the destructured parameter, return type inferred)
// BAD
export const formatDate = (date: Date) => format(date, 'yyyy-MM-dd');

// GOOD
export const formatDate = (date: Date): string => format(date, 'yyyy-MM-dd');

General Rules

  • Use type not interface, interfaces support declaration merging, which creates unpredictable behavior; type is consistent and predictable
  • Arrays: string[] not Array<string>
  • Boolean naming: ^((can|has|hide|is|show)[A-Z]|checked|disabled|required)

Code Patterns

  • No switch statements, use if/else chains or object maps; switch requires break, is prone to fallthrough bugs, and is harder to type-check exhaustively
  • No TypeScript enums, use as const objects with derived types; enums compile to runtime objects with surprising behavior and don't tree-shake well
  • JSX boolean props: always explicit ={true}, makes props grep-able and avoids confusion when a prop is later refactored to a non-boolean type
  • Max 3 function parameters, use an options object beyond that; call sites with 4+ positional args are hard to read and argument order mistakes are common
  • Inline boolean coercion uses !!x, never Boolean(x); reserve Boolean for point-free use (e.g. array.filter(Boolean)), and coerce per operand in a nullable || chain (!!a || !!b), since !!(a || b) trips @typescript-eslint/prefer-nullish-coalescing
  • Prefer undefined over null for GAIA-controlled absence (state, optional fields, internal sentinels); reserve null for external contracts that require it: DOM useRef(null), ref-callback params, React Router data(null), Zod .nullable(), and platform/library APIs that return null

Read the full file on GitHub · 93 lines

Files

What ships with it

1 file 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 Changed de79223c3eb4
  2. 8d ago Changed · -1 lines · +2 tokens per session 008fbb846125
  3. 11d ago Changed 66b6c457bb35
  4. 15d ago Changed · +11 lines · +16 tokens per session 5925e9fb335b
  5. 1mo ago First seen · 83 lines · 54 tokens per session scan A ddb3e7f49a00

Subscribe to this mod's changes

typescript is a skill published in the GitHub repository gaia-react/gaia (23 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 1,209 once invoked, about $0.0003 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

typescript-advanced-types

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

bartstc/vite-ts-react-template · 57 tokens

react-render-types-setup

Install and configure eslint-plugin-react-render-types in a TypeScript React project. Use when: (1) adding eslint-plugin-react-render-types to a project, (2) configuring ESLint flat config with typed linting for @renders support, (3) troubleshooting typed linting errors or plugin configuration, (4) setting up…

HorusGoul/eslint-plugin-react-render-types · 129 tokens

typescript

A guide to TypeScript, a version of JavaScript that adds types for describing allowed values and data shapes.

DaleStudy/skills · 126 tokens

bun

A guide for using Bun, a JavaScript and TypeScript runtime, package manager, and command runner, in place of Node.js and npm.

DaleStudy/skills · 97 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens