/kicad-happy:mouserfrom kicad-happy
Searches Mouser Electronics for electronic components: finds parts, checks pricing/stock, downloads datasheets, analyzes specifications. Supports batch MPN-list seeding for bulk datasheet workflows without a KiCad project.
Ships in kicad-happy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| Skill | Purpose |
|---|---|
kicad | Schematic analysis — extracts MPNs for part lookup |
bom | BOM management — orchestrates sourcing across distributors |
digikey | Primary prototype source (prefer for datasheets — direct PDF links) |
spice | Uses Mouser parametric data for behavioral SPICE models |
Mouser is the secondary source for prototype orders — use when DigiKey is out of stock or has worse pricing. For production orders, see lcsc/jlcpcb. For BOM management and export workflows, see bom. For datasheets, prefer DigiKey's API (direct PDF links) — Mouser blocks automated PDF downloads.
Mouser uses simple API key authentication — no OAuth, no tokens, no callback URLs. The Search API key is a UUID passed as a query parameter.
Set the environment variable before running the scripts:
export MOUSER_SEARCH_API_KEY=your-search-api-key-uuid
If credentials are stored in a central secrets file (e.g., ~/.config/secrets.env), load them first:
export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs)
All search endpoints use the Search API key as a query parameter: ?apiKey=<key>. Content-Type is application/json for all POST requests.
POST /api/v1/search/keyword?apiKey=<key>
{
"SearchByKeywordRequest": {
"keyword": "100nF 0402 ceramic capacitor",
"records": 50,
"startingRecord": 0,
"searchOptions": "InStock"
}
}
searchOptions: "None" | "Rohs" | "InStock" | "RohsAndInStock"records: max 50 per requeststartingRecord: offset for paginationPOST /api/v1/search/partnumber?apiKey=<key>
{
"SearchByPartRequest": {
"mouserPartNumber": "GRM155R71C104KA88D|RC0402FR-0710KL",
"partSearchOptions": "Exact"
}
}
|)partSearchOptions: "Exact" | "BeginsWith" | "Contains"V2 adds manufacturer filtering and pagination by page number.
POST /api/v2/search/keywordandmanufacturer?apiKey=<key>
{
"SearchByKeywordMfrNameRequest": {
"keyword": "LMR51450",
"manufacturerName": "Texas Instruments",
"records": 25,
"pageNumber": 1,
"searchOptions": "InStock"
}
}
Note: the wrapper object name is SearchByKeywordMfrNameRequest (not SearchByKeywordMfrRequest — the V1 name is deprecated).
POST /api/v2/search/partnumberandmanufacturer?apiKey=<key>
GET /api/v2/search/manufacturerlist?apiKey=<key>
Returns the full list of manufacturer names for use in filtered searches.
These still work but V2 equivalents are preferred:
POST /api/v1/search/keywordandmanufacturer → use V2POST /api/v1/search/partnumberandmanufacturer → use V2GET /api/v1/search/manufacturerlist → use V2All search endpoints return the same response format:
{
"Errors": [],
"SearchResults": {
"NumberOfResult": 142,
"Parts": [...]
}
}
| Field | Type | Description |
|---|---|---|
MouserPartNumber | string | Mouser's internal part number (prefixed, e.g., 81-GRM155R71C104KA88) |
ManufacturerPartNumber | string | Manufacturer's part number (MPN) — use for cross-distributor matching |
Manufacturer | string | Manufacturer name |
Description | string | Product description |
Category | string | Product category |
DataSheetUrl | string | URL to datasheet PDF (Mouser-hosted — see Datasheet section) |
ProductDetailUrl | string | URL to Mouser product page |
ImagePath | string | Product image URL |
Availability | string | Human-readable stock text (e.g., "2648712 In Stock") |
AvailabilityInStock | string | Numeric stock quantity (as string) |
AvailabilityOnOrder | array | Incoming stock: [{Quantity, Date}] |
LeadTime | string | Factory lead time (e.g., "84 Days") |
LifecycleStatus | string|null | "New Product", "End of Life", etc. |
IsDiscontinued | string | "true" or "false" (string, not boolean) |
SuggestedReplacement | string | Replacement MPN if discontinued |
Min | string | Minimum order quantity (as string) |
Mult | string | Order multiple (as string) |
Reeling | bool | Tape-and-reel packaging available |
ROHSStatus | string | RoHS compliance status |
PriceBreaks | array | Tiered pricing: [{Quantity, Price, Currency}] |
ProductAttributes | array | Parametric specs: [{AttributeName, AttributeValue}] |
AlternatePackagings | array|null | Alternate packaging MPNs: [{APMfrPN}] |
SurchargeMessages | array | Tariff/surcharge info: [{code, message}] |
ProductCompliance | array | HTS codes, ECCN: [{ComplianceName, ComplianceValue}] |
UnitWeightKg | object | {UnitWeight: <float>} in kg |
"$0.10", not a float. Parse it before comparing.AvailabilityInStock returns "2648712" not 2648712."true" or "false", not boolean.81-GRM155R71C104KA88 — the prefix is Mouser-specific. Use ManufacturerPartNumber for cross-referencing.SearchByKeywordMfrNameRequest, not SearchByKeywordMfrRequest.SurchargeMessages may contain US tariff percentages — useful for cost estimation.AvailabilityOnOrder shows incoming stock quantities and expected dates.Mouser's DataSheetUrl field points to Mouser-hosted URLs (mouser.com/datasheet/...). These URLs block automated downloads — they return an HTML "Access denied" page when fetched with Python/curl/wget, even with browser User-Agent headers. The download scripts handle this with a multi-strategy approach:
Note: Mouser's product pages return 403 for most automated requests, so strategy 2 has limited success. DigiKey and LCSC are more reliable datasheet sources.
Use sync_datasheets_mouser.py to maintain a datasheets/ directory alongside a KiCad project. Same workflow and manifest.json format as the DigiKey skill.
# Sync datasheets for a KiCad project
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch>
# Preview what would be downloaded
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --dry-run
# Retry parts a previous run failed at Mouser
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --force
# Custom output directory
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> -o ./my-datasheets
# Parallel downloads (3 workers)
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --parallel 3
# Batch mode — sync from a plain MPN list (no KiCad project required)
python3 <skill-path>/scripts/sync_datasheets_mouser.py --mpn-list mpns.txt --output ./datasheets
MPN-list batch mode — when you have a list of MPNs but no
KiCad project to point at (harness datasheet seeding, bulk part-library
seeding). One MPN per line; blank lines and # comments (full-line and
inline) are skipped; generic values (100nF, DNP) are filtered via
is_real_mpn() and de-duplicated. Output defaults to ./datasheets/ in
the current working directory when --output is omitted.
Rate limiting — the script waits --delay seconds (default 1.0) before
each API call. One serial worker therefore makes up to about 60 calls a minute,
and --parallel N multiplies that. Check your key's allowance and set
--delay / --parallel to stay under it.
Use fetch_datasheet_mouser.py for one-off downloads.
# Search by MPN (uses Mouser API)
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "TPS61023DRLR" -o datasheet.pdf
# Direct URL download
python3 <skill-path>/scripts/fetch_datasheet_mouser.py "https://example.com/datasheet.pdf" -o datasheet.pdf
# JSON output
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "ADP1706" --json
A --search hit that is a different part is refused (exit 2) rather than downloaded; a family match is accepted.
The scripts try multiple sources in order:
DataSheetUrl from the API responseplaywright is installed and datasheets.allow_private_hosts is set in ~/.kicad-happy.json, uses headless Chromium as a last resort (the browser resolves each host itself, so it is not started without the opt-in)When all methods fail, provide the ProductDetailUrl to the user so they can download from the Mouser product page in their browser.
If no API key is available, search Mouser by fetching product pages directly:
https://www.mouser.com/c/?q=<query>Include key parameters in the query:
Min and Mult fields matter — some parts have minimum order qty or must be ordered in multiplesSurchargeMessages may include US tariff percentages — factor into cost estimatesAvailabilityOnOrder shows incoming stock with expected datesIsDiscontinued and LifecycleStatus before selecting partsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aklofas/kicad-happy --plugin kicad-happy11 skills in this plugin
/bomBOM (Bill of Materials) management for electronics projects — the workflow skill that coordinates DigiKey, Mouser, LCSC, element14, JLCPCB, PCBWay, and KiCad skills around a unified BOM lifecycle. Create, update, and maintain BOMs with part numbers, costs, quantities stored as KiCad symbol properties. ALWAYS trigger this skill for any task involving component sourcing, pricing, ordering, distributor searches, BOM export, or fabrication preparation — even if the user names a specific distributor or fab house (e.g. "search DigiKey for...", "generate JLCPCB BOM", "order from Mouser"). This skill analyzes the schematic for sourcing gaps, recommends which distributor/fab skills to call for each gap, and writes results back as symbol properties — the agent (or user) performs the actual searches via the called skills. Also trigger on phrases like "what parts do I need", "order components", "how much will this cost", "export for JLCPCB", "find parts for this board", "compare pricing", or "check stock"./datasheetsExtract structured specifications from electronic component datasheet PDFs — pinouts, electrical characteristics, peripherals, topology, and features. Cache extractions per project for consumption by schematic and PCB analyzers. Primary consumer infrastructure for `kicad`, `emc`, `spice`, and `thermal` analyzers. Use this skill whenever the user asks to extract, verify, or read specs from a component datasheet; when analyzers need verified IC knowledge (EN pin thresholds, PG presence, USB peripheral speed); or when a review mentions datasheet coverage, extraction quality, or per-MPN specifications. Also triggers on "extract this datasheet", "what are the specs for MPN X", "verify datasheet extraction", or "check pin functions for part Y"./digikeySearch DigiKey for electronic components and download datasheets — primary source for prototype orders and the preferred API method for fetching datasheets. Find parts by keyword or MPN, check pricing/stock, download datasheets via API, analyze specifications. Sync and maintain a local datasheets directory — extract components from schematics, download missing datasheets, keep them up to date. Also supports batch MPN-list seeding (`--mpn-list`) for bulk workflows without a KiCad project. Use when the user asks about electronic components, part specs, datasheets, pricing, stock, footprints, or needs to download a datasheet — even without mentioning "DigiKey". Also for "sync datasheets", "download datasheets for my board/project", or mentions a datasheets directory. DigiKey is the default distributor for prototyping. For BOM workflows, see the bom skill./element14Search Newark, Farnell, and element14 for electronic components — find parts by MPN or distributor part number, check pricing/stock, download datasheets, analyze specifications. One unified API covers all three storefronts (Newark for US, Farnell for UK/EU, element14 for APAC). Free API key, simple query-parameter auth, no OAuth. Datasheets download directly from farnell.com CDN with no bot protection. Sync and maintain a local datasheets directory for a KiCad project, or use batch MPN-list seeding (`--mpn-list`) for bulk workflows without a project. Use this skill when the user mentions Newark, Farnell, element14, needs parts from a non-US distributor, wants to compare pricing across regions, or needs datasheets from a source that doesn't require complex API auth. For package cross-reference tables and BOM workflow, see the `bom` skill./emcEMC pre-compliance risk analysis for KiCad PCB designs — 18 check categories, 44 rule IDs covering ground planes, decoupling, I/O filtering, switching harmonics, clock routing, differential pair skew, board edge radiation, PDN impedance, return paths, crosstalk, ESD protection, shielding, and magnetic leakage from switching inductors. Produces severity-ranked risk report with pre-compliance test plan. Supports FCC Part 15, CISPR 32, CISPR 25 (automotive), MIL-STD-461G. SPICE-enhanced when available. Use when the user asks about EMC, EMI, radiated/conducted emissions, FCC compliance, CE marking, CISPR, ground plane issues, decoupling strategy, clock routing EMC, switching noise, differential pair skew, or whether their board will pass EMC testing. Also for "will this pass FCC?", "check my EMC", "is my ground plane okay?", "check my decoupling", or "generate an EMC test plan"./jlcpcbJLCPCB PCB fabrication and assembly — BOM/CPL generation, basic vs extended parts, assembly constraints, design rules, ordering workflow. Use with KiCad for JLCPCB manufacturing. Use this skill when the user mentions JLCPCB, wants to order PCBs or assembled boards, needs prototype bare PCBs and stencils, wants to know JLCPCB design rules and capabilities, or is asking about PCB manufacturing costs or turnaround times. For gerber/CPL export, stencil ordering, and BOM management, see the `bom` skill.Other plugins' skills for the same job