typescript-craftsmanship

typescript-craftsmanship is a skill for Claude Code, Codex from KaelSensei/MagicAIBuilder. It costs 218 tokens per session (2,656 once invoked), scanned A, original, MIT.

A set of coding standards for TypeScript, React, and Next.js, tools for building typed web applications and user interfaces.

In plain words
What is it for?
Use it when creating, reviewing, or restructuring TypeScript and TSX code, including React components, hooks, stores, data processing, and Next.js pages.
Why use it?
It reduces unclear types, fragile designs, and avoidable performance or maintenance problems during coding, reviews, and refactoring.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when creating, reviewing, or restructuring TypeScript and TSX code, including React components, hooks, stores, data processing, and Next.js pages.

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

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-craftsmanship

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kaelsensei/magicaibuilder/typescript-craftsmanship"><img src="https://agentmods.dev/badge/skills/kaelsensei/magicaibuilder/typescript-craftsmanship.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 218 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,656 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00218 $0.02656
Opus 5.5 $0.00087 $0.01062
Sonnet 5.5 $0.00044 $0.00531
Haiku 4.5 $0.00022 $0.00266

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

Security

Grade A, and why

typescript-craftsmanship scanned grade A 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return fetch(url);
.agents/skills/typescript-craftsmanship/SKILL.md · 330 lines

How it starts

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

TypeScript Craftsmanship

This skill enforces professional-grade TypeScript, React 19, and Next.js 15 coding standards. Every piece of code you write or review must pass these rules.

The philosophy: make invalid states unrepresentable, make expensive operations obvious, and make the code read like well-written prose.

When writing complex logic, refactoring, or doing architecture work, load the appropriate reference file for deeper patterns:

  • references/design-patterns.md — SOLID principles, GoF patterns adapted to TS/React, anti-patterns to avoid. Read this before any refactoring session or when designing new modules/components.
  • references/algorithms.md — Complexity analysis, data structure choices, performance patterns. Read this when optimizing, writing data transforms, or working with collections/arrays.
  • references/react-architecture.md — React 19, Next.js 15 App Router, Zustand, TanStack Query, state management patterns. Read this when creating components, hooks, stores, or page layouts.

Core Rules — Always Active

These rules apply to every line of TypeScript you write. No exceptions.

1. Type Safety is Non-Negotiable

Zero any. Use unknown + type guards. If you think you need any, you need a generic or a discriminated union.

// ❌ Lazy typing
function process(data: any) {
  return data.name;
}

// ✅ Safe typing
function process(data: unknown): string {
  if (isUser(data)) return data.name;
  throw new TypeError("Expected User object");
}

Zero type assertions (as). They lie to the compiler. Use type guards, discriminated unions, or Zod parsing instead.

// ❌ Assertion — compiles but crashes if wrong
const user = response.data as User;

// ✅ Runtime validation
const user = UserSchema.parse(response.data); // Zod: throws if invalid

Zero non-null assertions (!). Use optional chaining + nullish coalescing.

// ❌ Crashes at runtime if null
const name = user!.name;

// ✅ Safe access
const name = user?.name ?? "Anonymous";

Read the full file on GitHub · 330 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 First seen · 330 lines · 218 tokens per session scan A 01ab4007d4b5

Subscribe to this mod's changes

typescript-craftsmanship is a skill published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed yesterday), licensed MIT. It adds 218 tokens to every session and 2,656 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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

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

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 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

psl-ast-layers

How to use the PSL syntax tree layers (green tree, red tree, strongly-typed AST classes) correctly. Use for any PSL-related work: PSL interpreters (contract-psl), helpers inside the psl-parser package, the language server, formatters, or anything else that consumes parse() output from @internal/psl-parser.

prisma/orm · 78 tokens

ast-visitor-pattern

Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.

prisma/orm · 65 tokens

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