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-dtc-pmsmgit 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-dtc-pmsm)<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-dtc-pmsm"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-dtc-pmsm/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-dtc-pmsm"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-dtc-pmsm.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.00208 | $0.02480 |
| Opus 5.5 | $0.00083 | $0.00992 |
| Sonnet 5.5 | $0.00042 | $0.00496 |
| Haiku 4.5 | $0.00021 | $0.00248 |
Grade A, and why
motor-dtc-pmsm 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
motor-dtc-pmsm — PMSM Direct Torque Control Builder
Three-phase 2-level voltage-source inverter + PMSM (SPMSM / IPMSM via parameterization). Outer-loop = Speed PI providing Te_ref. Inner-loop = Direct Torque Control in αβ stationary frame: stator flux integrator + magnitude/angle/sector + 2-level hysteresis on (T, ψ) + Sutikno 6-state switching table → V_k → gate.
Layered on motor-pmsm-base. All base discipline applies.
Must-Follow Rules
- Plan first — Numbered plan with 21 input table, design-decision choices (design_decisions.md), build-script structure. Get user approval.
- One-click reproducibility — All parameters injected via
set_param(mdl, 'InitFcn', ...). Model must Run from.slxdouble-click in fresh MATLAB session. See crit_conditions.md §E-CRIT. - Default 6-state switching table for PMSM —
switching_table_mode='6state'(Sutikno 2011 Table 2). Never default to 8-state Takahashi for PMSM — V0/V7 zero vectors cause flux to decay. See switching_table.md and crit_conditions.md §A-CRIT. ψ_ref ≠ ψ_fby default — Takepsi_reffrom reference if supplied; else compute the id=0 load-point stator flux|ψ_s|_load = sqrt(ψ_f² + (Lq·iq_max)²)(not true MTPA, which needs id<0). Never defaultψ_ref = ψ_ffor IPMSM. See crit_conditions.md §B-CRIT.T_eq_factor = 15for DTC, NOT 5 — DTC's hysteresis inner loop has lower bandwidth than FCS-MPC's current PI. Compute Speed PI gains viapi_design('SO', J, 1, T_eq, a_so)withT_eq = 15·Tsc,a_so = 4. PassKt = 1because DTC outer PI directly outputsTe_ref[N·m] (plant has no Kt). See crit_conditions.md §C-CRIT.- Chart config = INHERITED + dual ZOH —
ch.SampleTime='-1',ch.ChartUpdate='INHERITED'. ZOH @ Tsc on every chart input (5 inputs:Te_ref, ia, ib, ua, ub) AND every chart output (9 outputs:gate, Te_meas, mag_psi, ψ_α, ψ_β, sector, V_k, C_ψ, C_T). See crit_conditions.md §D-CRIT. - Speed PI saturation is mandatory —
Saturationblock after PI with limits[-T_max, +T_max]. Anti-windup off for v1 baseline; production should add clamp or back-calc. - Add 4 Scopes for human inspection —
Scope_wm_RPM/Scope_Te/Scope_psi_mag/Scope_psi_alphabeta(XY Graph). The αβ XY plot is the most diagnostic — circular trajectory means healthy 6-state; hexagonal-with-inner-circle means 8-state pollution. See crit_conditions.md §F-CRIT. - Non-overlapping wiring — Every
add_blockspecifiesPositionper X/Y bands;arrangeSystem(mdl, 'FullLayout')as final fallback. - HB reverse-calculation from
fs_max— Use plant + Tsc to back-calcHB_T_minandHB_psi_min. Percentages (HB_T = 7.5% T_max, HB_ψ = 2.5% ψ_ref) are fallback only whenfs_maxis unknown. See hb_sizing.md.
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.
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 · 88 lines · 208 tokens per session scan A 2eda9040f684
motor-dtc-pmsm 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 208 tokens to every session and 2,480 once invoked, about $0.0008 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-dtc-pmsm compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| motor-dtc-pmsmcalebzu/pmsm-control-claude-skills-for-matlab | Skill | 15 | 4mo ago | Apache-2.0 | A | 208 | 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 |