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.
npx skills add calebzu/pmsm-control-claude-skills-for-matlab --skill motor-fcs-mpc-trivectorgit clone --depth 1 https://github.com/calebzu/pmsm-control-claude-skills-for-matlabWrote 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.
[](https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-trivector)<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-trivector"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-trivector/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.
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-trivector"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-trivector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00335 | $0.03352 |
| Opus 5.5 | $0.00134 | $0.01341 |
| Sonnet 5.5 | $0.00067 | $0.00670 |
| Haiku 4.5 | $0.00034 | $0.00335 |
Grade A, and why
motor-fcs-mpc-trivector 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
motor-fcs-mpc-trivector — PMSM Three-Vector Finite-Control-Set MPC Builder
Three-phase 2-level voltage-source inverter + PMSM (SPMSM / mild-saliency IPMSM via parameterization). Inner loop = three-vector FCS-MPC current control in the dq frame: each control period synthesizes an expected voltage vector per sector from the two adjacent active vectors u_i, u_j plus a zero vector, and splits the period into three sub-intervals — u_i for t_i, u_j for t_j, zero for t_z = Tsc − t_i − t_j — chosen so that both i_d and i_q reach their references in one period (dual-axis deadbeat). Outer loop = speed PI providing iq_ref, id_ref = 0. Synthesizing an arbitrary-direction, arbitrary-amplitude voltage vector and nulling both axes drives switching-cycle current ripple below single- and dual-vector FCS-MPC at the same Tsc.
Distilled from Xu Yanping et al. 2018 (Three-Vector Model Predictive Current Control for PMSM, Trans. China Electrotech. Soc. 33(5):980-986). Control-law formulas are the signed T2(b)–T6(b) in pmsm_formulas.md §F; plant physics, prediction, speed PI, Clarke/Park, the 8-vector set and the 6-sector decode are reused by pointer from pmsm_formulas.md (incl. §B.4/§B.5). The q-axis slope (T2a) is reused by pointer from §E.1 (N2), and the cost criterion from §F.0 (control strategy, non-signed).
Layered on motor-pmsm-base. All base discipline applies (Goto TagVisibility, Vdc/BEMF rule, Visual 4-check, broken-FOC defense).
What makes three-vector different (vs dual-vector motor-fcs-mpc-dualvector and single-vector)
| Aspect | Single-vector | Dual-vector | Three-vector (this skill) |
|---|---|---|---|
| Vectors per period | 1 (held) | 2: V_opt1 + V_j |
3: u_i + u_j (adjacent active) + zero |
| Deadbeat axes | none (search only) | q only (scalar t_opt1) |
d AND q (2×2 solve for t_i,t_j,t_z) |
| d-axis slope needed | no | no | yes (T2b) |
| Candidate set | 7/8 basic vectors | vector pairs | 6 synthesized expected vectors (one per sector) |
| Time allocation | — | q-deadbeat (N3) | dual-axis deadbeat 2×2 (T3) + 3-case clamp (T5) |
| Chart sample-time | INHERITED + dual ZOH | two-rate DISCRETE | two-rate DISCRETE: controller/theta @ Tsc, slicer @ Ts |
| Cost (this reference) | L2 weighted | L1 unweighted | L1 unweighted over the 6 expected vectors (paper eq 7) |
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.
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.
- 2mo ago First seen · 101 lines · 335 tokens per session scan A 06851825cf20
motor-fcs-mpc-trivector 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 335 tokens to every session and 3,352 once invoked, about $0.0013 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.
motor-fcs-mpc-trivector compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| motor-fcs-mpc-trivectorcalebzu/pmsm-control-claude-skills-for-matlab | Skill | 15 | 4mo ago | Apache-2.0 | A | 335 | Claude Code |
| matlab-robotics-autonomywzyn20051216/matlab-agent-skills | Skill | 30 | 8d ago | MIT | A | 129 | Claude Code, Codex |
| matlab-simulate-radar-detectionsmatlab/matlab-agentic-toolkit | Skill | 1.3k | yesterday | none | A | 92 | Claude Code |
| matlab-design-dsphdl-ddcmatlab/matlab-agentic-toolkit | Skill | 1.3k | yesterday | none | A | 74 | Claude Code |
| matlab-transmit-capture-usrpmatlab/matlab-agentic-toolkit | Skill | 1.3k | yesterday | none | A | 145 | Claude Code |
| matlab-analyze-ams-waveformmatlab/matlab-agentic-toolkit | Skill | 1.3k | yesterday | none | A | 90 | Claude Code |
| matlab-analyze-emmatlab/matlab-agentic-toolkit | Skill | 1.3k | yesterday | none | A | 143 | Claude Code |