motor-pmsm-base

motor-pmsm-base is a skill for Claude Code from calebzu/pmsm-control-claude-skills-for-matlab. It costs 159 tokens per session (1,699 once invoked), scanned A, original, Apache-2.0.

A reusable Simulink foundation for modeling a three-phase inverter-driven permanent-magnet synchronous motor (PMSM). It defines coordinate conventions, shared building blocks, checks, and review rules for adding different control methods.

In plain words
What is it for?
Use it as the base for simulations using field-oriented control, model-predictive control, direct torque control, sliding-mode control, or related PMSM methods.
Why use it?
It provides common motor-modeling rules and checks so later control implementations use consistent equations, wiring, and validation steps.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it as the base for simulations using field-oriented control, model-predictive control, direct torque control, sliding-mode control, or related PMSM methods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add calebzu/pmsm-control-claude-skills-for-matlab --skill motor-pmsm-base
Clone the repo
git clone --depth 1 https://github.com/calebzu/pmsm-control-claude-skills-for-matlab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for motor-pmsm-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base/github.svg)](https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base)
Your own site
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for motor-pmsm-base

Your own site · 80×15
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-pmsm-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00159 $0.01699
Opus 5 $0.00079 $0.00849
Sonnet 5 $0.00032 $0.00340
Haiku 4.5 $0.00016 $0.00170

Measured 12d ago against content hash d0c3afcffbcb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

motor-pmsm-base scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/motor-pmsm-base/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

motor-pmsm-base — PMSM Simulation Modeling Base

Reusable plant + frame conventions + building blocks + sanity-check templates + broken-FOC defense + visual review standards for three-phase voltage-source-inverter-driven PMSM (SPMSM / IPMSM via parameterization). Method-specific control laws (FOC / FCS-MPC / DTC / SMC / sensorless / observer / MTPA / weak-field) layer on top of this base.

Must-Follow Rules

  • Use shared/* assets, do not duplicate. shared/formulas/pmsm_formulas.md has signed-off plant equations and control law derivations. shared/building_blocks/ provides verified atomic blocks. Reference them by path; do not re-derive or copy content.
  • Run pre-build sanity grid before any build. See references/pre_build_grid.md. Fail-fast when Vdc/BEMF tight, Goto TagVisibility default-local, FF dimensional incorrect, or sector=7 startup unhandled.
  • Visual 4-check before trusting numerical metrics: motor rotates / iq tracks reference / abc AC sinusoidal / Te energy balance. If any check fails, fix the implementation before computing 5-metric scores.
  • Layout gate after build (MANDATORY, not advisory — prevents silent skip): block_overlaps==0 is a HARD self-test (T7; build fails otherwise) + a mandatory human screenshot sign-off (same human-in-loop model as the Visual 4-check). Line-line crossings and line-through-block hits are SOFT (reported, NEVER numeric-gated): non-planar signal graphs (K3,3/K5) cannot reach zero crossings on a 2-D plane (Kuratowski), so reach zero only by restructuring (Subsystem encapsulation / Goto/From), never by hard-gating a count. See references/measurement_logger.md.
  • One-click reproducibility: model must Run from .slx double-click without prior script execution. Inject all parameters via set_param(mdl, 'InitFcn', ...).
  • Don't guess conventions. dq is amplitude-invariant (factor 2/3); Anti_Park's internal From "The" requires Goto_The TagVisibility='global'. See references/plant_modeling.md and references/building_blocks.md.
  • PMSM block RefAngle must be 'Aligned with phase A axis (original Park)'. R2024b sps_lib default is '90 degrees behind phase A axis (modified Park)', which rotates the plant dq frame 90° relative to the chart Park convention — a silent failure mode (motor drifts to wrong operating point, abc non-clean sinusoidal, id large drift, iq cannot track iq_ref). Either copy PMSM from shared/building_blocks/pmsm_blocks.slx (pre-set), or set_param([mdl '/PMSM'], 'RefAngle', 'Aligned with phase A axis (original Park)'). DTC αβ-frame methods exempt. See references/broken_foc_diagnostics.md F-CRIT 6.

Read the full file on GitHub · 70 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 70 lines · 159 tokens per session scan A d0c3afcffbcb

Subscribe to this mod's changes

motor-pmsm-base is a skill published in the GitHub repository calebzu/pmsm-control-claude-skills-for-matlab (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 159 tokens to every session and 1,699 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

matlab-simulate-radar-detections

Configure, simulate, debug, and analyze radarDataGenerator within radarScenario. Use for: interactively building radar detection scenarios from datasheets or performance requirements; diagnosing missed detections and configuration errors; interpreting sensor spherical, body, and scenario-frame outputs; deriving…

matlab/matlab-agentic-toolkit · 92 tokens

matlab-analyze-em

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters()…

matlab/matlab-agentic-toolkit · 143 tokens

matlab-compute-gnss-position

Computes multi-constellation Global Positioning System (GPS) or Global Navigation Satellite System (GNSS) positions from RINEX v3 data using rinexread, gnssmeasurements, receiverposition, and gnssoptions. Filters by constellation, elevation mask, C/N0, and observation code. Reports DOP, scatter RMS, and satellite…

matlab/matlab-agentic-toolkit · 140 tokens

matlab-plan-robot-motion

Plan manipulator motion and generate trajectories in MATLAB. Use when the task involves moving a robot arm between configurations or poses — whether the user says "trajectory," "motion," "path," "move from A to B," or "plan." This skill applies regardless of whether the user explicitly mentions collisions or…

matlab/matlab-agentic-toolkit · 219 tokens

matlab-design-dsphdl-ddc

Use when designing a Digital Down Converter (DDC) using dsphdl System objects. Triggers on requests involving DDC design, frequency down-conversion for FPGA/ASIC, NCO + mixer + decimation filter chains, fractional/non-integer sample rate conversion, or HDL-optimized receiver front-end signal processing.

matlab/matlab-agentic-toolkit · 74 tokens

matlab-generate-gnss-waveform

Generate GNSS baseband waveforms (GPS, Galileo, NavIC) with physically realistic or user-specified channel impairments using the Satellite Communications Toolbox. Use when generating GPS L1 C/A, L1C, L2C, L5, Galileo E1, E1C, E5a, E5b, E5, or NavIC L5, S, L1 signals. Covers gpsWaveformGenerator…

matlab/matlab-agentic-toolkit · 175 tokens