Model the domain in the type system: discriminated unions over optional soup, when a generic earns its complexity, and reading a long inference error.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/3/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
Assigns the unhandled switch variable to a variable typed as never
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
-5%
Agent turns
0%
Response time
-2%
Model gemini-3.6-flashMeasured 8/3/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
I have a switch statement handling a discriminated union type `Shape = Circle | Square | Triangle`. When handling cases in TypeScript, a developer suggested adding a `default` clause that returns `0`. Show how to implement exhaustive compile-time type checking in the switch statement so new union variants cause a build error.
What was checked, without and with the skill
Checked
Without skill
With skill
Assigns the unhandled switch variable to a variable typed as never
Missed
Passed
case-08 · gemini-3.6-flash · 8/3/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md4 linessingle file
typescript-types
Model the domain in the type system: discriminated unions over optional soup,
when a generic earns its complexity, and reading a long inference error.