/system-modeler:search-modelica-docsfrom system-modeler
Searches bundled Modelica and Wolfram System Modeler documentation offline using BM25 ranking.
Ships in system-modeler. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A self-contained, offline documentation search. It ranks passages with BM25 (pure Python standard library — no third-party packages, no network, no API) over three prebuilt corpora and returns the matching chunks with their citation URLs. Use it to ground answers in real documentation instead of recalling from memory.
Answering the question is often not the whole job: once the answer points at a
model, the rest of the System Modeler toolkit is available — validate-modelica
to check one compiles, simulate-modelica to run it, diagnose-modelica when it
will not build or is unaccountably slow, modelica-model-architecture before
writing one, and the annotate-* skills for icons, diagrams and stored plots.
The content covers the Modelica language, the System Modeler tool, and the Modelica Standard Library — pick the corpus by what the user means:
--corpus value | Covers | Backing corpora |
|---|---|---|
modelica | The Modelica language — syntax, semantics, the normative specification | spec |
systemmodeler (or sm) | Wolfram System Modeler, the tool — building/simulating models, GUI, tutorials, what's-new | docs |
msl (or library) | The Modelica Standard Library — component/block docs, exact parameter names, example models, annotation-stripped source | msl |
all (default) | Everything | spec + docs + msl |
spec | Modelica Language Specification (normative) | spec |
docs | System Modeler documentation | docs |
Routing guidance:
when work", "is this valid Modelica", "what's
the rule for...") → --corpus modelica.--corpus systemmodeler.Inertia", "show an example wiring a spring-damper") →
--corpus msl. Also use this while writing a model with MSL components to
confirm parameter names and connect() patterns.all (the default) — a question often spans corpora, and
the results are tagged so you can see where each came from. But msl is by
far the largest corpus (~4,700 chunks vs ~900 for the other two), so if you
know the question is about the language or the tool, route to that corpus —
it keeps library chunks from crowding out the answer.Python 3 only. No pip install needed — the index uses just the standard
library and the prebuilt JSON data ships inside this skill (docsearch/data/).
Run commands from this skill's own directory (the folder containing this
SKILL.md) so the docsearch package imports. Use python instead of
python3 on Windows if that's what's on PATH.
cd "<skill-dir>" # the folder containing this SKILL.md
# Search (default k=5). Route with --corpus.
python -m docsearch.main --query "how do I write a when statement" --corpus modelica
python -m docsearch.main --query "simulate a fluid tank" --corpus systemmodeler --k 8
python -m docsearch.main --query "anti-windup PID controller output limits" --corpus msl
# Read the FULL text of a specific result (paste its exact url).
python -m docsearch.main --show "https://specification.modelica.org/maint/3.6/statements-and-algorithm-sections.html#4gfvu7z5m8rutn1wqr3gsd7mr"
python -m docsearch.main --show "modelica://Modelica.Blocks/LimPID"
# Or an MSL class by name, leaf or dotted. A dotted name narrows the match only
# to its top-level package (Modelica.Mechanics), so classes that share a leaf
# name there, such as the Rotational and Translational Brake, are listed with
# their declaration lines; pick one by url.
python -m docsearch.main --show "LimPID"
python -m docsearch.main --show "Brake"
# Machine-readable output for programmatic use.
python -m docsearch.main --query "array construction" --json
# List corpora + aliases / counts.
python -m docsearch.main --corpora
Flags: --corpus (route, default all), --k (results, default 5), --full
(print whole chunks instead of 600-char previews), --json, --show <url or MSL class name>.
MSL entries are keyed by top-level package and class name only
(modelica://Modelica.Mechanics/Brake-3), not by the full dotted path. In a
--corpus msl search, a CamelCase or dotted class name in the query
(ComplexConstant, Modelica.Blocks.Sources.Sine) puts that class first.
modelica vs systemmodeler vs all from the question
(see the table). Default to all if it could be either.--query with the user's question. BM25 is lexical, so if the
first try is weak, reformulate with domain keywords (e.g. add when clause discrete event, connector flow potential, algorithm section) and search
again, and/or raise --k. A second targeted query usually finds it.--show <url> (or re-run with --full).spec) text is authoritative/normative. Text in
brackets [...] is non-normative (explanatory only) — don't present it
as a rule. When the answer quotes or is derived from spec excerpts, end it
with this attribution: Derived from the Modelica® Language Specification.
Copyright © Modelica Association. Used under CC BY-SA 4.0.docs) are tutorials / user guide / release notes,
© Wolfram Research — cite the reference.wolfram.com source URL.msl) entries are class docs plus annotation-stripped
MSL 4.0 source. The code is authoritative for parameter names, defaults,
and connect() wiring. The toolchain may ship a newer, backward-compatible
4.x MSL; take the version for uses(Modelica(version=...)) from
wsm_run.py --mode info, not from this corpus. Entries are keyed by leaf class name as
modelica://<TopPackage>/<Name> pseudo-URLs — cite the class name (e.g.
Modelica.Blocks.Continuous.LimPID if the doc text gives the full path),
not the pseudo-URL, since it is not a resolvable link.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
modelica, system-modeler, documentation-search, offline-search, bm25
npx claudepluginhub wolframresearch/system-modeler-ai-toolkit --plugin system-modeler14 skills in this plugin
/annotate-control-panelAdd Wolfram System Modeler control-panel (Explore) annotations (__Wolfram(ControlPanels(Panel(...)))) to a .mo model so it opens with interactive sliders, checkboxes, input fields and popup menus in Simulation Center's Explore view. Use this skill whenever the user wants to add a control panel or Explore panel, make a model interactive, expose parameters as sliders/controls, or let someone tune parameters and re-simulate from the GUI. Triggers on phrases like 'add a control panel', 'add an explore panel', 'make interactive sliders', 'expose these parameters as controls', 'let me tune parameters in Simulation Center', 'add controls to this model'./annotate-modelica-animationAdd Wolfram System Modeler 3D-animation annotations (__Wolfram(Animation(cameras, windows))) to a MultiBody .mo model — stored cameras (fixed or following an object), trace paths, auto-play/repeat, time scale, ground grid and force-vector scaling — so the model opens with a ready-made animation in Simulation Center. Use this skill whenever the user wants to add or store an animation, camera, camera follow mode, trace path, or animation window settings in a model, attach a CAD shape, or make a MultiBody animation presentation-ready. Triggers on phrases like 'add a camera to the model', 'store the animation', 'follow the body with the camera', 'add a trace path', 'top/side/front view', 'animate this multibody model', 'attach a CAD file', 'the animation opens empty'.Other plugins' skills for the same job