# Kicad Emsim

> >

- **Type:** Skill
- **Install:** `agentstack add skill-avatarsd-kiskill-kicad-emsim`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AvatarSD](https://agentstack.voostack.com/s/avatarsd)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AvatarSD](https://github.com/AvatarSD)
- **Source:** https://github.com/AvatarSD/KiSkill/tree/main/skills/kicad-emsim

## Install

```sh
agentstack add skill-avatarsd-kiskill-kicad-emsim
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AvatarSD](https://github.com/AvatarSD)
- **Source:** [AvatarSD/KiSkill](https://github.com/AvatarSD/KiSkill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-avatarsd-kiskill-kicad-emsim
- Seller: https://agentstack.voostack.com/s/avatarsd
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
