typescript-strict

typescript-strict is a skill for Claude Code, Codex from halflength-ampleness75/claude-code-recipes. It costs 0 tokens per session (2,391 once invoked), scanned A, original, MIT.

A set of TypeScript rules and a tsconfig.json base that enables strict type checking. It also defines rules for safer error handling, object access, naming, and type declarations.

In plain words
What is it for?
Use it as the TypeScript configuration and coding standard for projects that require strict types and no use of the any type.
Why use it?
Strict checking catches more mistakes while code is being written and avoids silently accepting missing values or untyped data.

Skill for Claude CodeCodex

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

Good fit Use it as the TypeScript configuration and coding standard for projects that…

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

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/halflength-ampleness75/claude-code-recipes/typescript-strict.svg)](https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/typescript-strict)
Your own site
<a href="https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/typescript-strict"><img src="https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/typescript-strict.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,391 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.00000 $0.02391
Opus 5 $0.00000 $0.01196
Sonnet 5 $0.00000 $0.00478
Haiku 4.5 $0.00000 $0.00239

Measured 6d ago against content hash 5c17dda0b8be, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

skills/typescript-strict/SKILL.md · 324 lines

How it starts

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

TypeScript Strict

Strict TypeScript conventions: strict mode config, no-any rules, utility types, discriminated unions, branded types, and error handling patterns.

Strict Mode Configuration

Always enable strict mode. Use this tsconfig.json base:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noFallthroughCasesInSwitch": true,
    "forceConsistentCasingInFileNames": true,
    "exactOptionalPropertyTypes": true,
    "verbatimModuleSyntax": true
  }
}

What strict: true Enables

  • strictNullChecksnull and undefined are their own types
  • strictFunctionTypes — function parameter types are checked strictly
  • strictBindCallApplybind, call, apply are typed correctly
  • strictPropertyInitialization — class properties must be initialized
  • noImplicitAny — no implicit any types
  • noImplicitThisthis must have an explicit type
  • alwaysStrict — emit "use strict" in every file

No any Rules

  1. Never use any — use unknown when the type is truly unknown
  2. Use unknown and narrow — type guards, instanceof, typeof
  3. Use generics for flexible typesfunction parse<T>(input: string): T
  4. Use Record<string, unknown> over object — more explicit
  5. Suppress with // @ts-expect-error (not // @ts-ignore)@ts-expect-error fails if the error is fixed
// Bad
function parse(data: any): any {
  return JSON.parse(data);
}

// Good
function parse(data: string): unknown {
  return JSON.parse(data);
}

// Good — with type guard
function isUser(value: unknown): value is User {
  return (
    typeof value === "object" &&
    value !== null &&
    "id" in value &&
    "email" in value
  );
}

const data: unknown = parse(input);
if (isUser(data)) {
  console.log(data.email); // typed as User
}

Utility Types

Use built-in utility types instead of manual type construction:

Read the full file on GitHub · 324 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. 6d ago First seen · 324 lines · 0 tokens per session scan A 5c17dda0b8be

Subscribe to this mod's changes

typescript-strict is a skill published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,391 tokens. 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.