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.
npx skills add LeahyCC/claude-skills --skill typescript-safetygit clone --depth 1 https://github.com/LeahyCC/claude-skillsWrote 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.
[](https://agentmods.dev/skills/leahycc/claude-skills/typescript-safety)<a href="https://agentmods.dev/skills/leahycc/claude-skills/typescript-safety"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/typescript-safety/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.
<a href="https://agentmods.dev/skills/leahycc/claude-skills/typescript-safety"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/typescript-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00180 | $0.01780 |
| Opus 5.5 | $0.00072 | $0.00712 |
| Sonnet 5.5 | $0.00036 | $0.00356 |
| Haiku 4.5 | $0.00018 | $0.00178 |
Grade A, and why
typescript-safety 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript safety
Getting the compiler to catch bugs before they run, on TypeScript 6 and 7. TS 7.0 is the Go compiler, installed as plain typescript since July 2026. strict has been the default since 6.0, so the remaining gains come from the flags strict leaves off, from narrowing instead of casting, and from parsing data at the edges.
Types describe code, not data. Anything that enters the process (a response body, JSON.parse, storage, env vars) is unchecked until code checks it. An annotation on an any is a cast.
Every escape hatch turns off the check that would have caught the bug. No any in new code. Reach for unknown and narrow. A cast needs a runtime check next to it.
Source checks and dates: SOURCES.md.
Procedure
- Read the project's
tsconfig.jsonand the installedtypescriptversion (npx tsc --version). On 5.x or 6.x with deprecation errors, start with upgrade-6-to-7.md. - Compare the config with the baseline in config.md. Turning on a flag in an old codebase can add hundreds of errors: count them with
tsc --noEmitfirst, and fix by module. - Read the resource for the task in the table below.
- Write the change. Prefer the first tool that works: narrowing, then a predicate, then a checked cast.
- Run
tsc --noEmit, andeslintif the project has typed linting. Report both results, and say which TS version ran.
data from outside ──> unknown ──> parse at the edge ──> precise types inside
domain-types.md narrowing.md, generics.md
|
tsconfig flags catch the rest: config.md types from types: type-level.md
|
any / as / ! found? escape-hatches.md lint what tsc cannot: linting.md
Where to read
| Task | Resource |
|---|---|
tsconfig defaults, the baseline, flags past strict, module by runtime, the empty types default |
config.md |
| Upgrading to 6.0 and 7.0, removed options and syntax, running TS 6 next to 7 | upgrade-6-to-7.md |
| Discriminated unions, exhaustive switches, predicates, assertion functions, unsound spots | narrowing.md |
When a type parameter earns its place, constraints, satisfies, const type parameters, NoInfer |
generics.md |
Utility types, the Omit trap, mapped, conditional, and template literal types, augmentation |
type-level.md |
Untyped data at the edges, branded IDs and units, readonly inputs |
domain-types.md |
any, as, !, @ts-expect-error, and what to use instead |
escape-hatches.md |
| typescript-eslint configs and rules, and the TS 6 alias the linter still needs | linting.md |
Node type stripping, erasableSyntaxOnly, verbatimModuleSyntax, enums |
node-and-emit.md |
What ships with it
11 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.
- README.md 3.5 KB
- resources/config.md 9.7 KB
- resources/domain-types.md 6.1 KB
- resources/escape-hatches.md 5.9 KB
- resources/generics.md 5.7 KB
- resources/linting.md 5.2 KB
- resources/narrowing.md 7.6 KB
- resources/node-and-emit.md 4.5 KB
- resources/type-level.md 7.9 KB
- resources/upgrade-6-to-7.md 5.4 KB
- SOURCES.md 6.2 KB
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.
- today First seen · 88 lines · 180 tokens per session scan A ddbbeb0f8adf
typescript-safety is a skill published in the GitHub repository LeahyCC/claude-skills (3 stars, last pushed today), licensed MIT. It adds 180 tokens to every session and 1,780 once invoked, about $0.0007 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-10-24.
Other skills, from other repositories
Accessibility Audit Helper
Reviews UI code and components for WCAG 2.1 accessibility violations and provides specific fixes.
fastify-typescript
This skill should be used when using TypeScript with Fastify, configuring type providers, using @fastify/type-provider-typebox, using @fastify/type-provider-json-schema-to-ts, typing Fastify plugins, declaration merging for decorators, typing route handlers, FastifyInstance generics, FastifyRequest generics…
typescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.
nestjs-expert
Creates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating…
typescript-pro
Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety…
a11y-ally
Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.