/analog-design-em:em-modelingfrom analog-design-em
Solves electromagnetics of on-chip passives/antennas, extracts converged passive S-parameter models, and fits lumped equivalents for RF circuit simulation. Supports openEMS, FastHenry, gmsh, and scikit-rf.
Ships in analog-design-em. 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.
None: SKILL.md is the whole skill.
analog-chip-design-agents:em-modeling-orchestrator agent and pass the full user request and any
available context. Do not execute stages directly.em-modeling-orchestrator mid-flow (including fix_request re-solves): do not
spawn a new agent. Treat this file as read-only — return the requested stage rules, sign-off
criteria, or loop-back guidance.Spawning the orchestrator from within an active orchestrator run causes recursive delegation and must never happen.
Before executing or advising on any stage, read the following if they exist:
memory/em/knowledge.md — known meshing recipes, passivity/fit fixes, de-embedding patterns,
solver-selection rules, and PDK/tool quirks. Incorporate its guidance into every stage.memory/em/run_state.md — current run identity for resume-after-interruption.Solve the electromagnetics of an on-chip passive or antenna, extract a converged, passive
S-parameter model, and fit a lumped equivalent for circuit-level RF simulation. Seven stages with
explicit QoR gates. EM modeling is a data-dependency producer and a cross-domain servicer: it
writes a Touchstone S-parameter model + fitted lumped model into design_state.em that rf-design
reads as a passive input. Its loop-backs are stage-local (passivity/fit fail → meshing /
geometry_definition, max 2×); a fundamental geometry/stack-up gap escalates to the user. EM
modeling does not open fix_requests, but it services rf-design-raised ones
(route_to: em-modeling): when dispatched with a fix_request.id it re-solves the passive toward a
higher-Q / higher-SRF target and closes the entry with a circuit_response so the
pipeline-orchestrator re-validates RF.
openEMS) — FDTD full-wave solver (distributed passives, antennas, mmWave)fasthenry) / FastCap (fastcap) — quasi-static RL / C field solversgmsh) — mesh generationskrf) — passivity / causality checks, fitting, de-embeddinghfss) — 3D / planar EMmomentum)emx) & AWR AXIEM / Analyst (axiem)sonnet) — planar EMdesign_state.layout.gds), a parametric-generator
spec, or explicit dimensions — plus the metal stack-up / substrate from constraints.pdk.pdk| Issue | Fix |
|---|---|
| No metal stack-up for the PDK | escalate constraint_gap — require pdk with a layer stack |
| Frequency grid stops below SRF | extend the grid past the expected self-resonance |
| Issue | Fix |
|---|---|
| Open / non-manifold geometry | repair the geometry; re-map GDS layers to the stack-up |
| Port reference plane misplaced | re-define ports on a valid plane and re-de-embed |
| Issue | Fix |
|---|---|
| Coarse mesh → non-passive / poor fit | refine the mesh at edges/gaps (loop-back target, max 2×) |
| Mesh misses a thin coupled gap | add local refinement to resolve the gap |
convergence/resource_limit: extend timesteps or coarsen sensibly (within λ/20), else
escalate.| Issue | Fix |
|---|---|
| FDTD energy not decayed (no convergence) | extend timesteps / check excitation & boundaries; re-solve |
| Resource / runtime limit hit | reduce the domain / coarsen the mesh within λ/20, or escalate resource_limit |
.sNp) file, de-embedding to the defined reference
planes; compute the passivity check (all eigenvalues of I − SᴴS ≥ 0 across frequency) and a
causality / reciprocity sanity check with scikit-rf.meshing (then geometry_definition)
— max 2×.q_factor vs frequency, srf_ghz (first self-resonance), and
coupling (k) for transformers.passivity_pass)q_factor / srf_ghz / coupling extracted| Issue | Fix |
|---|---|
| Non-passive S-matrix | loop back → meshing (refine), then geometry_definition (max 2×) |
| SRF / Q implausible vs expectation | check ports / de-embedding; re-extract |
.sNp) file + passivity report + q_factor / srf_ghz / coupling tablefit_error_pct = max |fit − EM| / EM × 100 across the band (S-param or Z/Y error).meshing / geometry_definition (max 2×); otherwise refine the fit
order locally.fit_error_pct ≤ budget (default ≤ 5%)| Issue | Fix |
|---|---|
fit_error_pct over budget | raise fit order / broadband (vector) fit; if EM data is the limiter, loop back → meshing |
| Fitted model non-passive | enforce passivity in the fit; if unachievable, loop back → meshing (max 2×) |
fit_error_pct + passivity-of-fit report| Check | Criterion |
|---|---|
| Passivity | extracted S-matrix and fitted model both passive across the band (passivity_pass) |
| Convergence | solver converged at every frequency point |
| Fit accuracy | fit_error_pct ≤ budget (default 5%) |
| Physical sanity | q_factor / srf_ghz / coupling extracted and plausible vs intent |
design_state.em for rf-design to consume.fix_request (status: fixed) with a
circuit_response and report PASS so the pipeline-orchestrator re-validates RF.fix_requests; in fix-servicing mode leave the entry claimed on an
unresolved re-solve.See plugins/meta/skills/pipeline-orchestration/SKILL.md §Constraints Schema for the authoritative schema and stage-entry validation rule.
Required at entry (em_setup) — hard-fail if missing:
constraints.pdk — the metal stack-up / substrate (without it there is no geometry to solve)design_state.layout.gds (preferred) or an explicit
parametric-generator / dimension spec passed in the prompt/constraintsEM modeling does not require supply.vdd_v or rf_specs — passive extraction is
bias-independent (a deliberate divergence from the rf-design required set). Skip constraint
validation entirely when invoked in re-solve / fix-servicing mode.
Write memory/em/run_state.md as the first action:
run_id: em_<YYYYMMDD>_<HHMMSS>
design_name: <design>
pdk: <pdk or unknown>
tool: <primary tool>
start_time: <ISO-8601>
last_stage: null
Update last_stage to the completed stage name only after each stage finishes successfully.
After each stage completes, upsert one JSON record in memory/em/experiences.jsonl keyed by
run_id. key_metrics fields: q_factor, srf_ghz, fit_error_pct. Set
signoff_achieved: false until em_signoff passes; then true. Create the file and parent
directories if they do not exist.
If mcp__plugin_ecc_memory__add_observations is available, emit each meshing / passivity / fit fix
as an observation to entity analog-design-em-fixes after writing to experiences.jsonl. Skip
silently if absent — the JSONL file is the canonical record.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
em-modeling, rf-design, s-parameter, lumped-model, passive-modeling, eda
npx claudepluginhub hdl-tools/analog-chip-design-agents --plugin analog-design-emOther plugins' skills for the same job