Skip to content
Back to skills

Kicad Emsim

ASecurity

Electromagnetic field simulation of a KiCad board via gerber2ems + openEMS (dockerized, headless): S-parameters, impedance, and E-field PNG visualizations fed back to the agent. Use when asked to simulate a board's EM behavior, check impedance of traces, or visualize fields.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 18, 2026
ai-agentsdocker

Security analysis

A100/100

Scanned October 18, 2026

npx -y skills add AvatarSD/KiSkill --skill kicad-emsim --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kicad Emsim?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kicad Emsim
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/avatarsd-kicad-emsim/badge)](https://www.skillsdirectory.com/skills/avatarsd-kicad-emsim)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kicad-emsim
description: >
  Electromagnetic field simulation of a KiCad board via gerber2ems +
  openEMS (dockerized, headless): S-parameters, impedance, and E-field
  PNG visualizations fed back to the agent. Use when asked to simulate a
  board's EM behavior, check impedance of traces, or visualize fields.
---

# EM simulation (gerber2ems + openEMS)

Engine: `$(kx root)/kicad_lib/emsim.py`.
STATUS: chain VALIDATED — meander_loose example simulated end-to-end
(rc 0; |S11|≈1 + 455 ps delay on the open meander = physically correct).
Image `gerber2ems` (6.6 GB); rebuild if missing:
`docker build -t gerber2ems $(kx root)/.tools/gerber2ems/`. NEVER mount over
/home/docker — it shadows the image toolchain; emsim.run mounts at
/home/docker/sim.

## Flow

1. `emsim.prepare(pcb, workdir)` — gerbers+drill+pos via fab.py (names
   already match), `stackup.json` translated from the board's
   `(setup (stackup ...))`, `simulation.json` template.
2. **Fill ports** in simulation.json (width/length in µm, impedance,
   layer index, excite flag) and `traces` (start/stop port indices) —
   ports sit at position-file footprint locations (use simulation-port
   footprints on the board for clean port placement).
3. `emsim.run(workdir, export_field=True)` — dockerized
   `gerber2ems -a --export-field`: geometry → FDTD → postprocess.
4. Read the outputs: `ems/*.csv` S-params/impedance; **field PNGs are
   the agent feedback** — Read them, check field concentration against
   expectations (return paths, gaps, stubs). VTR dumps open in ParaView
   for the user.

## Notes

- Frequency range/grid in SIM_TEMPLATE: 0.2–6 GHz, sane FR-4 defaults;
  finer grids explode runtime (FDTD is O(cells × steps)).
- Worked examples: `.tools/gerber2ems/examples/*` (differential pair,
  filters, stubs) — copy a simulation.json from the closest one.
- Docker daemon does its own networking — image build/pull works even
  though the agent sandbox blocks direct DNS.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.