typescript-advanced-types – skill Lập trình cho agent AI
Hướng dẫn chuyên sâu về hệ thống kiểu nâng cao của TypeScript, gồm generic, kiểu có điều kiện, kiểu ánh xạ, kiểu template literal và utility type, để xây dựng ứng dụng an toàn kiểu và vững chắc.
Cài skill typescript-advanced-types bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/typescript-advanced-types-d6967.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /typescript-advanced-types – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/typescript-advanced-types-d6967.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $typescript-advanced-types – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/typescript-advanced-types-d6967.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /typescript-advanced-types – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/typescript-advanced-types-d6967.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /typescript-advanced-types – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
TypeScript Advanced Types
Comprehensive guidance for mastering TypeScript's advanced type system including generics, conditional types, mapped types, template literal types, and utility types for building robust, type-safe applications.
Use this skill when
- Building type-safe libraries or frameworks
- Creating reusable generic components
- Implementing complex type inference logic
- Designing type-safe API clients
- Building form validation systems
- Creating strongly-typed configuration objects
- Implementing type-safe state management
- Migrating JavaScript codebases to TypeScript
Do not use this skill when
- The task is unrelated to typescript advanced types
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Example
Use Expect<AssertEqual<Result, Expected>> for a positive type assertion and
@ts-expect-error for an intentional rejected call. Also validate API JSON at
runtime; a generic response type does not inspect the returned object.
Skill liên quan
- typescript-expert – Chuyên gia TypeScript và JavaScript, am hiểu sâu về lập trình ở cấp độ kiểu…
- typescript-pro – Làm chủ TypeScript với kiểu nâng cao, generics và an toàn kiểu nghiêm ngặt. Xử lý hệ…
- uncle-bob-craft – Dùng khi review code, viết hoặc refactor code, hoặc thảo luận về kiến trúc; bổ sung cho…
- understand-project-yylo – Kiểm tra kiến trúc sản phẩm, dependency và vòng lặp xác thực hiện tại trước khi lập kế…
- unit-testing-test-generate – Tạo unit test toàn diện, dễ bảo trì cho nhiều ngôn ngữ, với độ phủ cao và tập trung vào…
- unity-developer – Phát triển game Unity với script C# được tối ưu, render hiệu quả và quản lý asset hợp…
- unslop-review – Viết lại các comment review code để nghe như do đồng nghiệp viết. Bỏ phần mở đầu rườm rà…
- upgrading-expo – Hướng dẫn nâng cấp phiên bản Expo SDK và sửa lỗi xung đột phụ thuộc.