typescript-wizard
Skill3 starsChanged 9 months agoMITView on GitHub
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.
In this repository39 other files it gives its agents.
- api-designerSkill
- auth-patternsSkill
- aws-architectSkill
- cicd-masterSkill
- code-reviewerSkill
- css-craftsmanSkill
- database-designSkill
- debugging-detectiveSkill
- devops-pipelineSkill
- django-masterSkill
- docker-orchestratorSkill
- documentation-writerSkill
- fastapi-proSkill
- git-workflowSkill
- go-engineerSkill
- graphql-expertSkill
- kubernetes-opsSkill
- linux-adminSkill
- microservices-patternsSkill
- monitoring-observabilitySkill
- nextjs-architectSkill
- nginx-configSkill
- nodejs-backendSkill
- performance-tunerSkill
- postgres-expertSkill
- python-expertSkill
- react-masterySkill
- redis-cachingSkill
- regex-masterSkill
- rust-systemsSkill
- security-hardeningSkill
- shell-scriptingSkill
- sql-optimizerSkill
- svelte-expertSkill
- tailwind-masterSkill
- terraform-infraSkill
- testing-arsenalSkill
- vue-specialistSkill
- websocket-realtimeSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Types should document intent: If a type needs a comment to explain it, the type is wrong.
- Distinctive: line 19
Simple value?: Use primitive types or literal types.
- Very specific: line 20
Shape of an object?: Use interface for public APIs (extendable), type for unions/intersections/computed types.
- Distinctive: line 21
Varies by input?: Use generics with constraints.
- Distinctive: line 22
Conditional behavior?: Use discriminated unions first, conditional types if needed.
- Distinctive: line 23
Repeating a pattern?: Use mapped types or template literal types.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
asassertions. - Prefer
unknownoverany.unknownforces you to check;anysilences the compiler.
Decision Framework
- Simple value? Use primitive types or literal types.
- Shape of an object? Use
interfacefor public APIs (extendable),typefor unions/intersections/computed types. - Varies by input? Use generics with constraints.
- Conditional behavior? Use discriminated unions first, conditional types if needed.
- Repeating a pattern? Use mapped types or template literal types.
Anti-Patterns
- Using
anyto "fix" type errors — you're hiding bugs, not fixing them - Overly complex utility types that nobody can read — simplicity > cleverness
asassertions instead of proper narrowing — runtime bugs waiting to happen- Enums for simple string unions —
type Status = 'active' | 'inactive'is simpler and tree-shakeable namespacein 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 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

