← Back to Skills Marketplace
mutour

markdown-to-html

by King · GitHub ↗ · v0.5.0 · MIT-0
cross-platform ✓ Security Clean
164
Downloads
1
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install kip2-markdown-to-html
Description
Convert a Markdown file or raw Markdown string into a polished HTML document. Supports custom Pandoc HTML templates, custom CSS, and includes built-in HTML t...
README (SKILL.md)

Markdown To HTML

Use this skill when the user wants a Markdown file or Markdown string converted into a polished HTML page.

What this skill provides

  • Deterministic conversion through pandoc
  • Input from either a Markdown file or a raw Markdown string
  • Custom HTML template support through --template /path/to/template.html
  • Custom CSS support through --css /path/to/file.css
  • Built-in HTML themes in assets/templates/ and assets/styles/
  • Optional table of contents, numbered headings, metadata, and embedded assets

Quick workflow

  1. Choose the input source. File input: pass --input-file /abs/path/file.md Raw string input: pass --markdown '...'
  2. Choose a layout. Use --template for a fully custom Pandoc HTML template. Otherwise use --builtin-template.
  3. Optionally add one or more CSS files with --css.
  4. Set output with --output /abs/path/output.html.
  5. Optional layout flags: Use --toc to render a table of contents panel. Use --no-body-background to remove the article card background, border, and shadow.

Built-in templates

  • docs-slate: technical docs layout with restrained slate tones
  • magazine-amber: editorial landing-page feel with warm contrast
  • product-midnight: dark product narrative with stronger gradients
  • serif-paper: print-inspired article layout

List them at runtime with:

python3 scripts/markdown_to_html.py --list-templates

Main command

python3 scripts/markdown_to_html.py \
  --input-file /abs/path/source.md \
  --output /abs/path/output.html \
  --builtin-template docs-slate \
  --toc \
  --number-sections \
  --embed-assets

Raw string example

python3 scripts/markdown_to_html.py \
  --markdown '# Release Notes\
\
- Added HTML export\
- Added built-in themes' \
  --output /abs/path/release.html \
  --builtin-template magazine-amber \
  --title 'Release Notes'

Template rules

  • --template overrides --builtin-template
  • Built-in templates automatically include their matching built-in CSS
  • Extra --css files are appended after the built-in CSS, so local overrides win
  • --number-sections enables Pandoc heading numbering in the generated HTML
  • When --number-sections is enabled, avoid manually writing heading prefixes like 1., 2.1, or 3.2 inside the Markdown heading text, or the output will show duplicated numbering such as 1.2.1 2.1 Title
  • When --toc is omitted, the built-in templates render only the article body and expand it to the full content width
  • --no-body-background removes the article panel background, border, and shadow while keeping the overall page theme

Bundled files

  • Converter: scripts/markdown_to_html.py
  • Built-in templates: assets/templates/*.html
  • Built-in CSS themes: assets/styles/*.css

Notes

  • This skill expects pandoc to be installed and available on PATH
  • Custom templates should be valid Pandoc HTML templates and include $body$
  • If you want a table of contents without visible heading numbers in the HTML body, use --toc without --number-sections
Usage Guidance
This skill appears to do exactly what it says. Before installing/using: ensure pandoc is installed on the host (the script will fail otherwise), and be aware that the script will write the specified output path and create parent directories if needed. Review any custom templates or CSS you pass in to make sure they don't reference remote resources you don't want embedded or fetched. When using raw Markdown input the script writes a temporary file (deleted afterwards). The script invokes pandoc as a subprocess (no shell interpolation), which is normal — if you run untrusted Markdown or templates, consider running in a restricted environment.
Capability Analysis
Type: OpenClaw Skill Name: kip2-markdown-to-html Version: 0.5.0 The skill is a legitimate utility for converting Markdown to HTML using Pandoc. The core logic in scripts/markdown_to_html.py securely handles command execution by passing arguments as a list to subprocess.run, effectively preventing shell injection. No indicators of data exfiltration, malicious intent, or prompt injection were found in the code or documentation.
Capability Assessment
Purpose & Capability
Name/description match the implementation: the code and SKILL.md both implement a pandoc-based Markdown→HTML converter with built-in templates and optional custom templates/CSS. There are no unrelated environment variables, binaries, or config paths requested.
Instruction Scope
SKILL.md instructs the agent to run the included Python script which constructs and runs a pandoc command. All inputs and outputs are local file paths or a raw Markdown string. The instructions and code do not reference external endpoints, unrelated system files, or broad data collection. The script only reads provided files (input, template, css, metadata) and writes the specified output.
Install Mechanism
No install spec is provided (instruction-only + bundled script). Nothing is downloaded or extracted. The only external dependency is the expectation that the pandoc binary is installed and on PATH; that is reasonable and explicitly documented.
Credentials
The skill requires no environment variables, credentials, or config paths. The resources it accesses (input file, templates, CSS, optional metadata) are proportional to its purpose.
Persistence & Privilege
always is false and the skill does not request system-wide persistence or modify other skills. It creates a temporary file when converting raw Markdown and removes it; it creates the output directory if needed (typical behavior).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kip2-markdown-to-html
  3. After installation, invoke the skill by name or use /kip2-markdown-to-html
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.5.0
- Added --no-body-background flag to remove the article card background, border, and shadow from output HTML. - Updated SKILL.md with expanded usage instructions and detailed template/layout behavior, including guidance for --toc and --number-sections. - Clarified section-numbering rules to prevent duplicate headings when using numbered sections. - Improved instructions and documentation for layout flags and appearance control. - Removed unused agents/openai.yaml file.
v0.4.0
- No user-facing changes found in this version. - Internal file scripts/markdown_to_html.py was modified.
v0.3.0
- Updated raw string example in documentation from Chinese to English for broader accessibility. - No functional or command-line changes; documentation is now easier to understand for English-speaking users.
v0.2.0
- Updated all usage and workflow command examples to use shorter, more portable paths (e.g. python3 scripts/markdown_to_html.py). - No changes to functionality or features; documentation now easier to follow and apply.
v0.1.0
Initial release of markdown-to-html skill. - Converts Markdown files or raw Markdown strings into polished HTML using Pandoc. - Supports custom HTML templates, built-in HTML themes, and adding custom CSS. - Includes technical, editorial, dark product, and print-inspired built-in templates. - Output is a standalone HTML document; optional features include table of contents, numbered sections, embedded assets, and metadata. - Flexible input methods and simple CLI workflow provided.
Metadata
Slug kip2-markdown-to-html
Version 0.5.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 5
Frequently Asked Questions

What is markdown-to-html?

Convert a Markdown file or raw Markdown string into a polished HTML document. Supports custom Pandoc HTML templates, custom CSS, and includes built-in HTML t... It is an AI Agent Skill for Claude Code / OpenClaw, with 164 downloads so far.

How do I install markdown-to-html?

Run "/install kip2-markdown-to-html" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is markdown-to-html free?

Yes, markdown-to-html is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does markdown-to-html support?

markdown-to-html is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created markdown-to-html?

It is built and maintained by King (@mutour); the current version is v0.5.0.

💬 Comments