Avoid implicit type coercion
SkillWeb & browsingType-coercion is a skill for AI agents that reviews JavaScript code and spots places where values get compared across different types by mistake. It inspects both source code and the browser execution path, so fixes target the real bottleneck or bug.
Use Avoid implicit type coercion in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Avoid implicit type coercion and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Avoid implicit type coercion skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have the JavaScript code you want reviewed available, such as scripts, client components, or bundles.
What your AI can do with it
- Review scripts, client components, and bundles for implicit type coercion
- Inspect runtime behavior related to Avoid implicit type coercion
- Examine the browser execution path alongside source code
- Identify comparisons across different types made by mistake
- Help target fixes at the real bottleneck or bug
Getting started
- Have the JavaScript code you want reviewed available, such as scripts, client components, or bundles.
- Add the type-coercion skill to your agent's setup.
- Ask the agent to review the code or runtime behavior for implicit type coercion issues.
What this skill tells your AI
The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/type-coercion/SKILL.md and read by ahel’s review.
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.
Quick Reference
- Always use === and !== instead of == and !=
- Convert types explicitly with Number(), String(), Boolean(), parseInt()
- Be careful with + operator — it concatenates strings but adds numbers
- Use Array.isArray() instead of typeof for array checks
Check
Find all uses of == and != (non-strict equality) in this file. Also look for implicit type conversions from + operator and other coercion traps.
Fix
Replace all == with === and != with !==. Add explicit type conversions where mixed types are intentionally compared.
Explain
Explain JavaScript's implicit type coercion rules, why == is problematic, and how to write safe type comparisons.
Code Review
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
Signals
- GitHub stars
- 74k
- Forks
- 7k
- Last commit
- Oct 2026
Questions
- What does type-coercion do?
- It helps an agent review JavaScript code and spot places where values get compared across different types by mistake, covering both source code and browser execution behavior.
- When should it be used?
- Use it when reviewing scripts, client components, bundles, or runtime behavior related to implicit type coercion.
- Does it look at runtime behavior or just source code?
- Both. It inspects source code and the browser execution path so fixes target the real bottleneck or bug.
Advanced
- Item type
- skill
- Key
type-coercion- Source
- github.com/thedaviddias/front-end-checklist
github.com/thedaviddias/front-end-checklist
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · wshobson
The pick for JavaScriptbrowser-use
Skill · browser-use
More in Web & browsingwebapp-testing
Skill · anthropics
More in Web & browsingplaywright-cli
Skill · microsoft
More in Web & browsingbenchmark
Skill · affaan-m
More in Web & browsing