Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when reviewing scripts, client components, bundles, or runtime behavior related to Avoid implicit type coercion. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.
.claude/skills/thedaviddias-type-coercion/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 106% | 0% |
| case-17 | ✓→✓ | = Same ✓ | 22% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 122% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 75% | 0% |
JavaScript's implicit type coercion produces results that look like bugs to anyone who doesn't know the exact coercion rules. == comparisons with mixed types silently convert values in ways that fail to catch genuine errors. Explicit conversions make code intent clear and catch real type mismatches at the point where they occur.
Find all uses of == and != (non-strict equality) in this file. Also look for implicit type conversions from + operator and other coercion traps.
Replace all == with === and != with !==. Add explicit type conversions where mixed types are intentionally compared.
Explain JavaScript's implicit type coercion rules, why == is problematic, and how to write safe type comparisons.
Review scripts, client components, and browser execution paths related to Avoid implicit type coercion. Flag exact imports, event handlers, runtime side effects, or blocking operations that violate the rule, and state how the change should be verified in the browser.
For full implementation details, code examples, and framework-specific guidance, see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/javascript/type-coercion
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→pass | 7,892 | 8,015 | +2% | 1 | 1 | 0% | 1,470 | 1,796 | +22% | 0 | 0 | — |
case-01 | fail→pass | 8,809 | 7,021 | -20% | 1 | 1 | 0% | 1,713 | 1,601 | -7% | 0 | 0 | — |
case-02 | fail→pass | 3,706 | 6,224 | +68% | 1 | 1 | 0% | 697 | 1,439 | +106% | 0 | 0 | — |
case-03 | pass→pass | 3,039 | 5,791 | +91% | 1 | 1 | 0% | 637 | 1,415 | +122% | 0 | 0 | — |
case-04 | pass→pass | 3,944 | 5,625 | +43% | 1 | 1 | 0% | 809 | 1,415 | +75% | 0 | 0 | — |
case-18 | pass→pass | 7,504 | 8,914 | +19% | 1 | 1 | 0% | 1,573 | 1,905 | +21% | 0 | 0 | — |
case-05 | pass→pass | 4,266 | 3,413 | -20% | 1 | 1 | 0% | 776 | 913 | +18% | 0 | 0 | — |
case-06 | pass→pass | 3,095 | 6,871 | +122% | 1 | 1 | 0% | 566 | 1,667 | +195% | 0 | 0 | — |
case-07 | pass→pass | 6,008 | 5,960 | -1% | 1 | 1 | 0% | 1,148 | 1,412 | +23% | 0 | 0 | — |
case-08 | pass→pass | 3,459 | 4,891 | +41% | 1 | 1 | 0% | 620 | 1,227 | +98% | 0 | 0 | — |
case-09 | pass→pass | 4,073 | 6,110 | +50% | 1 | 1 | 0% | 820 | 1,518 | +85% | 0 | 0 | — |
case-10 | pass→pass | 13,571 | 7,223 | -47% | 1 | 1 | 0% | 2,651 | 1,725 | -35% | 0 | 0 | — |
case-11 | pass→pass | 6,293 | 7,721 | +23% | 1 | 1 | 0% | 1,266 | 1,711 | +35% | 0 | 0 | — |
case-12 | pass→pass | 5,725 | 7,979 | +39% | 1 | 1 | 0% | 1,237 | 1,864 | +51% | 0 | 0 | — |
case-19 | pass→pass | 3,253 | 6,310 | +94% | 1 | 1 | 0% | 633 | 1,427 | +125% | 0 | 0 | — |
case-13 | pass→pass | 7,372 | 9,460 | +28% | 1 | 1 | 0% | 1,560 | 1,950 | +25% | 0 | 0 | — |
case-14 | pass→pass | 1,427 | 3,241 | +127% | 1 | 1 | 0% | 252 | 891 | +254% | 0 | 0 | — |
case-15 | pass→pass | 6,051 | 8,062 | +33% | 1 | 1 | 0% | 1,189 | 1,793 | +51% | 0 | 0 | — |
case-16 | pass→pass | 4,663 | 5,278 | +13% | 1 | 1 | 0% | 885 | 1,324 | +50% | 0 | 0 | — |
case-20 | pass→pass | 1,474 | 1,683 | +14% | 1 | 1 | 0% | 265 | 606 | +129% | 0 | 0 | — |
case-21 | pass→pass | 12,425 | 9,451 | -24% | 1 | 1 | 0% | 2,363 | 2,450 | +4% | 0 | 0 | — |
case-22 | pass→pass | 7,373 | 7,760 | +5% | 1 | 1 | 0% | 1,474 | 1,774 | +20% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.