matlab-write-help
Generate or improve MATLAB help text (documentation comments) for a function, class, or script file following MathWorks standards (H1 line, syntax paragraphs, See Also, 75-char lines).
Install / Use
npx skills add matlab/matlab-agentic-toolkit --skill matlab-write-helpInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Content & MediaSupported Platforms
Our assessment of matlab-write-help
matlab-write-help scores 93/100 on our quality scale, 233rd of 1,199 Content & Media skills we index (top 20%).
Its SKILL.md is 17 KB long, well organised into 21 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 18 days ago, so matlab-write-help is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
matlab-write-help compared with similar skills
All 4 of these similar skills score higher than matlab-write-help; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-write-help (this skill)by matlab | 93 | 1.1k | 18d ago | SKILL.md |
| siyuanby siyuan-note | 100 | 46.6k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install matlab-write-help?
- Run
npx skills add matlab/matlab-agentic-toolkit --skill matlab-write-help. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-write-help work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is matlab-write-help safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-write-help still maintained?
- The repository was last updated 18 days ago, so matlab-write-help is actively maintained.
Skill content
View source on GitHubname: matlab-write-help description: "Generate or improve MATLAB help text (documentation comments) for a function, class, or script file following MathWorks standards (H1 line, syntax paragraphs, See Also, 75-char lines). Read BEFORE writing MATLAB help โ default patterns (Inputs:/Outputs: lists, block comments, uppercase See Also) produce non-conforming output. Use when writing, rewriting, fixing, or reviewing MATLAB help comments or function documentation." license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md argument-hint: "[name-or-path]" arguments: [file] allowed-tools: Read() Edit() Bash(matlab ) mcp__matlab__evaluate_matlab_code() metadata: author: MathWorks version: "1.1"
When to Use
- Writing help text for a new MATLAB function, class, or script
- Rewriting or improving existing help text that is incomplete or non-conforming
- Reviewing help text for standards compliance
- Adding help to methods in a classdef file
- Generating property comments for a class
When NOT to Use
- Writing general documentation or README files (not help comments)
- Generating code โ this skill only produces help text
- Working with non-MATLAB languages
- Writing MATLAB Live Script markup (use plain-text-live-code guidelines instead)
Task
Resolve $file to an M-file path and generate complete, standards-compliant MATLAB help text for it. If the file already has help text, improve it to meet the standards below. Present the proposed help text to the user for review before modifying the file.
Standards for MATLAB Help Text
All rules below are mandatory. Violating any of them produces non-conforming help.
General Rules
-
Help begins on line 2 (after
functionorclassdefline) for functions/classes -
Help begins on line 1 for scripts or built-in sidecar files
-
Help comments must match the indentation of the body code. Look at the first non-comment content after the help block to determine the indentation level:
- For
classdeffiles: the body isproperties/methodsblocks, which are always indented 4 spaces โ class help at 4 spaces - For
functionfiles: look at the first executable statement. If at column 1, help at column 1; if at 4 spaces, help at 4 spaces. Example at 4-space indent:function result = myFunc(x) %myFunc - Brief description % RESULT = myFunc(X) does something with X. result = x + 1; end - For inline methods in classdef: if body is at 12 spaces, help at 12 spaces Both styles are valid for top-level functions โ match whichever one the file already uses. Do NOT change the file's indentation style
- For
-
No comment line may exceed 75 characters measured from the
%onward (i.e., 75 characters of comment content including the%itself). If the%is indented, the total line width is indent + 75. Syntax lines are exempt (see below).Max column = indent + 75 (e.g., indent 12 โ max col 87). Count from the
%, not from column 1. -
No tabs โ spaces only
-
No trailing whitespace
-
No block comments (
%{ %}) โ only%line comments -
No hardcoded links to documentation or webpages
-
No
'href="matlab:'evaluation links
Section Order
- H1 Line
- Release Compatibility (if applicable)
- Syntax Paragraphs
- Example (optional)
- See Also line
- Note (optional)
A blank line (no %) separates help from the copyright line.
Help Casing
When function or class names appear in help text (H1 lines, syntax
paragraphs, prose references, and See Also lines), they use help
casing to distinguish them from ordinary words. The help command
renders help-cased names as bold or hyperlinks.
Rules:
- Names that are entirely lowercase letters [a-z] are uppercased
(e.g.,
sortโSORT,magicโMAGIC) - Names that start with an uppercase letter but the remaining letters
are all lowercase are also uppercased
(e.g.,
TableโTABLE,HandleโHANDLE) - Any other name (mixed case, digits, or underscores) keeps its exact
original casing โ do NOT uppercase it
(e.g.,
readTableโreadTable,XMLReaderโXMLReader,image_resizeโimage_resize,pdist2โpdist2)
H1 Line
%FUNCNAME - Brief description without a period
- Begins with
%immediately followed by the function name in help casing (no space after%) - Do NOT include namespace or class name
-(space-dash-space) separates the name from the description- Do NOT end with a period
- Description should be a brief summary of the function's purpose
Syntax Paragraphs
%FUNC - Brief description without a period
% B = FUNC(A,OPTION) does the thing with A using OPTION.
%
% B = FUNC(A,Name=VALUE) also specifies a name-value argument.
Note: no blank % line between the H1 and the first syntax paragraph.
-
One paragraph per syntax
-
Each paragraph begins with the syntax it describes followed by a lowercase verb โ the syntax reads as the subject of the sentence (e.g.,
% B = FUNC(A) does...not% B = FUNC(A) Returns...) -
Function name uses help casing
-
All lines indented with three spaces after
%(i.e.,%) -
No blank
%line before the first syntax paragraph -
A blank
%line separates each syntax paragraph -
Input ordering in syntax: Required โ Optional โ Name-Value
-
The first syntax paragraph describes all required inputs only
-
Each optional input gets its own syntax paragraph
-
The first syntax paragraph shows only the primary output. Additional outputs are introduced one at a time in later syntax paragraphs โ never jump from one output to all outputs at once. Each new output gets its own paragraph. This mirrors the input layering โ start simple, add complexity one piece at a time. Examples:
Two outputs โ one additional paragraph:
% IDX = FINDNEAREST(POINTS,TARGET) finds the nearest point. % % [IDX,DIST] = FINDNEAREST(...) also returns the distances.Three outputs โ two additional paragraphs (not one):
% SEGMENTS = segmentSignal(DATA,THRESHOLD) segments the signal. % % [SEGMENTS,BOUNDARIES] = segmentSignal(...) also returns the % boundary indices where segments split. % % [SEGMENTS,BOUNDARIES,LABELS] = segmentSignal(...) also returns % string labels for each segment. -
Use
...to abbreviate previously-described arguments when an optional applies to all prior syntaxes -
If a syntax exceeds 75 characters, the syntax itself is exempt from wrapping โ keep it on one line. The description text that follows wraps normally starting on the next line. To shorten long syntaxes:
- Abbreviate the LHS with
[...]when outputs were described in an earlier syntax (e.g.,[...] = func(...,Name=VAL)) - Abbreviate the RHS with
...for previously-described inputs - Both abbreviations can be combined
- Abbreviate the LHS with
Variable Naming in Syntaxes
- Inputs and outputs: use help casing
โ all-lowercase names become UPPERCASE; names with ANY uppercase
letter, digit, or underscore keep exact original casing
Examples:
dataโDATA,methodโMETHOD,resultโRESULT,depthโDEPTH,objโOBJ,tfโTFbutfilePathโfilePath,queryPointsโqueryPoints,startSampleโstartSample,maxMemoryโmaxMemory,otherBufferโotherBuffer(these contain uppercase letters, so they keep exact casing) - References to other functions in prose: use help casing โ never fully-qualified for same-folder functions
- Generic logical outputs: use
TF - Generic data: single uppercase letters (
A,B,X) - Command-form arguments: all UPPERCASE
Flag (Option String) Inputs
% B = SORT(A,DIRECTION) also specifies the sort direction. DIRECTION
% must be:
% "ascend" - (default) Sorts in ascending order.
% "descend" - Sorts in descending order.
- Flag name in UPPERCASE in the syntax
- Allowed values listed as double-quoted strings
- Values indented seven spaces after
%(i.e.,%) - Value separated from description by
-(space-dash-space) - Pad shorter values so dashes align vertically
- Indicate default with
(default)at start of description - Default value listed first
Name-Value Arguments
% B = FUNC(A,...,Name=VALUE) also specifies the thing.
- Written as
Name=VALUEwith the value in UPPERCASE - If the name-value has allowed values, list them using the same flag rules above
Example Section
% Example: Brief label describing the example
% x = func(input1,input2);
% disp(x)
- Only include an example if it helps illustrate non-obvious syntax usage
- Preceded by a blank
%line - Heading:
% Example:(or% Example: label) - Code indented seven spaces after
%(i.e.,%) - No control flow (
for,if,while) - Must run when copied to Command Window
- No more than 10 lines of code per example
- Separate multiple examples with a blank
%line - Do NOT number examples โ use text labels on the heading line
- Use inline
% commentsto annotate code, not prose between lines
See Also Line
%
% See also readtable, griddedInterpolant, pdist2
- Preceded by a blank
%line - Begins with
% See also(three-space indent) - Names use their original case-correct spelling as they appear on
the MATLAB path (e.g.,
readtable,griddedInterpolant,pdist2) โ do NOT apply help casing to See Also names - Use the shortest name that resolves. Functions on the MATLAB path
without packages can use bare names. Functions in OTHER packages
MUST be fully qualified (e.g.,
pkg.subpkg.funcName). Functions in the SAME folder (same package level) use bare names โ they resolve relative to each other - Do NOT reference private methods or private functions โ they cannot
be reached via
helpwithout full qualification, and even then only from within the class. In@classfolders, any file that is not the class constructor is a method; check its Access before referencing it - Methods in
@classfolders SHOULD have a See Also line referencing the class itself and relevant public methods or properties of the class, using unqualified names (e.g.,ClassName,methodName,propertyName). Do NOT reference other private methods - Separated by comma and space
- NOT terminated with a period
- Between 2 and 7 items
- Do NOT include descriptions โ just names
- If the line exceeds 75 characters, wrap at a comma boundary:
% See also readtable, readtimetable, % griddedInterpolant, scatteredInterpolant
Note Section
%
% Note: FUNC is in the Signal Processing Toolbox
- Preceded by a blank
%line - Begins with
% Note: - Functions use their H1 casing
- Products use full names
- NOT terminated with a period
Copyright Line
A copyright line is specifically a comment that matches:
% Copyright YYYY
where the line starts with % followed by spaces, then the whole word
Copyright, then a four-digit year or year range (e.g.,2024 or
2020-2025). Other comments that merely contain the word "copyright" as
part of a function name or description are NOT copyright lines.
- The copyright is NOT part of the help text
- If a copyright comment exists in the file, ensure it appears after the
help block, separated by a blank line (no
%โ just a newline) - This blank line terminates the help block; MATLAB's
helpcommand stops reading at the first non-comment line - The copyright line must be indented to match the help comments above it
- Do not add, remove, or modify the copyright โ only move it if needed
Class Help
For classdef files:
- Main class help describes construction (do NOT write separate constructor help)
- Construction syntax paragraphs follow the same required/optional rules: the first syntax shows required args only; each optional gets its own paragraph
Truncated for display โ read the full file on GitHub.
Related Skills
siyuan
46.6kAn open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together ๅผๆบใ้็งไผๅ ใ่ชๆ็ฎก็็ฅ่ฏๅทฅไฝ็ฉบ้ด๏ผ่ฎฉไบบไธๆบ่ฝไฝๅจๆญคๅไฝ
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way โ as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an emโฆ
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVGโฆ
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
