.claude/skills/similarity-mosfet/SKILL.md
Use when working with MOSFET similarity calculations - comparing MOSFET MPNs, understanding N-channel/P-channel matching, equivalent groups like IRF530/STF530, or MOSFET-specific similarity logic.
npx skillsauth add Cantara/lib-electronic-components similarity-mosfetInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guidance for working with MosfetSimilarityCalculator in the lib-electronic-components library.
For metadata-driven similarity architecture, see /similarity-metadata:
The MosfetSimilarityCalculator compares MOSFETs based on:
ComponentType.MOSFET
ComponentType.MOSFET_INFINEON
ComponentType.MOSFET_ST
ComponentType.MOSFET_NXP
// Any type starting with "MOSFET_"
Note: Returns true for null type to handle unrecognized MOSFETs.
HIGH_SIMILARITY = 0.9; // Equivalent parts
MEDIUM_SIMILARITY = 0.7; // Similar specs
LOW_SIMILARITY = 0.3; // Different channel type or specs
The calculator knows these cross-manufacturer equivalents:
| IRF Part | Equivalents | |----------|-------------| | IRF530 | STF530, IRF530N, STF530N | | IRF540 | STF540, IRF540N, STF540N | | IRF9530 | STF9530, IRF9530N (P-channel) | | IRF9540 | STF9540, IRF9540N (P-channel) |
N-channel and P-channel MOSFETs always return LOW_SIMILARITY (0.3)
| Part | Channel | Note | |------|---------|------| | IRF530 | N-channel | Standard power MOSFET | | IRF9530 | P-channel | The "9" indicates P-channel | | IRF540 | N-channel | Higher current than IRF530 | | IRF9540 | P-channel | Higher current P-channel |
calculator.calculateSimilarity("IRF530", "IRF9530", registry);
// Returns 0.3 (N vs P channel)
The calculator normalizes manufacturer prefixes:
| Manufacturer | Prefix | Example | |--------------|--------|---------| | International Rectifier | IRF | IRF530 | | STMicroelectronics | STF | STF530 | | Vishay | IRF, SIF | SIF530 | | Infineon | IPD, IPB | IPD530 |
calculator.calculateSimilarity("IRF530", "STF530", registry);
// Returns 0.9 (same part, different manufacturer)
Common suffixes that don't affect equivalence:
N - Updated version (IRF530N ≈ IRF530)PBF - Lead-freeL - Logic level gatecalculator.calculateSimilarity("IRF530", "IRF530N", registry);
// Returns 0.9 (same MOSFET, N is just version)
// Cross-manufacturer equivalent
calculator.calculateSimilarity("IRF530", "STF530", registry);
// Returns 0.9
// N-channel vs P-channel
calculator.calculateSimilarity("IRF530", "IRF9530", registry);
// Returns 0.3
// Different current ratings
calculator.calculateSimilarity("IRF530", "IRF540", registry);
// Returns < 0.9 (14A vs 28A)
// Non-MOSFET parts
calculator.calculateSimilarity("LM358", "LM324", registry);
// Returns 0.0
9 in part number typically indicates P-channelsim(A,B) == sim(B,A)data-ai
Cost-effective task delegation strategy using Haiku model for straightforward work. Use when planning how to approach simple, pattern-following tasks to minimize costs.
tools
Use when working with component similarity calculations - comparing MPNs, finding equivalent parts, implementing new similarity calculators, or understanding how component matching works.
testing
Use when working with transistor similarity calculations - comparing BJT MPNs, understanding NPN/PNP polarity matching, equivalent groups like 2N2222/PN2222, or transistor-specific similarity logic.
testing
Use when working with sensor similarity calculations - comparing temperature/accelerometer/humidity sensor MPNs, understanding sensor families, equivalent parts, or sensor-specific similarity logic.