# Typescript Wizard

> 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 t…

- **Type:** Skill
- **Install:** `agentstack add skill-futurejj-claude-skills-typescript-wizard`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [FutureJJ](https://agentstack.voostack.com/s/futurejj)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [FutureJJ](https://github.com/FutureJJ)
- **Source:** https://github.com/FutureJJ/claude-skills/tree/main/skills/typescript-wizard

## Install

```sh
agentstack add skill-futurejj-claude-skills-typescript-wizard
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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 |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [FutureJJ](https://github.com/FutureJJ)
- **Source:** [FutureJJ/claude-skills](https://github.com/FutureJJ/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-futurejj-claude-skills-typescript-wizard
- Seller: https://agentstack.voostack.com/s/futurejj
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
