cmd-email-md
Convert markdown to email-safe HTML with inline styles and cross-client compatibility.
Skill by Olshansk
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/olshansk-cmd-email-md
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, frontend, writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cmd-email-md
What's inside
- Skill name
cmd-email-md- Description
- Convert markdown to email-safe HTML with inline styles and cross-client compatibility. Use when writing newsletters, transactional emails, or any HTML email from markdown source.
- License
- MIT
- Instructions
- 149 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- email-components.md · references/
- email-html-compatibility.md · references/
SKILL.md (first lines)
# Markdown to Email HTML
Convert markdown into a complete, self-contained HTML email with inline CSS, table-based layout, and cross-client compatibility (Gmail, Outlook, Apple Mail).
## Workflow
### 1. Determine input
- If the user provided a file path, read the `.md` file
- If the user provided inline markdown, use that directly
- If neither, ask: "Which markdown file should I convert, or paste the content?"
### 2. Parse frontmatter
Extract YAML frontmatter from the top of the markdown. All fields are optional — use defaults for anything missing.
| Field | Default | Description |
|---|---|---|
| `preheader` | (none) | Hidden inbox preview text |
| `brand-color` | `#2563eb` | Primary accent (links, buttons, highlights) |
| `heading-color` | `#1a1a1a` | h1-h3 color |
| `body-color` | `#333333` | Body text color |
| `background-color` | `#f4f4f4` | Outer background |
| `content-background` | `#ffffff` | Inner content area |
| `font-family` | `Arial, Helvetica, sans-serif` | Safe font stack |
| `font-size` | `16px` | Base body size |
| `line-height` | `26px` | Body line height (must be px for Outlook) |
| `content-width` | `600px` | Max content width |
| `header-logo` | (none) | URL to logo image |
| `footer-text` | (none) | Footer text (unsubscribe, address, etc.) |
### 3. Load references
Read the following files for technical rules and component templates:
- `references/email-html-compatibility.md` — cross-client rules, document structure, quirks
- `references/email-components.md` — HTML snippets with `{{variable}}` placeholders
### 4. Convert markdown to email HTML
Walk through the markdown content and generate email-safe HTML:
- Use the **Complete Wrapper** template as the outer structure
- Map each markdown element to its corresponding component template
- Replace all `{{variable}}` placeholders with frontmatter values (or defaults)
- Apply **all CSS inline** — no `<style>` blocks in `<body>`
- Use **tables for layout** — never `<div>` for structure
- Include Outlook conditional comments for `max-width` fix
- Include preheader `<div>` if `preheader` is set
- Include header with logo if `header-logo` is set
- Include footer if `footer-text` is set
**Markdown element mapping:**
| Markdown | Email component |
|---|---|
| `# Heading` | Heading (h1-h4) with size per level |
| Paragraph | Paragraph with inline styles |
| `**bold**`, `*italic*`, `~~strike~~` | Inline `<strong>`, `<em>`, `<del>` |
| `[text](url)` | Styled `<a>` with brand-color |
| `- item` / `1. item` | Unordered/Ordered list |
| `- [ ] task` | Task list with Unicode checkboxes |
| `` `code` `` | Inline code |
| ` ```code block``` ` | Code block (dark theme) |
| `> quote` | Blockquote with left border |
| `` | Image with explicit dimensions |
| `---` | Horizontal rule |
| `==highlight==` | `<mark>` with background color |
**Special directives** (fenced with `:::`):
| Directive | Behavior |
|---|---|
| `:::hero` | Full-width section with brand-color background, white text |
| `:::callout[type]` | Highlighted box — type: `info`, `tip`, `warning`, `danger` |
| `:::button[text](url)` | CTA button with VML fallback |
| `:::button.secondary[text](url)` | Secondary button variant |
| `:::centered` | Center-aligned text block |
| `:::footer` | Footer section (overrides `footer-text` frontmatter) |
### 5. Write output
- If input was a file (e.g., `newsletter.md`), write to `newsletter.html` in the same directory
- If input was inline, ask the user for an output path
- The output must be a complete, self-contained HTML document — ready to paste into any email sending tool
### 6. Summary
Report:
- Output file path
- Theme values applied (brand color, font, content width)
- Any warnings (e.g., unsupported markdown features skipped, images without dimensions)
## Constraints
- **No `<style>` in `<body>`** — Gmail strips it. Only allowed in `<head>` for responsive media queries.
- **No flexbox, grid, or CSS variables** — not supported in email clients
- **No `<button>` elements** — use `<a>` tags styled as buttons
- **No JavaScript** — always blocked
- **No external CSS** — everything inline
- **Tables for layout** — `<div>` only for non-structural content (e.g., preheader hiding)
- **px units only** — no `rem`, `em`, `vh`, `vw`, or `calc()`
- **Explicit dimensions on images** — always set `width` and `height`
- **Absolute URLs** — all `src` and `href` must be fully qualified
## Example Input
```markdown
---
preheader: "Your weekly update is here"
brand-color: "#6366f1"
header-logo: "https://example.com/logo.png"
footer-text: "Acme Inc. | 123 Main St | [Unsubscribe](https://example.com/unsub)"
---
:::hero
# Welcome to the Weekly Update
Everything you need to know, in one email.
:::From Olshansk/agent-skills, MIT.
More from Olshansk/agent-skills
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.543score
cmd-mermaid-render
Olshansk
Render and display Mermaid diagrams inline in iTerm2 or Ghostty.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9 - 0.535score
cmd-done-check
Olshansk
Ask the agent whether it finished everything or has more to do — a lightweight completeness gate for the end of any task
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-agent-persona-set
Olshansk
Prime the agent with a behavioral persona for the conversation
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-conflict-resolver
Olshansk
Resolve merge conflicts systematically with context-aware 3-tier classification and escalation protocol
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-description
Olshansk
Generate a PR title and description, then commit, create/update the PR on approval
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-edgecase
Olshansk
Review branch changes for test gaps, logic edge cases, failure modes, and integration risks
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-docs-idiot-proof
Olshansk
Simplify documentation for clarity and scannability with approval-gated edits
SkillCFreshness: C★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 1, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Olshansk/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Olshansk
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.543score
cmd-mermaid-render
Olshansk
Render and display Mermaid diagrams inline in iTerm2 or Ghostty.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9
Cite this page
cmd-email-md skill. Agent Mart. https://agentmart.dev/skills/olshansk-cmd-email-md (last updated 2026-10-24)