typescript-strict

typescript-strict is a skill for Claude Code, Codex from 0xMassi/claude-skills. It costs 81 tokens per session (3,079 once invoked), scanned A, original, MIT.

Strict TypeScript coding and security rules for writing, reviewing, or changing TypeScript code.

In plain words
What is it for?
They guide typed function inputs, narrowing unknown values, React conventions, import hygiene, exception handling, and safe handling of third-party code.
Why use it?
They catch unsafe types, weak error handling, unnecessary assertions, and import or security problems before they spread through the codebase.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { Button } from "../../../components/ui/button";.

Good fit They guide typed function inputs, narrowing unknown values, React conventions, import hygiene, exception handling, and safe handling of third-party code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/0xMassi/claude-skills
agentmods
npx agentmods add skills/0xmassi/claude-skills/typescript-strict

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/0xmassi/claude-skills/typescript-strict"><img src="https://agentmods.dev/badge/skills/0xmassi/claude-skills/typescript-strict.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,079 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.00081 $0.03079
Opus 5 $0.00041 $0.01540
Sonnet 5 $0.00016 $0.00616
Haiku 4.5 $0.00008 $0.00308

Measured 10d ago against content hash 1597ecd08607, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

typescript-strict 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 10d 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.

typescript-strict/SKILL.md · 451 lines

How it starts

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

TypeScript Strict Standard

Rules extracted from 10+ production TypeScript codebases. All projects use strict: true.

CRITICAL: Type Safety Rules

TS-01: Never use any

// BAD
function process(data: any) { return data.value; }
const handler = (e: any) => console.log(e);

// GOOD
function process(data: Record<string, unknown>) { return "value" in data ? data.value : undefined; }
const handler = (e: MouseEvent) => console.log(e.target);

// ACCEPTABLE: Library integration boundaries (shadcn/ui props, Tauri responses)
// Must add a comment explaining why
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- CodeMirror extension type

Exceptions (document each with a comment):

  • Third-party library props that genuinely require any
  • Generic catch blocks: catch (e: unknown) then narrow

TS-02: Avoid as type assertions

// BAD
const user = response as User;
const el = document.getElementById("root") as HTMLDivElement;

// GOOD: use type guards
function isUser(data: unknown): data is User {
  return typeof data === "object" && data !== null && "id" in data;
}
if (isUser(response)) { /* response is User here */ }

// GOOD: use generics
const el = document.getElementById("root");
if (el instanceof HTMLDivElement) { /* el is HTMLDivElement here */ }

// ACCEPTABLE (rare): When you KNOW the type and can't prove it
// Must be `as unknown as T` with a SAFETY comment
const validated = session as unknown as AuthenticatedSession; // SAFETY: verified user.id exists above

When as is acceptable:

  • Prisma generated types requiring cast at boundaries
  • After runtime validation (Zod parse → safe to assert)
  • Event target narrowing after guard: e.target as Node after if (e.target)

TS-03: Use unknown over any for untyped data

// BAD
function parse(input: any): Config { ... }

// GOOD
function parse(input: unknown): Config {
  if (typeof input !== "object" || input === null) throw new Error("Invalid input");
  // Narrow from unknown
}

Read the full file on GitHub · 451 lines

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. 10d ago First seen · 451 lines · 81 tokens per session scan A 1597ecd08607

Subscribe to this mod's changes

typescript-strict is a skill published in the GitHub repository 0xMassi/claude-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 81 tokens to every session and 3,079 once invoked, about $0.0004 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

react-component-generator

Generate React components with TypeScript, proper props, hooks, and accessibility. Use when creating new React components, UI elements, or refactoring existing components.

OneWave-AI/claude-skills · 35 tokens

spec-implement

Continue an approved Spec-backed workflow when the user says "implement", "go", "start", or "do it". After Codex Plan Mode, persist the next missing design.md or plan.json artifact and stop. When both artifacts exist, execute plan.json with TDD and report between batches.

martinffx/atelier · 63 tokens

ts-audit

Audit TypeScript and React code against expert-level best practices from 9 TypeScript library references. Use when the user wants to review, audit, check, or improve TypeScript code quality — including requests like "audit this file", "review my types", "check my TypeScript", "what's wrong with this code", "improve my…

chrislacey89/skills · 141 tokens

ts-review

Review TypeScript code for quality, security, and correctness. Use this skill when the user asks for a code review, wants feedback on a PR or diff, or says "review this". Covers architecture, security, error handling, database patterns, type safety, and code quality. Produces categorized findings: critical issues…

widnyana/eyay-toolkits · 99 tokens

typescript

Apply when writing TypeScript code. Strict types, discriminated unions, async patterns, and runtime safety.

sordi-ai/skill-everything · 23 tokens

clean-code-ts

Use when writing or reviewing TypeScript — deeper idioms (eliminate any, discriminated unions, narrowing, exhaustiveness, schema-derived types, async correctness).

CassetteTapeCrackle/claude-starters · 36 tokens