$npx -y skills add matlab/matlab-agentic-toolkit --skill matlab-read-docGuides the agent to reference official MathWorks Documentation and Help. Determine correct function syntax and workflows from user guides when deeper context is needed. Minimize iterations and repetitive trial and error. Use this skill to: Identify correct syntax and configurati
| 1 | # Use MathWorks Documentation |
| 2 | |
| 3 | Systematic methodology for reading live MathWorks documentation. Provides a repeatable four-pass strategy (local catalog → `help` → user guide pages → reference pages) that turns documentation lookup into a predictable, efficient operation. Uses MATLAB's `webread` via MCP to fetch pages, with helper scripts that handle URL discovery, HTML parsing, and content extraction. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - You are answering a "How do I..." question related to MathWorks products and workflows |
| 8 | - You guessed a URL and got 404 — use this skill to discover the correct URL from the index |
| 9 | - You need to find which functions exist for a product or workflow — start with the local function catalog |
| 10 | - You need to verify a function's syntax, arguments, or deprecation status from the authoritative source |
| 11 | - You want to check MathWorks best practices for a specific workflow |
| 12 | - Training-data knowledge is uncertain or potentially out of date for a release-specific API |
| 13 | - The user asks what MathWorks recommends for a specific topic |
| 14 | - You want a systematic approach that finds the RIGHT page (not just A page) in minimal tool calls |
| 15 | |
| 16 | ## When NOT to Use |
| 17 | |
| 18 | - The local `help` command is sufficient — prefer `help function_name` for API syntax; it's faster and always correct for the installed version |
| 19 | - The question is about general MATLAB programming patterns, not product-specific workflows |
| 20 | - You already have the authoritative answer from local `help` or a successfully fetched page |
| 21 | |
| 22 | ## Fast Paths |
| 23 | |
| 24 | Not every task needs the full four-pass strategy. Match the task to the shortest path: |
| 25 | |
| 26 | | Task | Fast Path | Skip | |
| 27 | | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------- | |
| 28 | | Release notes / what's new | Fetch `https://www.mathworks.com/help/{product}/release-notes.md` directly via `webread`, then extract the `## R20XXx` section | Steps 0-2 — no script needed | |
| 29 | | Known standalone function, need ref page | Use a URL from a prior `extract_page_slugs` call, or construct `baseUrl + "ref/{name}.html"` for simple standalone functions | Steps 0-2 — but URL must come from a verified source, not guessed | |
| 30 | | Know the product, need function list | `get_local_function_list(product)` | Steps 1-4 — no web needed | |
| 31 | | Unfamiliar API, no idea what exists | Full four-pass strategy | Nothing — use all steps | |
| 32 | |
| 33 | ### Release notes |
| 34 | |
| 35 | Release notes are available as clean markdown at `https://www.mathworks.com/help/{product}/release-notes.md`. Fetch this URL with `webread`, then extract the section between `## R20XXx` and the next `## R` header. No HTML parsing needed. Common product slugs: `matlab`, `simulink`, `ecoder`, `rtw`, `stateflow`, `fixedpoint`, `hdlcoder`. |
| 36 | |
| 37 | ## Help Center Page Hierarchy |
| 38 | |
| 39 | - **Product landing page** — Lists top-level categories with short descriptions. Use to discover section slugs. |
| 40 | - **Intermediate category page** — Links to subcategories with one-line descriptions. No leaf content. Drill deeper. |
| 41 | - **Lowest-level category page** — Contains reference groups (functions, blocks, apps) then links to related topics and examples. |
| 42 | - **Topic pages** (`ug/` or product-specific path) — Conceptual or task-based content explaining how to use a feature. |
| 43 | - **Example pages** — Standalone worked examples with supporting files. May include live scripts, data files, or models. |
| 44 | - **Reference pages** (`ref/` or `slref/`) — Function, block, object, or property reference. Multiple subtypes: function ref, object ref, property list, block ref, app ref. |
| 45 | - **Getting started pages** (`gs/`) — Introductory tutorials for new users of a product. |
| 46 | - **Sequential topics** (STEP 1, 2, 3) indicate a workflow with an intended order. |
| 47 | |
| 48 | ## Choosing What to Fetch |
| 49 | |
| 50 | MathWorks doc has two content layers that serve different purposes: |
| 51 | |
| 52 | - **Guide pag |