スキル一覧に戻る
Cantara

similarity-resistor

by Cantara

1🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: similarity-resistor description: Use when working with resistor similarity calculations - comparing resistor MPNs, understanding value/tolerance/package matching, or implementing resistor-specific similarity logic.

Resistor Similarity Calculator Skill

Guidance for working with ResistorSimilarityCalculator in the lib-electronic-components library.


For metadata-driven similarity architecture, see /similarity-metadata:

  • SpecImportance levels (CRITICAL, HIGH, MEDIUM, LOW, OPTIONAL)
  • ToleranceRule types (exactMatch, percentageTolerance, minimumRequired, etc.)
  • SimilarityProfile contexts (DESIGN_PHASE, REPLACEMENT, COST_OPTIMIZATION, etc.)
  • Calculator integration patterns and gotchas

Overview

The ResistorSimilarityCalculator compares resistors based on:

  • Package size (0.3 weight) - 0402, 0603, 0805, etc.
  • Resistance value (0.5 weight) - 10K, 100R, 4.7K, etc.

Maximum similarity is 0.8 (not 1.0) since tolerance and other specs aren't always extractable.

Applicable Types

ComponentType.RESISTOR
ComponentType.RESISTOR_CHIP_VISHAY
ComponentType.RESISTOR_CHIP_YAGEO
ComponentType.RESISTOR_CHIP_PANASONIC
ComponentType.RESISTOR_CHIP_BOURNS
// Any type starting with "RESISTOR_"

Similarity Scoring

ConditionScore
Same value, same package0.8
Same value, different package0.5
Same package, different value0.3
Different value, different package0.0

Value Extraction

The calculator extracts resistance values from MPNs:

MPNExtracted Value
CRCW060310K0FKEA10K (10kΩ)
RC0603FR-0710KL10K (10kΩ)
ERJ3GEYJ103V10K (103 = 10×10³)

Package Size Extraction

Common package codes in MPNs:

PatternPackage
06030603 (1608 metric)
08050805 (2012 metric)
12061206 (3216 metric)

Cross-Manufacturer Matching

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)

Test Examples

// 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)

Implementation Notes

  • Returns 0.0 for null MPNs or null registry
  • Returns 0.0 for empty strings
  • Handles unrecognized formats gracefully (returns 0.0-1.0)

Learnings & Quirks

Value Notation

  • E96 notation: 103 = 10×10³ = 10kΩ, 4R7 = 4.7Ω
  • Yageo TCR code -07 is NOT a separator, it's temperature coefficient

Package Extraction

  • Some MPNs embed package in series name (e.g., RC0603)
  • Others have separate position (e.g., CRCW + 0603)

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です