一键导入
typescript-patterns
Practical TypeScript rules for safe application code, APIs, and UI state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Practical TypeScript rules for safe application code, APIs, and UI state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Git Worktree: parallel working trees for isolated branch-level execution, debugging, and safe experimentation.
Durable project-memory rules for `.agent-memory/` plus session-memory boundaries.
Review routing, independent post-implementation review gates, multi-model escalation, and targeted optimization follow-up.
Planning-track selection, epic/feature decomposition, readiness gates, and plan-delta rules.
Architecture, Jetpack Compose, Navigation3 KMP, and Koin DI rules for Android apps.
Practical rules for designing, evolving, and integrating APIs safely.
| name | typescript-patterns |
| description | Practical TypeScript rules for safe application code, APIs, and UI state. |
| license | See repository LICENSE |
| user-invocable | false |
Use this skill when changing TypeScript code and you need strong, practical defaults instead of a catalog of language features.
anyunknown at boundaries, then narrow it.any, keep it local, document the reason, and do not let it leak into shared types.Use tagged unions for async state, UI state, workflow state, and domain outcomes.
Prefer:
{ status: 'idle' | 'loading' | 'success' | 'error' }Avoid:
Pick, Omit, Partial, Readonly, and simple mapped types are fine.as unless you know something the compiler cannot.Error subclasses or a well-known error type.Apply when the repo includes React or similar TSX-based UI:
React.FC unless the repo already standardizes on React.FC.Apply when the repo includes backend TypeScript:
Prefer these when you control the config or when reviewing a TS repo:
strict: truenoImplicitOverride: truenoUncheckedIndexedAccess: true when the repo can sustain itexactOptionalPropertyTypes: true when the team is ready for the stricter contractDo not expand the compiler surface casually in a small task; align with the repo.
Look for:
any creeping into shared codeAvoid:
foo as Bar as Bazany is absent or tightly contained