yd-typescript

yd-typescript is a skill for Claude Code, Codex from LeeYudok/doksam-skills. It costs 70 tokens per session (1,162 once invoked), scanned A, a copy of yd-typescript, MIT.

A TypeScript guidance skill for checking type safety at data boundaries, asynchronous user interfaces, DOM access, and strict compiler settings. TypeScript is a programming language that adds checked types to JavaScript.

In plain words
What is it for?
Use it when writing or reviewing TypeScript, especially code that reads external data, updates browser interfaces, handles repeated requests, or works with DOM elements.
Why use it?
It helps prevent code from trusting unvalidated API, JSON, storage, or DOM values and helps avoid stale asynchronous results, unsafe element access, and misleading success messages.

Skill for Claude CodeCodex

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

Good fit Use it when writing or reviewing TypeScript, especially code that reads external data, updates browser interfaces, handles repeated requests, or works with DOM elements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeyudok/doksam-skills/yd-typescript
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 LeeYudok/doksam-skills --skill yd-typescript
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/doksam-skills

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 yd-typescript

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/yd-typescript"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,162 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 100% copy Near-identical to another mod 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.00070 $0.01162
Opus 5.5 $0.00028 $0.00465
Sonnet 5.5 $0.00014 $0.00232
Haiku 4.5 $0.00007 $0.00116

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

Security

Grade A, and why

yd-typescript 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 19d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/verify_typescript_claims.py, tests/test_typescript_claims.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to yd-typescript — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/yd-typescript/SKILL.md · 40 lines

How it starts

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

yd-typescript

TypeScript의 정적 보장이 실제 실행 데이터에도 성립하는지 확인한다. 기존 프로젝트의 런타임·프레임워크·배포 방식을 유지하고, 이번 변경과 관계없는 전면 리팩터링은 하지 않는다. 패키지·번들 설정은 yd-frontend-build, React 상태와 컴포넌트는 yd-react-expert가 맡는다.

데이터 경계

  • fetch().json(), JSONP 콜백, JSON.parse, localStorage, DOM의 dataset은 타입이 붙어 보여도 외부 값이다. 입력을 unknown으로 받고 실제 사용하는 필드의 존재·타입·허용 범위를 확인한 뒤 도메인 타입으로 좁힌다. 실패 시 화면 상태나 저장 데이터가 어떻게 되는지도 정한다.
  • as ApiResponse, as HTMLElement, 후위 !는 검증이 아니다. DOM 요소가 반드시 있어야 하면 한 번 조회해 instanceof 또는 null 검사를 거친 뒤 쓰고, 선택 요소는 없을 때의 동작을 명시한다. 제네릭 헬퍼도 런타임 검사를 생략하지 않는다.
  • 선택적 필드에서 부재와 undefined 값이 다른 계약이면 exactOptionalPropertyTypes를 검토한다. 배열·인덱스 조회 실패가 의미 있으면 noUncheckedIndexedAccess를 켜거나 사용 지점에서 검사한다. 기존 설정을 한꺼번에 강화해 무관한 오류를 대량 생산하지 않는다.
  • 이름·ID·URL처럼 외부 문자열을 HTML에 표시할 때는 textContent와 DOM 노드로 조립한다. innerHTML이 필요하다면 신뢰 경계와 허용 마크업을 먼저 명시한다.

비동기 UI

  • 연속 선택·검색·폴링에서 이전 응답이 나중 응답을 덮을 수 있다. 요청 취소(AbortController)나 세대 번호로 최신 결과만 반영한다. 타이머·이벤트 리스너를 교체하거나 화면을 닫을 때 정리한다.
  • POST 응답이 성공 코드여도 본문이 비었거나 형식이 틀릴 수 있다. 성공 여부와 응답 스키마를 각각 검사하고, 저장 완료 안내는 유효한 응답을 화면에 반영한 뒤 표시한다.
  • 시간 제한 후 실패했을 때 서버 쓰기가 이미 끝났을 수 있다. 곧바로 재시도해 중복 기록을 만들기보다 현재 상태를 다시 조회하거나 사용자에게 확인 가능성을 알린다.

Bun·TypeScript 확인

  • Bun의 TS 실행·bun build는 타입 검사를 하지 않는다. 변경한 프로젝트의 tsconfig.json으로 tsc --noEmit을 별도로 실행하고, 브라우저 산출물은 --target browser로 만든다. 코드 작성과 빌드/패키징 책임은 구분한다. bun build의 기본 target 도 browser라 같은 결과지만, 산출물 용도를 드러내려고 명시한다. TypeScript 7 은 tsconfig.json 이 있는 폴더에서 파일을 직접 지정하면(tsc --noEmit a.ts) TS5112 로 거부하므로 tsc --noEmit -p <tsconfig>로 돌린다.
  • strict를 기준으로 보되 기존 브라우저 대상 lib, moduleResolution, TS 버전을 확인하고 필요한 설정만 추가한다. Bun 런타임 API를 브라우저 번들에 섞지 않는다.
  • 타입 검사와 빌드 후 실제 화면에서 변경한 경로를 확인한다. 외부 데이터 경계를 바꿨다면 정상·누락·오형식 입력 중 실제 위험을 드러내는 사례를 검증한다. 구현을 그대로 복제하는 테스트는 만들지 않는다.

완료 조건

  • 외부 데이터와 DOM에 적용한 타입 단언의 근거가 코드에 있다.
  • 비동기 갱신이 오래된 응답으로 최신 화면을 덮지 않는다.
  • 프로젝트의 타입 검사·빌드가 통과하고 변경한 화면 동작을 확인했다.

근거

Read the full file on GitHub · 40 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. 19d ago First seen · 40 lines · 70 tokens per session scan A fd349ffd96a9

Subscribe to this mod's changes

yd-typescript is a skill published in the GitHub repository LeeYudok/doksam-skills (14 stars, last pushed 7d ago), licensed MIT. It adds 70 tokens to every session and 1,162 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to yd-typescript, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

javascript-typescript-typescript-scaffold

Scaffold TypeScript applications with project structure, build tools, type checking, and tests. Use when starting a Node.js or frontend project or standardizing its development setup.

rmyndharis/antigravity-skills · 42 tokens

nodejs-backend-patterns

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

rmyndharis/antigravity-skills · 58 tokens

senior-frontend

Frontend development for React 19, Next.js 15, TypeScript, and Tailwind CSS v4 / Pengembangan frontend dengan React 19, Next.js 15, TypeScript, dan Tailwind CSS v4.

roedyrustam/vibes-plug · 50 tokens

js-backend-expert

Expert-level skill for Node.js 24+ (LTS), Bun 1.2+, and Deno 2.x backend development. Covers Express 5, Fastify 5, Hono v4, NestJS, Prisma 6, Drizzle ORM, WebSockets, BullMQ, OpenTelemetry, and microservices in English and Indonesian.

roedyrustam/vibes-plug · 77 tokens

typescript-expert

Expert guide for TypeScript 5.8+ advanced type system, strict mode, generics, utility types, branded types, inferred type predicates, isolated declarations, and type-safe architectural patterns / Panduan ahli untuk sistem tipe TypeScript 5.8+, mode strict, generics, utility types, branded types, inferred type…

roedyrustam/vibes-plug · 83 tokens