.claude/skills/similarity-resistor/SKILL.md
Use when working with resistor similarity calculations - comparing resistor MPNs, understanding value/tolerance/package matching, or implementing resistor-specific similarity logic.
npx skillsauth add Cantara/lib-electronic-components similarity-resistorInstall 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 ResistorSimilarityCalculator in the lib-electronic-components library.
For metadata-driven similarity architecture, see /similarity-metadata:
The ResistorSimilarityCalculator compares resistors based on:
Maximum similarity is 0.8 (not 1.0) since tolerance and other specs aren't always extractable.
ComponentType.RESISTOR
ComponentType.RESISTOR_CHIP_VISHAY
ComponentType.RESISTOR_CHIP_YAGEO
ComponentType.RESISTOR_CHIP_PANASONIC
ComponentType.RESISTOR_CHIP_BOURNS
// Any type starting with "RESISTOR_"
| Condition | Score | |-----------|-------| | Same value, same package | 0.8 | | Same value, different package | 0.5 | | Same package, different value | 0.3 | | Different value, different package | 0.0 |
The calculator extracts resistance values from MPNs:
| MPN | Extracted Value |
|-----|-----------------|
| CRCW060310K0FKEA | 10K (10kΩ) |
| RC0603FR-0710KL | 10K (10kΩ) |
| ERJ3GEYJ103V | 10K (103 = 10×10³) |
Common package codes in MPNs:
| Pattern | Package |
|---------|---------|
| 0603 | 0603 (1608 metric) |
| 0805 | 0805 (2012 metric) |
| 1206 | 1206 (3216 metric) |
The calculator can match equivalent resistors across manufacturers:
// Vishay 0603 10K vs Yageo 0603 10K
calculator.calculateSimilarity("CRCW060310K0FKEA", "RC0603FR-0710KL", registry);
// Returns >= 0.5 (both are 10K, may have same package)
// Same Vishay resistor - max similarity
calculator.calculateSimilarity("CRCW060310K0FKEA", "CRCW060310K0FKEA", registry);
// Returns 0.8
// Same value, different package
calculator.calculateSimilarity("CRCW060310K0FKEA", "CRCW080510K0FKEA", registry);
// Returns 0.5
// Same package, different value
calculator.calculateSimilarity("CRCW0603100RFKEA", "CRCW060310K0FKEA", registry);
// Returns 0.3 (100R vs 10K)
103 = 10×10³ = 10kΩ, 4R7 = 4.7Ω-07 is NOT a separator, it's temperature coefficientRC0603)CRCW + 0603)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.