matlab-write-help

Generate standards-compliant MATLAB help text for functions, classes, and scripts.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-write-help
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-write-help
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-software-development/matlab-write-help
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-write-help

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing MATLAB help comments that follow MathWorks documentation standards is error-prone: default patterns like Inputs:/Outputs: lists, block comments, and uppercase See Also lines produce non-conforming output. This Skill generates or rewrites help text that passes MathWorks conventions on the first attempt.

Core Features & Use Cases

  • Standards-Compliant Help Generation: Produces H1 lines, syntax paragraphs, See Also lines, and optional Example/Note sections with correct help casing, 75-character line limits, and proper indentation.
  • Class and Method Support: Handles classdef files with functions/properties listings, property postfix comments, and access-aware method help (full help for public methods, H1-only for private methods, getters, and setters).
  • Arguments Block Parsing: Reads MATLAB arguments blocks to derive required, optional, and name-value syntax paragraphs automatically.
  • Use Case: You wrote a new MATLAB function with an arguments block and need documentation. The Skill resolves the file, analyzes its signature, drafts conforming help text, and inserts it after your review.

Quick Start

Ask your agent to write MathWorks-standard help text for a specific MATLAB file, for example: generate help text for myFunction.m following MathWorks documentation standards.

Frequently Asked Questions about matlab-write-help

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write MATLAB function help text that follows MathWorks standards?

MATLAB help text starts with an H1 line (%FUNCNAME - description without a period), followed by syntax paragraphs indented three spaces, and ends with a See also line. Lines must not exceed 75 characters from the %, and function names use help casing where all-lowercase names become uppercase.

How to generate help text for a MATLAB classdef file?

Class help describes construction syntax in the main class help block, followed by CLASSNAME functions: and CLASSNAME properties: listings of every public member. Each public property also gets a postfix comment, and public methods get full function help while private methods get H1 lines only.

Does the skill use the MATLAB arguments block to build syntax documentation?

Yes, it reads the arguments block to classify inputs as required positional (no default), optional positional (has a default), or name-value (dot-prefixed). It then generates one syntax paragraph per layer, starting with required arguments only.

What MATLAB version is required to use this help writing skill?

The skill requires MATLAB R2021a or later, as declared in its manifest. It also uses the MATLAB MCP Server's evaluate_matlab_code tool to resolve file paths via the which command when a name is given instead of a path.

When should I not use this MATLAB help generation skill?

Do not use it for general documentation, README files, code generation, non-MATLAB languages, or Live Script markup. It only produces help comments for M-files containing functions, classes, or scripts.