writing-typescript

writing-typescript is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 78 tokens per session (586 once invoked), scanned A, original, MIT.

Guidance for writing TypeScript, a version of JavaScript that adds type checking, including TypeScript used with Node.js and React.

In plain words
What is it for?
Use it when creating or changing TypeScript files, React components, Node.js services, typed APIs, data models, validation, or TypeScript tests.
Why use it?
It helps keep data, API boundaries, asynchronous code, and tests predictable while following the project's existing tools and settings.

Skill for Claude CodeCodex

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

Good fit Use it when creating or changing TypeScript files, React components, Node.js services, typed APIs, data models, validation, or TypeScript tests.

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

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 writing-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-typescript/github.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/writing-typescript)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-typescript"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-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 writing-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-typescript"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 586 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.00078 $0.00586
Opus 5.5 $0.00031 $0.00234
Sonnet 5.5 $0.00016 $0.00117
Haiku 4.5 $0.00008 $0.00059

Measured 1mo ago against content hash 44c66ca65fa1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

writing-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 1mo 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/skills/writing-typescript/SKILL.md · 40 lines

How it starts

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

TypeScript Development

Follow the repository's TypeScript version, tsconfig, package manager, framework, and test runner. In a monorepo, work from the nearest package.json and tsconfig.json and name the package you chose.

Defaults

  • Never weaken compiler options to pass a check. New configs enable strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, useUnknownInCatchVariables, noImplicitOverride, and noFallthroughCasesInSwitch.
  • Treat HTTP responses, JSON, env, storage, form data, and SDK output as unknown. Narrow at the boundary with the project's schema library or a small type guard; never cast await res.json() to a domain type.
  • Avoid any, as casts, non-null !, and broad index signatures unless a runtime check or an external type gap justifies them.
  • Discriminated unions for variants and async state, with an exhaustive never check. Literal unions or as const arrays instead of new enums. satisfies for config maps.
  • Result unions for recoverable failures callers must branch on; throw Error instances otherwise.
  • Pass dependencies as parameters; no singletons or hidden module state. Thread AbortSignal through work that can outlive its caller.
  • Ask before adding a schema, form, query, or state library the project does not already use.

React

  • Plain function components, not React.FC. Type children as ReactNode.
  • Derive state during render. Fix stale closures instead of suppressing exhaustive-deps.
  • Add memo, useMemo, or useCallback only for measured cost or a real identity need.
  • Validate fetched data in the fetcher, not in render. Custom hooks throw when their provider is missing.

Tooling

Typecheck with the project script or tsc --noEmit. Use one formatter and one linter per file; the selection order is in linting.md.

References

  • testing.md: read when adding or changing tests, including React component tests.
  • linting.md: read when choosing a formatter or linter, changing lint config, or diagnosing slow lint.

Read the full file on GitHub · 40 lines

Files

What ships with it

3 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. 1mo ago Changed · -33 lines 44c66ca65fa1
  2. 1mo ago Changed · +5 lines d06984cf783e
  3. 2mo ago First seen · 68 lines · 78 tokens per session scan A ae0b77933c65

Subscribe to this mod's changes

writing-typescript is a skill published in the GitHub repository alexei-led/cc-thingz (38 stars, last pushed 5d ago), licensed MIT. It adds 78 tokens to every session and 586 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

coding-standards

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

hashgraph-online/awesome-codex-plugins · 28 tokens

plankton-code-quality

Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

loulanyue/awesome-claude-notes · 34 tokens

agent-typescript-reviewer

Expert TypeScript/JavaScript code reviewer specializing in type safety, async correctness, Node/web security, and idiomatic patterns. Use for all TypeScript and JavaScript code changes. MUST BE USED for TypeScript/JavaScript projects.

KunanonJ/ai-skills-hub · 53 tokens

typescript-guardian

Focuses specifically on TypeScript type safety - any usage, unsound generics, interface design, and type narrowing. Use for a deep type-system review, not general code quality.

codebygarv/Ai-skills · 41 tokens

effective-typescript

Review existing TypeScript code and write new TypeScript following the 62 items from "Effective TypeScript" by Dan Vanderkam. Use when writing TypeScript, reviewing TypeScript code, working with type design, avoiding any, managing type declarations, or migrating JavaScript to TypeScript. Trigger on: "TypeScript best…

booklib-ai/booklib · 101 tokens

code-reviewer-typescript

TypeScript code review skill. Focused on systematic review of TypeScript language-level type system, generics design, module organization, and error handling patterns. Covers type safety, generic constraints, interface design, module system, and runtime validation. Use this skill when reviewing .ts files (non-React…

korbinjoe/TeemAI · 86 tokens