Skip to content

/emc

EMC 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,

From plugin
kicad-happy
1.6k11 skills

Claude Code

$ npx -y skills add aklofas/kicad-happy --skill emc --agent claude-code

SKILL.md

emc.SKILL.md
name: emc
description: >-
  EMC 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".

EMC Pre-Compliance Skill

Automated EMC risk analysis for KiCad PCB designs. Identifies the most common causes of EMC test failures using geometric rule checks, analytical emission formulas, and optional SPICE simulation.

**This is a risk analyzer, not a compliance predictor.** It catches ~70% of common EMC design mistakes before fabrication. It cannot guarantee FCC/CISPR compliance — only a calibrated measurement in an accredited lab can do that. But it can reduce the first-spin failure rate from ~50% toward ~20-30%, potentially saving $5K-$50K per avoided board respin.

Related Skills

| Skill | Purpose | |-------|---------| | `kicad` | Schematic/PCB analysis — produces the analyzer JSON this skill consumes | | `kicad` (thermal) | Thermal hotspot analysis — MLCC derating and ferrite/inductor overheating findings can amplify EMC decoupling and filter issues (an over-stressed MLCC degrades; a hot ferrite drifts impedance). Worth cross-checking when EMC flags DC-001/DC-002 or EF-001/EF-002. | | `spice` | SPICE simulation — provides simulator backend for SPICE-enhanced PDN/filter checks |

**Handoff guidance:** Run the `kicad` skill's `analyze_schematic.py` and `analyze_pcb.py --schematic` first — this skill consumes their JSON output. Use `--full` on the PCB analyzer for best results (enables per-track coordinates for ground plane crossing, edge proximity, and return path checks). During a design review, run EMC analysis after the schematic/PCB analyzers, SPICE simulation, and thermal analysis, then incorporate EMC findings into the report.

Requirements

  • **Python 3.10+** — stdlib only, no pip dependencies
  • **Schematic analyzer JSON** — from `analyze_schematic.py --output`
  • **PCB analyzer JSON** — from `analyze_pcb.py --full --schematic <sch> --output` (recommended with `--full`)
  • **SPICE simulator** *(optional)* — ngspice, LTspice, or Xyce for SPICE-enhanced PDN/filter checks. Auto-detected. Without one, analytical models run unchanged.

Workflow

Step 1: Run the analyzers

python3 <kicad-skill-path>/scripts/analyze_schematic.py design.kicad_sch --analysis-dir analysis/
python3 <kicad-skill-path>/scripts/analyze_pcb.py design.kicad_pcb --full --schematic analysis/<run_id>/schematic.json --analysis-dir analysis/

Step 2: Run EMC analysis

Pass `--analysis-dir analysis/` — the script auto-resolves `schematic.json` and `pcb.json` from the manifest's current run, and writes `emc.json` into the same folder so the manifest tracks it.

# Recommended: auto-resolve inputs from the current run
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/

# Equivalent — explicit paths still accepted (and required if you want to
# point at a non-current run or override one input)
python3 <skill-path>/scripts/analyze_emc.py \
    --schematic analysis/<run_id>/schematic.json \
    --pcb analysis/<run_id>/pcb.json \
    --analysis-dir analysis/

# One-off JSON (bypasses the cache)
python3 <skill-path>/scripts/analyze_emc.py --schematic schematic.json --pcb pcb.json --output emc.json

# SPICE-enhanced (improved PDN and filter accuracy)
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/ --spice-enhanced

# Select target standard
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/ --standard cispr-class-b

# Select target market (sets all applicable standards)
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/ --market eu

# Filter by severity (high = error findings only)
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/ --severity high

# Human-readable text output
python3 <skill-path>/scripts/analyze_emc.py --analysis-dir analysis/ --text

Optional: Screen supplied harmonic lines against supplied limits

For spectral lines that are already expressed as RMS dBµV, dBµV/m, or dBµA, use the standalone screen. Levels must be RMS: subtract 3.01 dB from peak-amplitude spectra first. This skill's `harmonic_spectrum()` gives switch-node source amplitudes, not emission levels, so it is not a valid input without a coupling/path model.

**Limit values must come from the user.** Build a limit profile only from limit values the user provides, together with their source (for example a standard's edition and table or clause, where applicable), and record that source in `source.citation`. Never write limit tables from memory or fill in missing bands, detectors, or units; if the user has not supplied limits, ask for them instead of running the screen.

python3 <skill-path>/scripts/analyze_harmonic_limits.py \
  --spectrum harmonic-lines.json \
  --limits limit-profile.json \
  --limit-column peak \
  --output harmonic-limit-screen.json

This command is separate from `analyze_emc.py`. It does not calculate a spectrum, add an EMC finding, change the risk score, write `emc.json`, or determine compliance. See [Harmonic-Limit Screening](references/harmonic-limit-screen.md) for the input schemas and interpretation boundary.

Step 3: Interpret results

Read more
@aklofas
Ships withkicad-happy

AI-powered design review for KiCad. Analyzes schematics, PCB layouts, and Gerbers. Catches real bugs before you order boards.

Stars on GitHub

Momentum

stars in total
1.6k
Star history of aklofas/kicad-happy on GitHub, a chart by star-history.com

Other skills on kicad-happy.

bom
Auto-invoked

bom

BOM (Bill of Materials) management for electronics projects — the workflow skill that coordinates DigiKey, Mouser, LCSC,…

@aklofas@aklofasInstall Skill
datasheets
Auto-invoked

datasheets

Extract structured specifications from electronic component datasheet PDFs — pinouts, electrical characteristics, peripherals,…

@aklofas@aklofasInstall Skill
digikey
Auto-invoked

digikey

Search DigiKey for electronic components and download datasheets — primary source for prototype orders and the preferred API…

@aklofas@aklofasInstall Skill
element14
Auto-invoked

element14

Search Newark, Farnell, and element14 for electronic components — find parts by MPN or distributor part number, check…

@aklofas@aklofasInstall Skill
jlcpcb
Auto-invoked

jlcpcb

JLCPCB PCB fabrication and assembly — BOM/CPL generation, basic vs extended parts, assembly constraints, design rules, ordering…

@aklofas@aklofasInstall Skill
kicad
Auto-invoked

kicad

Analyze KiCad projects and PDF schematics: schematics, PCB layouts, Gerbers, footprints, symbols, netlists, and design rules.…

@aklofas@aklofasInstall Skill

More skills from other plugins.

api-review

api-review

Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…

@microsoft@microsoftInstall Skill
add-e2e-selectors

add-e2e-selectors

Add reliable @grafana/e2e-selectors to interactive elements and key containers in the Grafana frontend. Use when adding e2e…

grafana1d78k
@grafana@grafanaInstall Skill
promptfoo-evals

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…

@promptfoo@promptfooInstall Skill
deepeval

deepeval

DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…

@confident-ai@confident-aiInstall Skill

Questions about emc.

Which coding agents can use emc?
emc installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.