Agent skill

Emc

by aklofas in aklofas/kicad-happy

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…

MITAuto-check passedTesting & QA

Install Emc

skills CLI
$ npx skills add aklofas/kicad-happy --skill emc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aklofas/kicad-happy emc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aklofas/kicad-happy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/emc .claude/skills/emc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
emc
GitHub stars
1.4k
Used in
1 other repo
Token cost
~2.8k tokens
SKILL.md length
967 words
Files
9 (incl. scripts, references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 3 steps: Run the analyzers → Run EMC analysis → Interpret results
  • The user asks about EMC
  • SKILL.md covers Related Skills, Requirements, Workflow and What Gets Checked, plus 4 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Emc is an agent skill from aklofas/kicad-happy. 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…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/emc-methodology.md`, `references/emc-standards.md` and `references/pcb-emc-rules.md`).

It sits in Testing & QA, covering Test generation. The repository describes itself as: AI coding agent skills for KiCad electronics design. Works with Claude Code and OpenAI Codex. Analyze schematics, review PCB layouts, EMC pre-compliance, SPICE simulation… The licence is MIT.

When your agent uses it

  • The user asks about EMC
  • Radiated/conducted emissions
  • Ground plane issues
  • Decoupling strategy

Example prompts

  • “will this pass FCC?”
  • “check my EMC”
  • “is my ground plane okay?”
  • “/emc”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Run the analyzers
  2. Run EMC analysis
  3. Interpret results

What it can do on your machine

Read from SKILL.md and the folder at commit 0684046. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Emc loads about 2.8k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 223 tokens; SKILL.md has 967 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~223
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aklofas/kicad-happy at commit 0684046, republished under its MIT licence (© aklofas). 967 words, ~2,783 tokens.

Download SKILL.mdSave it as .claude/skills/emc/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
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.

SkillPurpose
kicadSchematic/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.
spiceSPICE simulation — provides simulator backend for SPICE-enhanced PDN/filter checks

Handoff guidance: Run the kicad skill's analyze_schematic.py and analyze_pcb.py 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 --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
bash
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 --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.

bash
# 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
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
Step 3: Interpret results

Read the JSON report and incorporate findings into the design review. Each finding has a severity, rule ID, description, and actionable recommendation. See "Interpreting Results" below.

What Gets Checked

44 rule IDs across 18 categories. Each rule has a specific threshold, rationale, and source citation — see references/pcb-emc-rules.md for full details.

CategoryRulesWhat it detects
Ground planeGP-001 to GP-005Signal crossing voids, zone fragmentation, missing ground planes, low fill ratio, multiple ground domains
DecouplingDC-001 to DC-003Cap too far from IC, IC with no decoupling cap, cap too far from via
I/O filteringIO-001, IO-002Connector without filtering, insufficient ground pins
Switching EMCSW-001 to SW-003Harmonic overlap, switching node copper area, input cap loop area
Clock routingCK-001 to CK-003Clock on outer layer, long trace, clock near connector
Via stitchingVS-001Ground via spacing exceeds λ/20 at highest frequency
StackupSU-001 to SU-003Adjacent signal layers, signal far from reference plane, thin interplane capacitance
Diff pairDP-001 to DP-004Intra-pair skew vs protocol limits, CM radiation, reference plane change, outer layer routing
Board edgeBE-001 to BE-003Signal near edge, incomplete ground pour ring, connector area stitching
PDN impedancePD-001 to PD-004Anti-resonance peaks, distributed rail impedance at IC load points, cross-rail coupling from downstream switching regulators
Return pathRP-001Layer transition via without nearby ground stitching via
CrosstalkXT-0013H spacing violation, aggressor-victim pairs
EMI filterEF-001, EF-002Filter cutoff too close to switching frequency (analytical or SPICE insertion loss)
ESD pathES-001, ES-002TVS too far from connector, insufficient ground vias near TVS
Thermal-EMCTH-001, TH-002MLCC DC bias derating (SRF shift), ferrite near heat source
ShieldingSH-001Connector aperture slot resonance near emission source
Emission estimatesEE-001, EE-002Board cavity resonance, switching harmonic envelope

Advisory outputs (not findings):

  • Pre-compliance test plan — frequency band prioritization, interface risk ranking, near-field probe points
  • Regulatory coverage — market-to-standards mapping, coverage matrix (what the tool checks vs what requires lab testing)
Show full SKILL.md (357 more words)Show less

Output Format

json
{
  "summary": {
    "total_checks": 42,
    "critical": 2, "high": 5, "medium": 8, "low": 12, "info": 15,
    "emc_risk_score": 73
  },
  "target_standard": "fcc-class-b",
  "findings": [
    {
      "category": "ground_plane",
      "severity": "CRITICAL",
      "rule_id": "GP-001",
      "title": "Signal crosses ground plane void",
      "description": "Net SPI_CLK crosses a 3.2mm gap in GND on In1.Cu",
      "components": ["U3", "U7"],
      "nets": ["SPI_CLK"],
      "recommendation": "Route around the gap, or fill the void"
    }
  ],
  "per_net_scores": [
    {"net": "SPI_CLK", "score": 67, "finding_count": 3, "rules": ["GP-001", "CK-001", "BE-001"]}
  ],
  "test_plan": {
    "frequency_bands": [{"band": "30-88 MHz", "risk_level": "high", "source_count": 12}],
    "interface_risks": [{"connector": "J1", "protocol": "USB", "risk_score": 8}],
    "probe_points": [{"ref": "L1", "x": 45.2, "y": 32.1, "reason": "switching inductor"}]
  },
  "regulatory_coverage": {
    "market": "us",
    "applicable_standards": ["FCC Part 15 Class B"],
    "coverage_matrix": [{"standard": "...", "coverage": "partial", "note": "..."}]
  }
}
Severity Levels
SeverityMeaningAction
CRITICALAlmost certain to cause EMC failureMust fix before fabrication
HIGHVery likely to cause issuesStrongly recommend fixing
MEDIUMMay cause issues depending on specificsReview and assess
LOWMinor risk, good practiceFix if convenient
INFOInformational — frequencies, estimatesUseful for lab prep
Risk Score

Each rule ID contributes at most 3 findings to the score (worst severity first). This prevents per-net rules like GP-001 from saturating the score on 2-layer boards. All findings are still reported — only the score is capped.

penalty = sum(worst 3 per rule × severity weight), score = max(0, 100 - penalty). Scores below 50 indicate significant EMC risk.

Interpreting Results

Ground plane findings — Any CRITICAL finding (signal crossing a void) is almost always a real problem. Fix unconditionally.

Decoupling findings — Distance-based findings have moderate false positive rates. A cap at 6mm may be fine for a low-speed IC but problematic for a 100MHz clock buffer. Use frequency context to prioritize.

I/O filtering — Highly relevant for cable-connected products. For board-to-board connections inside an enclosure, the risk is lower.

Diff pair findings — Protocol-specific skew limits are well-defined. USB HS (25ps), PCIe (5ps), Ethernet (50ps). Findings exceeding these limits are real issues.

PDN findings — Anti-resonance peaks are real and cause voltage droop. SPICE-verified findings are more accurate than analytical. If a peak is flagged, add a capacitor with SRF near the peak frequency.

Emission estimates — Order-of-magnitude estimates (±10-20 dB). Use them to prioritize frequency bands for pre-compliance testing, not to predict pass/fail.

EMC Standards

StandardFlagUse Case
FCC Part 15 Class Bfcc-class-bUS residential (default)
FCC Part 15 Class Afcc-class-aUS commercial/industrial
CISPR 32 Class Bcispr-class-bInternational (EU CE marking)
CISPR 32 Class Acispr-class-aInternational commercial
CISPR 25 Class 5cispr-25Automotive (strictest)
MIL-STD-461G RE102mil-std-461Military/defense

The --market flag maps markets to all applicable standards: us, eu, automotive, medical, military.

Limitations

  • Cannot predict absolute emission levels better than ±10-20 dB
  • Cannot account for enclosure effects (shielding, apertures, seams)
  • Cannot predict cable radiation without knowing external cable routing
  • Cannot replace full-wave simulation for complex geometries
  • Cannot guarantee compliance — only accredited lab measurement can

© aklofas, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references) in skills/emc of aklofas/kicad-happy.

  • SKILL.md
  • references/emc-methodology.md
  • references/emc-standards.md
  • references/pcb-emc-rules.md
  • scripts/analyze_emc.py
  • scripts/emc_envelope.py
  • scripts/emc_formulas.py
  • scripts/emc_rules.py
  • scripts/emc_spice.py

Open the folder on GitHubat commit 0684046

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in aklofas/kicad-happy, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Emc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Emc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Emc this skillaklofas/kicad-happy1.4k1 repos~2.8kAutomated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Generate Test Cases342164796/generate-test-cases1191 repos~2.9kAutomated safety check: PassNone
Wioworkersio/skills200—~5.8kAutomated safety check: PassMIT
Verify Cc Safety Netkenryu42/cc-safety-net1.6k—~2kAutomated safety check: PassMIT
File Servermicrosoft/WindowsProtocolTestSuites567—~4.1kAutomated safety check: PassMIT

Similar skills

  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Generate Test Cases

    342164796/generate-test-cases

    自主学习型测试文档生成器。从需求文档(Markdown)生成测试用例 XMind 文件,支持持久化记忆和持续学习。当用户提到"生成测试用例"、"根据需求生成测试"时触发。

    119 GitHub starsUsed in 1 repo~2.9k tokens
    Testing & QAAuto-check passed
  • Wio

    workersio/skills

    Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.

    200 GitHub stars~5.8k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Verify Cc Safety Net

    kenryu42/cc-safety-net

    Launch and drive the real cc-safety-net CLI — the hook decision path, explain, status/doctor, logs, and the local policy GUI — against an isolated home, capturing evidence.

    1.6k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • File Server

    microsoft/WindowsProtocolTestSuites

    Official

    ALWAYS LOAD THIS SKILL when working with FileServer, SMB, SMB2, SMB3, CIFS, file sharing, MS-SMB2, MS-FSCC, MS-FSA, MS-DFSC, MS-FSRVP, MS-RSVD, MS-SQOS, or any file server protocol test…

    567 GitHub stars~4.1k tokensUpdated 24 days ago
    Testing & QAAuto-check passed
  • Add E2E Test Suite

    crowdin/crowdin-cli

    Adds a new end-to-end (e2e) test suite for the Crowdin CLI under tests/e2e/suites/, exercising real CLI commands against a freshly-created Crowdin project.

    320 GitHub stars~2.4k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from aklofas/kicad-happy

All 11 skills in this repo
  • Datasheets

    aklofas/kicad-happy

    Extract structured specifications from electronic component datasheet PDFs — pinouts, electrical characteristics, peripherals, topology, and features.

    1.4k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Bom

    aklofas/kicad-happy

    BOM (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.

    1.4k GitHub starsUsed in 1 repo~5.5k tokens
    Auto-check passed
  • Digikey

    aklofas/kicad-happy

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

    1.4k GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Element14

    aklofas/kicad-happy

    Search Newark, Farnell, and element14 for electronic components — find parts by MPN or distributor part number, check pricing/stock, download datasheets, analyze specifications.

    1.4k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Kicad

    aklofas/kicad-happy

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

    1.4k GitHub starsUsed in 1 repo~20k tokens
    Auto-check passed
  • Lcsc

    aklofas/kicad-happy

    Search LCSC Electronics for electronic components — find parts by LCSC number (Cxxxxx) or MPN, check stock/pricing, download datasheets, analyze specifications.

    1.4k GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed

Categories

Questions about Emc

What does Emc do?

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…. Emc is an agent skill from aklofas/kicad-happy. 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.

When should I use Emc?

Emc fits situations like: the user asks about EMC; radiated/conducted emissions; ground plane issues; decoupling strategy.

How do I install Emc in Claude Code?

Run `npx skills add aklofas/kicad-happy --skill emc -a claude-code`. Or copy the skill folder (skills/emc in aklofas/kicad-happy) into .claude/skills/emc in your project. Claude Code loads it when a task matches its description.

How do I install Emc in Codex?

Run `npx skills add aklofas/kicad-happy --skill emc -a codex`. Or copy the skill folder (skills/emc in aklofas/kicad-happy) into .agents/skills/emc in your project. Codex loads it when a task matches its description.

Can I use Emc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aklofas/kicad-happy --skill emc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/emc, .gemini/skills/emc, .github/skills/emc and .opencode/skills/emc in your project.

What does Emc need to run?

Going by SKILL.md and its folder, Emc needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Emc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Emc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Emc use?

Emc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Emc use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Emc?

Skills that share tags, products or a category with Emc: Swig Test (swig/swig, 6.3k stars), Generate Test Cases (342164796/generate-test-cases, 119 stars), Wio (workersio/skills, 200 stars) and Verify Cc Safety Net (kenryu42/cc-safety-net, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Emc?

aklofas (a GitHub user) maintains it in aklofas/kicad-happy, which has 1,356 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 6, 2026.

Source: aklofas/kicad-happy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.