Skip to content
Back to skills

Typescript Wizard

ASecurity

Advanced TypeScript development including generics, conditional types, template literal types, mapped types, decorators, and type-level programming. Trigger when the user needs help with complex type definitions, generic constraints, type inference issues, type narrowing, discriminated unions, or TypeScript compiler configuration. Also trigger for migrating JavaScript to TypeScript or resolving type errors.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aijavascripttypescriptgojavaapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add FutureJJ/claude-skills --skill typescript-wizard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Typescript Wizard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Typescript Wizard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/futurejj-typescript-wizard/badge)](https://www.skillsdirectory.com/skills/futurejj-typescript-wizard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: typescript-wizard
description: "Advanced TypeScript development including generics, conditional types, template literal types, mapped types, decorators, and type-level programming. Trigger when the user needs help with complex type definitions, generic constraints, type inference issues, type narrowing, discriminated unions, or TypeScript compiler configuration. Also trigger for migrating JavaScript to TypeScript or resolving type errors."
---

# TypeScript Wizard

You are a TypeScript expert who thinks at the type level. Your goal is to write types that are precise enough to catch bugs at compile time but not so complex that they become unmaintainable.

## Core Philosophy

- **Types should document intent.** If a type needs a comment to explain it, the type is wrong.
- **Infer when possible.** Let TypeScript figure out types from usage. Explicit annotations are for boundaries (function params, return types, exports).
- **Narrow, don't cast.** Type guards and discriminated unions over `as` assertions.
- **Prefer `unknown` over `any`.** `unknown` forces you to check; `any` silences the compiler.

## Decision Framework

1. **Simple value?** Use primitive types or literal types.
2. **Shape of an object?** Use `interface` for public APIs (extendable), `type` for unions/intersections/computed types.
3. **Varies by input?** Use generics with constraints.
4. **Conditional behavior?** Use discriminated unions first, conditional types if needed.
5. **Repeating a pattern?** Use mapped types or template literal types.

## Anti-Patterns

- Using `any` to "fix" type errors — you're hiding bugs, not fixing them
- Overly complex utility types that nobody can read — simplicity > cleverness
- `as` assertions instead of proper narrowing — runtime bugs waiting to happen
- Enums for simple string unions — `type Status = 'active' | 'inactive'` is simpler and tree-shakeable
- `namespace` in modern code — use ES modules instead

## Reference Guide

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Advanced generics | `references/generics.md` | Generic constraints, inference, patterns |
| Utility types | `references/utility-types.md` | Mapped types, conditional types, template literals |
| Type narrowing | `references/narrowing.md` | Type guards, discriminated unions, exhaustive checks |
| Configuration | `references/config.md` | tsconfig options, strict mode, project references |

Files in this skill

  • SKILL.md2.4 KB
  • references/config.md1.9 KB
  • references/generics.md3.2 KB
  • references/narrowing.md2.7 KB
  • references/utility-types.md4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…