motor-fcs-mpc

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

A builder for a motor-control simulation in Simulink, a MATLAB tool for modeling systems. It creates a current controller for a permanent-magnet motor driven by a three-phase inverter, with an optional speed controller.

In plain words
What is it for?
It helps build, port, or extend finite-control-set model predictive current control for surface- or interior-permanent-magnet motors, including optional outer speed control and one-click model setup in a fresh MATLAB session.
Why use it?
It provides a defined way to construct or reproduce this control model while keeping motor parameters and build settings consistent and repeatable.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It helps build, port, or extend finite-control-set model predictive current control for surface- or interior-permanent-magnet motors, including optional outer speed control and one-click model setup in a fresh MATLAB session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc
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-fcs-mpc
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-fcs-mpc

README.md
[![agentmods](https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc/github.svg)](https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc)
Your own site
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc/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-fcs-mpc

Your own site · 80×15
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,862 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.00168 $0.01862
Opus 5.5 $0.00067 $0.00745
Sonnet 5.5 $0.00034 $0.00372
Haiku 4.5 $0.00017 $0.00186

Measured 2mo ago against content hash 4ff08fc26fe0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

motor-fcs-mpc 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 2mo 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-fcs-mpc/SKILL.md · 79 lines

How it starts

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

motor-fcs-mpc — PMSM Single-Vector Finite-Control-Set MPC Builder

Three-phase 2-level voltage-source inverter + PMSM (SPMSM / IPMSM via parameterization). Inner-loop = FCS-MPC current control in dq frame. Outer-loop (optional) = speed PI providing iq_ref. Generalizes across machine sub-types by parameterizing Rs, Ld, Lq, ψf, Pn, J, F — no topology change between sub-types.

Layered on motor-pmsm-base. All base discipline applies (Goto TagVisibility, Vdc/BEMF rule, Visual 4-check, broken-FOC defense).

Must-Follow Rules

  1. Plan first. Before any add_block, write a numbered plan: parameter table, design-decision choices (design_decisions.md), build-script structure. Get user approval.
  2. One-click reproducibility. Inject all parameters via set_param(mdl, 'InitFcn', sprintf(...)). Model must Run from .slx double-click in fresh MATLAB session. See crit_conditions.md §J-CRIT.
  3. MPC chart params via sprintf from build-script workspace. Chart hardcodes Rs/Ld/Lq/ψf/Pn/Tsc as numeric literals at build time. Never put MPC params in an external .m file (drifts from plant). See crit_conditions.md §K-CRIT.
  4. Chart config = INHERITED + dual ZOH (NOT DISCRETE+Tsc). ch.SampleTime='-1', ch.ChartUpdate='INHERITED', leave Inputs DataType/Size at Inherit. Rate is locked by ZOH @ Tsc on every chart input + ZOH @ Tsc on chart output. See crit_conditions.md §G-CRIT.
  5. Outer PI saturation is mandatory. LimitOutput='on', limits [-iq_max, +iq_max] with 1.5·Pn·ψf·iq_max ≥ 1.3·TL_max. Without saturation, runaway iq_ref collapses the cost-weight ratio and MPC abandons d-axis. See outer_pi_saturation.md.
  6. ZOH every chart input even if upstream is already discrete. INHERITED chart's effective trigger rate is set by the fastest upstream signal; one un-ZOH'd input poisons the whole chart. See crit_conditions.md §A-CRIT.
  7. Use From Workspace + inline matrix for ω_ref, NOT Step+RateLimiter. Continuous-mode RateLimiter escapes its slew limit on first solver step. See crit_conditions.md §H-CRIT.

Read the full file on GitHub · 79 lines

Files

What ships with it

8 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. 2mo ago First seen · 79 lines · 168 tokens per session scan A 4ff08fc26fe0

Subscribe to this mod's changes

motor-fcs-mpc is a skill published in the GitHub repository calebzu/pmsm-control-claude-skills-for-matlab (15 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 168 tokens to every session and 1,862 once invoked, about $0.0007 per session on Opus 5.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

motor-fcs-mpc compared with skills from other repositories

motor-fcs-mpc next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
motor-fcs-mpccalebzu/pmsm-control-claude-skills-for-matlabSkill154mo agoApache-2.0A168Claude Code
matlab-robotics-autonomywzyn20051216/matlab-agent-skillsSkill308d agoMITA129Claude Code, Codex
matlab-simulate-radar-detectionsmatlab/matlab-agentic-toolkitSkill1.3kyesterdaynoneA92Claude Code
matlab-design-dsphdl-ddcmatlab/matlab-agentic-toolkitSkill1.3kyesterdaynoneA74Claude Code
matlab-transmit-capture-usrpmatlab/matlab-agentic-toolkitSkill1.3kyesterdaynoneA145Claude Code
matlab-analyze-ams-waveformmatlab/matlab-agentic-toolkitSkill1.3kyesterdaynoneA90Claude Code
matlab-analyze-emmatlab/matlab-agentic-toolkitSkill1.3kyesterdaynoneA143Claude Code