typescript-forms skill
Katara's TypeScript forms, practiced until every move is exact. Use for typescript-best-practices, /typescript-best-practices, "TypeScript best practices", and whenever reading or editing any .ts or .tsx file. Discriminated unions, branded types, constructive modeling, unknown over any, schemas before guards, no as casts, exhaustiveness, satisfies, and boundary validation.
- GitHub 스타
- 113
- 파일
- 2
- 마지막 커밋
- 2026년 11월 1일
- 라이선스
- MIT
- 허용된 도구
- —
typescript-forms skill은 무엇을 하나요?
typescript-forms은(는) agent skill입니다. Katara's TypeScript forms, practiced until every move is exact. Use for typescript-best-practices, /typescript-best-practices, "TypeScript best practices", and whenever reading or editing any .ts or .tsx file. Discriminated unions, branded types, constructive modeling, unknown over any, schemas before guards, no as casts, exhaustiveness, satisfies, and boundary validation.
typescript-forms skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 typescript-forms skill 설치
/plugin marketplace add tmcfarlane/team-avatar /plugin install team-avatar@team-avatar
Claude Code에 typescript-forms skill 설치
~/.claude/skills/typescript-forms/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms ~/.claude/skills/typescript-formsClaude Code (project)에 typescript-forms skill 설치
.claude/skills/typescript-forms/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms .claude/skills/typescript-formsCodex에 typescript-forms skill 설치
~/.agents/skills/typescript-forms/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms ~/.agents/skills/typescript-formsGemini CLI에 typescript-forms skill 설치
~/.gemini/skills/typescript-forms/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms ~/.gemini/skills/typescript-formsClaude.ai에 typescript-forms skill 설치
npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms typescript-forms && zip -r typescript-forms.zip typescript-forms # claude.ai → Customize → Skills → + → Create skill → Upload a skill → typescript-forms.zip
SKILL.md
GitHub에서 보기Katara's TypeScript forms
A waterbender drills each form until her hands cannot get it wrong. Then, in a real fight, the form holds without thought. Types are forms for code. Shape them so the wrong move cannot be made, and the compiler holds the line when you are not looking.
Apply Type System Discipline (Earth in four-elements) first.
| Form | Summary |
|---|---|
| Discriminated unions | Model variants with a kind literal discriminant so impossible states cannot be represented. No optional-field bags. |
| Branded types | Brand primitives with & { readonly __brand: "X" } so they cannot be mixed up. Validate once at the boundary. |
| Constructive modeling | Build the shape so the illegal value cannot be constructed. [T, ...T[]] for non-empty, [T, T][] for even length, start plus duration for a range. Not a runtime guard, and not a wish for refinement types. |
| Simplest total type | Keep T[] while every operation on it stays total. Strengthen to NonEmpty<T> only where the loose type forces !, a cast, or a "should never happen" throw. |
unknown over any |
External data is unknown. |
| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as z.infer. |
No as casts |
Every as is a runtime crash waiting to happen. Cast only after validation. |
| Narrowing hierarchy | Discriminant switch, then the in operator, then typeof or instanceof, then a user-defined type guard, and as last. |
| Type guards | A guard must verify its claim. A lying guard is worse than as, because the bug hides behind a name that says it is safe. Name them isX or hasX. |
| Exhaustiveness | Inline const _exhaustive: never = x; in default arms so the compiler errors when a new variant is added. |
satisfies over as |
Validates the value without widening literal types. |
| Boundary validation | Parse where data crosses in, into a named domain type. Record<string, unknown> (however spelled) stops at that parse. Trust the types inside. See Boundary Discipline (Earth in four-elements). |
| Schema-derived types | Reach for Pick, Omit, Parameters, ReturnType, Awaited, and typeof before declaring a new interface. |
| Object args | Pass objects, not positional arguments, so argument order documents itself. Skip this on hot paths (per-frame render, tokenizers, parsers). |
| Real tests | Do not mock what you can run. Prefer the framework's real test primitives with leak and disposable checks, and verify UI in a running build. Mock only what you cannot run locally. See push-and-pull. |
| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No console.log in shipped code. |
Examples for every form: references/patterns.md.
이 스킬의 파일
2typescript-forms skill 질문
Claude Code에 typescript-forms skill을 어떻게 설치하나요?
npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/typescript-forms ~/.claude/skills/typescript-forms를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
typescript-forms skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.