Agent skill
markdown-to-standalone-html
Convert Markdown documents (*.md files) to self-contained HTML files with embedded images. Use when you need a portable, offline-friendly single HTML file from Markdown—ideal for blog posts, essays, reports, or any content that should work without external dependencies.
Install this agent skill to your Project
npx add-skill https://github.com/jonmagic/skills/tree/main/skills/markdown-to-standalone-html
SKILL.md
Markdown → Standalone HTML (Embedded Images)
Overview
Convert any Markdown file into a single self-contained HTML document with all images embedded as base64 data URIs. No external hosting required—the output is a single .html file that works offline.
Requirements
pandoc— Markdown → HTML conversionruby— Script execution
Both must be on your PATH. The script checks and exits with a clear error if missing.
Workflow
- Prepare your Markdown — Any
.mdfile with images (local paths or public URLs) - Run the conversion script with the Markdown file, title, and output path
- Resolve images — If images can't be found locally, you'll be prompted for a file path or URL
- Get your HTML — A single
.htmlfile with all images embedded, ready to share
Image Resolution
For each image in your Markdown:
- Relative path — Resolved relative to the Markdown file's directory
- Absolute path — Used as-is if it exists
- Public URL (
http://orhttps://) — Downloaded to temp directory, embedded, then cleaned up - Unresolved — You're prompted to provide a local file path or URL
All images in the final HTML are base64-encoded and embedded directly—no external dependencies.
Limitations
- Only rewrites
<img src="">tags (not CSSbackground-imageURLs) - Does not guess missing images; prompts interactively instead
- Untrusted SVG can contain scripts—review embedded SVG carefully
Script Reference
Script: scripts/markdown_to_standalone_html.rb
Usage:
ruby .github/skills/markdown-to-standalone-html/scripts/markdown_to_standalone_html.rb \
/path/to/post.md \
--title "Your Post Title" \
--template .github/skills/markdown-to-standalone-html/assets/template.html \
--out /path/to/output.html
Arguments:
markdown— Path to your Markdown file (required)--title— Title for the HTML document (required; displayed in browser tab and header)--template— Path to the HTML template (required; use the providedassets/template.html)--out— Path where the final HTML will be written (required)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
brain-operating-system
Quick reference for operating within jonmagic's second-brain workspace. Use when working with files in the brain repository—provides directory structure, naming conventions, append-only norms, wikilink patterns, frontmatter requirements, project conventions, and file organization rules. Essential for understanding where to create files, how to name them, and how to maintain continuity with existing structures.
semantic-commit
Generate semantic commit messages from staged changes. Use when committing code to produce consistent, well-structured commit messages following conventional commit format.
archive-meeting
Archive one or more meetings into the brain repo by importing Zoom transcript folders (~/Documents/Zoom/*) and/or downloaded Teams .vtt files (~/Downloads/*.vtt), then generating a transcript markdown file, an executive summary, and creating meeting notes. Use when the user says "archive meeting", "archive my last meeting", "process these transcripts", or similar.
brain-commit
Analyze changes in the Brain repo and create semantic commits. Use when the user wants to commit their brain changes with meaningful, organized commit messages. Analyzes staged/unstaged changes, groups related files, creates appropriate commits, and pushes without user interaction.
session-to-brain
Archive a Copilot CLI session to the brain. Creates a daily project file with the session transcript and adds a resume link to the weekly note. Use when ending a significant work session to preserve context for future reference.
create-bookmark
Save a URL as a bookmark with frontmatter and a blurb or AI summary. Use when the user says "bookmark this", "save this link", or shares a URL they want to remember.
Didn't find tool you were looking for?