| name | wolfram-paclet |
| description | Author a Wolfram Paclet Repository paclet's definition notebook (ResourceDefinition.nb) as a literate-markdown document and build it with MarkdownToNotebook. Use this whenever the user wants to create, write, or publish a Wolfram Language paclet, a Paclet Repository resource, or a paclet ResourceDefinition - including its metadata, usage, examples, and hero image. Pair it with the Symbol, Guide, and TechNote skills, which author the paclet's documentation pages. |
Authoring a paclet definition in markdown
A paclet's ResourceDefinition.nb is the Paclet Repository's deployable definition
notebook. MarkdownToNotebook fills it from a literate-markdown document with the
Paclet template. The worked example is the AccessibleColors paclet definition at
https://github.com/sw1sh/AccessibleColors/blob/main/ResourceDefinition.md ; model
new paclets on it and read
https://github.com/WolframInstitute/MarkdownToNotebook/blob/main/docs/resource-notebooks.md
and https://github.com/WolframInstitute/MarkdownToNotebook/blob/main/docs/resource-guidelines.md
for the slot mapping and Paclet Repository rules.
A paclet is more than this one notebook: it also has documentation pages (guide,
symbol reference pages, tech notes) and a PacletInfo.wl. Author the pages with the
wolfram-guide-page, wolfram-symbol-page, and wolfram-tech-note skills; the
metadata here must agree with PacletInfo.wl.
Read first - the canonical guidelines:
Frontmatter
---
Template: Paclet
ResourceType: Paclet
Name: Publisher/PacletName
Context: Publisher`PacletName`
Paclet: Publisher/PacletName
Description: WCAG color-contrast and accessibility utilities for the Wolfram Language
ContributedBy: Author Name
Keywords: [keyword one, keyword two]
MainGuide: Documentation/English/Guides/PacletName.nb
License: MIT
WolframVersion: 14.0+
Categories: [Visualization & Graphics]
Disclosures: [LocalFiles, ExternalServices]
Sources: ["A bibliographic citation"]
SourceControlURL: https://github.com/you/PacletName
Links: ["[label](https://example.com)"]
---
Notes that bite (see
https://github.com/WolframInstitute/MarkdownToNotebook/blob/main/docs/subtleties.md):
Name/Paclet include the publisher
ID (Publisher/PacletName); MainGuide is the relative notebook path, not a
bare name; Description must match PacletInfo.wl's "Description" exactly; each
Sources entry is one citation (commas inside it are preserved). Categories fills
a fixed checkbox group, so always set it to one or more valid Paclet Repository
categories (do not invent names) - an empty group is a submission hint. The
valid set is exactly these 23 (from ResourceSystemClientPrivateresourceSortingProperties["Paclet"]["Categories"]):
Cloud & Deployment, Core Language & Structure, Data Manipulation & Analysis,
Engineering Data & Computation, External Interfaces & Connections,
Financial Data & Computation, Geographic Data & Computation, Geometry,
Graphs & Networks, Higher Mathematical Computation, Images,
Knowledge Representation & Natural Language, Machine Learning,
Notebook Documents & Presentation, Scientific and Medical Data & Computation,
Social, Cultural & Linguistic Data, Sound & Video, Strings & Text,
Symbolic & Numeric Computation, System Operation & Setup,
Time-Related Computation, User Interface Construction, Visualization & Graphics.
Disclosures toggles the standalone disclosure checkboxes in the Paclet template's
Disclosures section. Each name is independent (unlike Categories these are
nine separate checkboxes, not one CheckboxesCell). Only set the ones whose trigger
your paclet actually meets - the submission reviewer reads them. Valid set
(from the Paclet template's CheckboxBox {False, name} tags):
LocalFiles - creates / deletes / modifies / imports local files (the loader's own IO is excepted).
ExternalServices - calls non-Wolfram network services (REST APIs, web scraping, sockets, ...).
LocalSystemInteractions - shells out to external processes, reads the clipboard, controls another app, accesses sensors.
OSConfiguration - mutates OS-level settings (environment variables, scheduled tasks, registry, ...).
PacletDependencies - depends on other paclets being installed.
WLSystemConfiguration - mutates the kernel environment: $ContextPath, $Path, persistent values, persistent objects, ...
WLSystemSymbols - defines or Sets values on System` symbols (or another paclet's context).
WolframAccount - uses Wolfram ID, the user's cloud account / cloud objects, Wolfram credits, scheduled cloud tasks, WolframAlpha calls.
Other - any disclosure not covered above (describe it in the section's text area).
Sections
## Details & Options - bullets become Notes cells; pipe tables become grids.
## Usage - the symbols the paclet provides, as <code>[Range]()</code>
inferred reference links (the <code> wrapper applies code styling, the empty
parens make markdown viewers render it as a clickable link).
- Example sections (
## Basic Examples, ## Scope, ## Applications, ...) -
follow the example-authoring rule in docs/examples.md
(one demonstration per cell, one-sentence :-terminated caption,
--- between siblings).
## Hero Image - the landing-page image. Its first executable cell is evaluated;
show the image and keep the generating code in a closed group (the converter uses
the Cell[CellGroupData[{input, output}, {2}]] idiom). The scraped image must be
400-1500 px on each side with aspect ratio h/w in 0.5-1.25, or the build flags
HeroImageTooSmall/TooLarge/Squashed.
## Author Notes - optional prose, fills the Author Information panel.
Required when the paclet was drafted with help from an AI assistant:
identify the model, the human supervisor, and which parts are model-
generated vs hand-edited. See the AI-assisted authoring
disclosure
section of the resource guidelines for the minimum-bar template.
Code-cell options
#| lines at the top of a fenced wl cell: eval, file, screenshot, tear,
flag, boxes (one key: value per line). #| boxes: true reads the body as
a literal box expression (RowBox, GridBox, TemplateBox, TooltipBox, ...)
and splices it into a Cell[BoxData[…], "Input"] unchanged - useful for showing
a hand-built box decoration without round-tripping through evaluation.
Inline math is $...$; to link a documented symbol inline, wrap an inferred ref
in <code>: <code>[Range]()</code>.
Build and deploy
(* MarkdownToNotebook is not on the public Function Repository yet, so use
its public cloud deployment *)
mtn = ResourceFunction[ResourceObject["https://www.wolframcloud.com/obj/nikm/DeployedResources/Function/MarkdownToNotebook"]];
mtn["ResourceDefinition.md", "ResourceDefinition.nb"]
Build the documentation pages with DocumentationBuild (the Symbol/Guide/TechNote
notebooks the other skills produce). Deploy the paclet definition by scraping it
into a ResourceObject and CloudDeploy-ing it (a headless DeployResource
scrapes empty - see
https://github.com/WolframInstitute/MarkdownToNotebook/blob/main/docs/subtleties.md); submit
with ResourceSubmit. Run
DefinitionNotebookClientCheckDefinitionNotebook[nbo]` and clear its hints first.
Check
Before submission, run the docked Check button (top of every resource
definition notebook) - it lints the document against the submission
guidelines and reports hints by level. Headless, the same lint runs through
DefinitionNotebookClientCheckDefinitionNotebook[nbo]` after stamping
CellIDs and saving (the headless build does not assign CellIDs, and the
scraper needs them to locate cells):
Needs["DefinitionNotebookClient`"]
UsingFrontEnd @ Block[{nbo = NotebookOpen[File["MyResource.nb"]]},
CurrentValue[nbo, CreateCellID] = True;
SelectionMove[nbo, All, Notebook];
FrontEndTokenExecute[nbo, "Save"];
Normal @ DefinitionNotebookClient`CheckDefinitionNotebook[nbo]
]
Each row is <|"Level" -> ..., "Tag" -> ..., "Parameters" -> ...|> with
Level one of Suggestion / Warning / Error. Common tags to address
before submission: DescriptionTooLong (shorten to under 128 chars),
ExampleTextLastCharacter (end an example caption with :),
FoundUnformattedCode (wrap a stray WL symbol in `backticks` or in
an inferred link with empty parens like [Range]() (substitute the actual symbol name for Range), ThreeDotEllipsis (use … not ...),
NotASystemSymbol (link foreign function-repo names instead of formatting
them as system symbols), LargeCellBounds/CellHeight (rasterized output too
big - crop it with #| tear: h or shrink the source). The repo's
check.wls runs the same lint on every built .nb and prints a per-file
summary.