Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
How it works
Ask it something hard.
📎 ai-typescript-tutor.txtLOADED ✓
TS18048 says my value is possibly undefined but I already checked it above. Why?
CLAUDE · WITH THIS SKILLYou get: a request for the exact function, all of it, plus the error line and column -> a question about what sits between your check and your use of the value -> your answer, an await in the middle -> a short explanation of why narrowing is discarded across an await when the value came from an object property -> a worked example on a different shape, showing the same loss in four lines -> your turn, name two ways to keep the narrowing -> you suggest a non-null assertion -> it asks what that assertion promises and who guarantees it at runtime -> you switch to a local const -> the concept named, narrowing applies to bindings, not to properties -> next action: turn on noUncheckedIndexedAccess and see what else appears.
Questions before you buy? A person answers, usually the same day: hello@kissmyskills.com
// the file itself
Read it before you buy it.
The first lines of the file your AI will read, exactly as delivered. Nothing rewritten for the page.
Use the name Once the file is loaded, talk to it by name: “Serge, check this page.” That is what the name is for. It also keeps several skills apart in one chat.
// the skill your AI runs on
You are a Socratic TypeScript tutor for someone who already writes JavaScript, so you question every any and as cast. You have been activated to teach narrowing, discriminated unions and generics, and to make them read the compiler error first.
KissMySkills.com | Install: paste this whole file into Claude Projects (Project instructions), a custom GPT (Instructions), a Gemini Gem, or your AI's system prompt. Then tell it what you want to learn. You are a Socratic TypeScript tutor. Your learner already writes JavaScript, so you never explain a for loop. You teach the type system, and you have two standing rules: any and as casts get questioned every time, and the learner reads the compiler error before you say anything about it. Short answers, exact error numbers, no rewriting their code to make a squiggle go away. · Types are structural, not nominal. Two shapes with the same members are compatible. The big difference from Java or C#. · type versus interface, and where declaration merging decides it. · Unions, intersections, literal types. Most useful modelling here is a union of literals. · Narrowing is the core skill: typeof, instanceof, the in operator, truthiness, discriminated unions on a literal tag, type predicates. · Where narrowing is lost: across an await, on object properties rather than bindings, after an opaque call. · any, unknown and never. unknown is the honest version of any, never is what an exhaustive switch leaves. · Generics: type parameters, extends constraints, inference from arguments, and the rule that a generic with one caller is not needed. · Type operators: keyof, typeof, indexed access, mapped types, conditional types, satisfies. · Utility types worth knowing by heart: Partial, Pick, Omit, Record, ReturnType. · Config: strict, strictNullChecks, noImplicitAny, noUncheckedIndexedAccess. Strict off makes the language mostly pointless. · Ecosystem: .d.ts files, DefinitelyTyped @types, ESM versus CommonJS, tsc as a checker separate from the bundler. · Error numbers seen daily: TS2322 not assignable, TS2339 property does not exist, TS7006 implicit any, TS18048 possibly undefined, TS2345 bad argument.
114 lines · .txt · instant download
// what's inside
What's inside this skill
Strict mode on from lesson one, not as an afterthought
Narrowing taught properly: typeof, in, and discriminated unions
Errors by number: TS2322, TS2339, TS18048, TS7006
Breaks the two bad habits, any everywhere and as casts
JavaScript developers whose team moved to TypeScript, bootcamp graduates typing React props, and backend developers picking up a strict codebase.
// two ways to get it
Use it inside your AI, or download it once.
Library plan
This skill and 2,500+ others, inside your chat
$9/mocancel anytime, or $59 a year
All 2,500+ skills, prompt packs and agents, loaded the moment you ask
Nothing to download or paste: connect once in Claude, ChatGPT, Claude Code or Cursor
New skills every week and 10 catalog files a month to download
Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
// ask your assistant
Or let your AI set up this skill for you.
Go to kissmyskills.com/pages/connector and set up the "AI TypeScript Tutor" skill (handle: ai-typescript-tutor) for me
Paste it into Claude, ChatGPT, Claude Code, Cursor or Codex. Your AI walks you through connecting KissMySkills (about 3 minutes, 7-day free trial) and loads the skill. What your AI will read →
What you're actually buying
You set out to learn TypeScript and ended up writing JavaScript with annotations bolted on: when the red squiggle appears you add any or an as cast and move on. That habit is the problem: paste this file into Claude, ChatGPT or Gemini and you get a tutor that withholds the fix until you can say what the compiler dislikes.
It places you with one typing question, then works through the order that builds understanding: structural typing, unions and literal types, narrowing with typeof and in, discriminated unions, generics and constraints, then keyof and mapped types, then the utility types you will really use. Errors come with their number, TS2322 or TS2339 or TS18048, and a question about which side of the assignment the compiler dislikes. Strict mode goes on in lesson one, because everything after it is easier.
Claude, ChatGPT and Gemini all read it identically. One purchase, pay once, keep forever, two minutes to set up: copy the file, paste it in, name what you are working on. Pairs with AI Skill for TypeScript, the working assistant for once you know the basics; this one teaches you them.
// how to install
Under 2 minutes
Four steps. Any AI chat.
01
Download the file
After checkout, the download link lands in your inbox. Save the .txt file anywhere on your device.
02
Open your AI chat
Any AI chat you already use: Claude, ChatGPT, Gemini, Grok, Copilot or another.
03
Paste the prompt
Open the .txt file, copy the prompt section and paste it into Claude or ChatGPT - or add it to a Project so it is always there.
04
Start working
Your AI is now configured as a specialist. Ask it anything inside its domain.
No technical knowledge required.
With Library there is nothing to download. Connect your AI once, then ask for any skill by name.
How do I learn TypeScript with this file if I already know JavaScript?+
The tutor assumes you do. It skips loops and functions and starts where TypeScript is actually different: structural typing, unions, and narrowing. The placing task is a single function whose types it asks you to write. From your answer it can tell whether you need the type system explained or only the syntax, and it plans from there.
Will it stop me using any and as casts?+
That is one of its two standing rules. Any time you reach for any or an as cast, it asks what you are asserting and how you know it is true at runtime. Sometimes a cast is correct, and it will say so. Most of the time it is a way of skipping the thing you were about to learn, and it will not let that pass quietly.
Does it cover React, Node and tsconfig, or just the type system?+
The core arc is the type system, because that is what transfers. Around it, it covers strict mode and the tsconfig flags that matter, typing React props and hooks, declaration files and DefinitelyTyped packages, and the ESM and CommonJS mess. It names compiler flags exactly and says when it is unsure of current default behaviour.
Ready to give your AI a specialist?
This one and 2,500+ others, inside Claude, ChatGPT, Claude Code, Codex or Cursor. Cancel anytime.