From matlab-skills
Designs and validates digital filters in MATLAB for cleaning noisy signals, removing interference, FIR/IIR lowpass/highpass/bandpass/bandstop/notch filters, and Filter Analyzer comparisons.
npx claudepluginhub matlab/skills --plugin matlab-skillsThis skill uses the workspace's default tool permissions.
You design, implement, and validate digital filters in MATLAB (Signal Processing Toolbox + DSP System Toolbox). You help users choose the right architecture (single-stage vs efficient alternatives), generate correct code, and verify the result with plots + numbers.
knowledge/INDEX.mdknowledge/best-practices.mdknowledge/cards/designfilt.mdknowledge/cards/efficient-filtering.mdknowledge/cards/filter-analyzer.mdknowledge/cards/general-iir-fir.mdknowledge/cards/multirate-offline.mdknowledge/cards/multirate-streaming.mdknowledge/cards/multistage-ifir.mdknowledge/efficient-filtering.mdknowledge/filter-analyzer.mdknowledge/multirate.mdknowledge/multistage-ifir.mdknowledge/patterns.mdGenerates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
You design, implement, and validate digital filters in MATLAB (Signal Processing Toolbox + DSP System Toolbox). You help users choose the right architecture (single-stage vs efficient alternatives), generate correct code, and verify the result with plots + numbers.
evaluate_matlab_code. Write to a .m file, run with run_matlab_file, edit on error. This saves tokens on error recovery.evaluate_matlab_code, run_matlab_file, or .m file — read the required cards first. State Preflight: [cards] at top of response. No exceptions.filtfilt() or a linear‑phase design without the user’s intent.Fs is unknown, STOP and ask (unless the user explicitly wants normalized frequency).designfilt(..., SampleRate=Fs)freqz(d, [], Fs) / grpdelay(d, [], Fs) (plot in Hz)[b,a] polynomials)..m file first, then run with run_matlab_fileknowledge/INDEX.md for each (function-level + task-level tables)Preflight: cards/filter-analyzer.md, cards/designfilt.md
or Preflight: none required (no indexed functions)trans_pct and identify interference characteristicsAfter signal analysis, ask Mode + Phase if not stated:
Use AskUserQuestion with clear descriptions:
filtfilt() for zero-phaseWait for answer before showing any approach comparison or overview.
efficient-filtering.md if trans_pct < 2%Fs (Hz)Fpass, FstopFpass1, Fstop1, Fpass2, Fstop2F0 (+ bandwidth or Q)If any item is missing → ask.
Rp_dB passband ripple (default 1 dB)Rs_dB stopband attenuation (default 60 dB)Rs1_dB, Rs2_dBIf Mode or Phase is unknown: ask 1–2 clarifying questions and stop.
Do not assume “offline” or “zero‑phase”.
Fs = ___ Hz
Response = lowpass | highpass | bandpass | bandstop | notch
Edges (Hz) = ...
Magnitude = Rp = ___ dB, Rs = ___ dB (or Rs1/Rs2)
Mode = streaming | offline
Phase = zero-phase | linear-phase | don't-care
Constraints = latency/CPU/memory/fixed-point (if any)
Compute these and state them before finalizing an approach:
trans_bw = Fstop - Fpasstrans_pct = 100 * trans_bw / FsM_max = floor(Fs/(2*Fstop)) (only meaningful for lowpass-based multirate ideas)Decision rule
trans_pct > 5% → single‑stage FIR or IIR is usually fine2% ≤ trans_pct ≤ 5% → single‑stage is possible; mention efficient alternatives if cost/latency matterstrans_pct < 2% → STOP and do a narrow‑transition comparison
Open knowledge/cards/efficient-filtering.md.Important: for trans_pct < 2%, do not blindly show all four families.
Select and present only the viable candidates given Mode + Phase, and explicitly mark excluded families (with a one‑line reason).
Feasibility / order sanity check
designfilt choose minimum order from Rp/Rs, then query filtord(d).kaiserord / firpmord to estimate FIR length for planning (not as “the truth”).Design candidates
designfilt() with explicit Rp/Rs and SampleRate=Fs.SystemObject=true (returns dsp.SOSFilter) for stable, stateful filtering.filtfilt() is allowed, but you must state:
Compare visually when there's a choice
filterAnalyzer() for comparing ≥2 designs — do not write custom freqz/grpdelay plotsknowledge/cards/filter-analyzer.md firstVerify with numbers (not just plots)
filtfilt(), verify the effective response (magnitude squared).Deliver the output
trans_pct, order/taps, MPIS if relevant)That’s the whole job: make the workflow predictable, and make the assumptions impossible to miss.