type-safety

type-safety is a skill for Claude Code, Codex from idavidov13/agentic-playwright. It costs 80 tokens per session (798 once invoked), scanned A, original, MIT.

TypeScript and Zod rules for keeping data explicitly typed and checking API responses against their documented structure. Zod is a library that validates data at runtime and can provide TypeScript types from those checks.

In plain words
What is it for?
Use it when defining API request and response schemas, writing API tests, handling environment variables, or adding exported and public functions.
Why use it?
It catches malformed or changed API data instead of allowing it to pass unnoticed. It also prevents unsafe type shortcuts and undefined environment values from leaking into the code.

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 defining API request and response schemas, writing API tests, handling environment variables, or adding exported and public functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idavidov13/agentic-playwright/type-safety
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 idavidov13/agentic-playwright --skill type-safety
Clone the repo
git clone --depth 1 https://github.com/idavidov13/agentic-playwright

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 type-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/type-safety/github.svg)](https://agentmods.dev/skills/idavidov13/agentic-playwright/type-safety)
Your own site
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/type-safety"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/type-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.

agentmods 80×15 button for type-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/type-safety"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/type-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 798 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00080 $0.00798
Opus 5.5 $0.00032 $0.00319
Sonnet 5.5 $0.00016 $0.00160
Haiku 4.5 $0.00008 $0.00080

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

Security

Grade A, and why

type-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 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.

.agents/skills/type-safety/SKILL.md · 47 lines

How it starts

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

Type Safety

Critical

  • NEVER use any, @ts-ignore or @ts-expect-error: unknown at a boundary (network, file, user input), then Schema.parse(...); a Zod-inferred type everywhere else.

  • Never as T or as unknown as T to cross a type boundary; parse instead.

    // CORRECT
    const raw: unknown = await response.json();
    const user = UserResponseSchema.parse(raw);
    // WRONG
    const user = (await response.json()) as UserResponse;
    
  • Every API schema is z.strictObject(); z.object() strips unknown keys and hides contract drift.

    // CORRECT
    export const UserSchema = z.strictObject({ id: z.uuid() });
    // WRONG
    export const UserSchema = z.object({ id: z.uuid() });
    
  • Import from zod/v4; top-level validators (z.uuid(), z.email(), z.url(), z.int(), z.enum(E)), not the chained z.string().uuid() forms; types via zOutput<typeof Schema>, not z.infer.

  • A schema mirrors the documented contract field by field, envelope included, one per endpoint response, never a factory that builds envelopes. A shared per-domain _envelope.ts only once the same envelope appears in 3+ schemas (canonical threshold; other skills point here).

  • Export the type next to the schema: export type User = zOutput<typeof UserSchema>;. zInput only where a .default() or .transform() makes the pre-parse shape differ.

  • Explicit parameter and return types on every exported or public function (Promise<void>, Locator, string); npm run lint fails without them.

  • Resolve process.env.X where it is read: process.env.X! when env/.env.example declares it as required, process.env.X ?? fallback when a default is safe. Never export or pass on a string | undefined.

Procedure

  1. ls fixtures/api/schemas/ resolves {area}; the file is fixtures/api/schemas/{area}/<name>Schema.ts; shared error bodies stay in fixtures/api/schemas/util/errorResponseSchema.ts.
  2. Write the schema from the contract that api-testing step 1 sourced, one validator per field from references/zod-usage.md, the contract source in a comment at the top.
  3. Export the type; references/zod-usage.md decides zInput versus zOutput and when to extract an envelope.
  4. Hand it to the consumer: a spec asserts expect(SchemaName.parse(body)).toBeTruthy(); (api-testing); a factory returns Schema.parse(merged) (data-strategy); fixture code binds const x = Schema.parse(body);.
  5. Run npx tsc --noEmit and npm run lint. A ZodError against a documented contract is a bug handled per api-testing, never by loosening the schema.

Read the full file on GitHub · 47 lines

Files

What ships with it

1 file 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 · -217 lines · -128 tokens per session 2fa73714e0a9
  2. 2mo ago Changed · +3 lines 92cd086278e2
  3. 3mo ago First seen · 261 lines · 208 tokens per session scan A b80feb444f5d

Subscribe to this mod's changes

type-safety is a skill published in the GitHub repository idavidov13/agentic-playwright (318 stars, last pushed 17d ago), licensed MIT. It adds 80 tokens to every session and 798 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

type-safety compared with skills from other repositories

type-safety next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
type-safetyidavidov13/agentic-playwrightSkill31817d agoMITA80Claude Code, Codex
ultracitehaydenbleasel/ultraciteSkill3.4k3d agoMITA179Claude Code, Codex
freelance-gig-findertinyfish-io/tinyfish-cookbookSkill2.3kyesterdayMITA98Claude Code, Codex
fetchtinyfish-io/tinyfish-cookbookSkill2.3kyesterdayMITA121Claude Code
oss-bounty-findertinyfish-io/tinyfish-cookbookSkill2.3kyesterdayMITB242Claude Code, Codex
typescript-strictBlackBeltTechnology/pi-agent-dashboardSkill357todayMITA41Claude Code, Codex
create-custom-widgetmendixlabs/mxcliSkill148yesterdayApache-2.0A50Claude Code