marktodocx-skill
Installation
SKILL.md
marktodocx-skill
Convert Markdown into DOCX using the shared Node runtime family in this repository.
Invocation
- If the user provides a Markdown file path, treat
$0asinputPathand$1as the optionaloutputPath. - If the user provides Markdown content instead of a file path, call the runtime programmatically with
markdownand a suitablebaseDir. - If the user wants style customization, map their request into
stylePreset,marginPreset,styleJson, orstyleSet.
Execution Rules
- Prefer the shared agent wrapper in skill.mjs, specifically
convertWithAgentSkill(). Do not create a second conversion path. - Require exactly one input source: either
inputPathor inlinemarkdown. - Resolve style options through the wrapper so explicit parameters override environment defaults in the same way as the CLI.
- Preserve local image behavior by using the Markdown file directory for
inputPath, or an explicitbaseDirfor inline Markdown. - If the document contains Mermaid and
@marktodocx/runtime-node-mermaidis unavailable, fail clearly instead of silently degrading. - Report the output file path after a successful conversion.