Markdown Converter
Agent skill for markdown-converter
Expert in email content extraction and analysis. **Use whenever the user mentions .eml files, email messages, says "Extract email information", "Using the email information", or requests to extract, parse, analyze, or process email files.** Handles email thread parsing, attachment extraction, and converting emails to structured markdown format for AI processing. (project, gitignored)
Loading actions...
You are an expert in extracting and analyzing email content from .eml files, converting them to AI-friendly markdown format with proper thread handling and attachment extraction.
YOU MUST ALWAYS use absolute/full paths when working with .eml files.
✅ CORRECT:
~/.claude/skills/email-extractor/scripts/email-extractor extract /Users/sebastien.morand/Downloads/message.eml
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/email.eml -o ~/Documents/extracted
❌ INCORRECT:
~/.claude/skills/email-extractor/scripts/email-extractor extract message.eml
~/.claude/skills/email-extractor/scripts/email-extractor extract ./message.eml
Why: Always use full absolute paths or paths starting with ~/ for the input .eml file to ensure reliable file access.
Binary Location: ~/.claude/skills/email-extractor/scripts/email-extractor
# Basic extraction (creates folder in .eml's directory)
~/.claude/skills/email-extractor/scripts/email-extractor extract /path/to/message.eml
# Extract to specific output directory
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/email.eml -o ~/Documents/extracted
# Get help on available commands
~/.claude/skills/email-extractor/scripts/email-extractor --help
~/.claude/skills/email-extractor/scripts/email-extractor extract --help
When no output directory specified:
/path/to/message.eml/path/to/message_email/ (same directory as .eml)When custom output directory specified:
/path/to/message.eml/target//target/message_email/ (sanitized subject or filename appended)Examples:
# Extract ~/Downloads/original_msg.eml → Output: ~/Downloads/original_msg_email/
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/original_msg.eml
# Extract to custom location → Output: ~/Documents/extracted/
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/original_msg.eml -o ~/Documents/extracted
Every extraction creates:
email_name/
├── email.md # Email content with thread structure
└── attachments/ # Folder containing all attachments (if any)
├── document.pdf
├── image.png
└── ...
# Extract email
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/message.eml
# Read content
cat ~/Downloads/message_email/email.md
ls ~/Downloads/message_email/attachments/
Process: Extract → Read email.md → Review attachments → Analyze content and thread structure
When user says "We have an email" with a subject/title, emails are in ~/Downloads/ as .eml files:
# Search for .eml files
find ~/Downloads -name "*.eml" -type f
# Extract the matching email
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/found_email.eml
# Process all .eml files in directory
for eml in ~/Downloads/*.eml; do
~/.claude/skills/email-extractor/scripts/email-extractor extract "$eml"
done
# Extract to specific output directory
~/.claude/skills/email-extractor/scripts/email-extractor extract ~/Downloads/temp.eml -o /tmp/email-analysis
The generated email.md file includes:
Emails are organized respecting the conversation thread:
# Email: [Subject]
## Metadata
- **From:** John Doe <[email protected]>
- **To:** Jane Smith <[email protected]>
- **Date:** 2024-11-11 10:30:00
- **Subject:** Project Update
## Attachments
- document.pdf (attachments/document.pdf)
- image.png (attachments/image.png)
---
## Message Thread
### Latest Message (2024-11-11 10:30)
**From:** John Doe
[Message content]
---
### Previous Message (2024-11-10 15:20)
**From:** Jane Smith
[Message content]
The email-extractor is a compiled Go binary that:
~/.claude/skills/email-extractor/scripts/email-extractor extract <input_eml> [flags]
Command: extract
<input_eml> (required): Full path to .eml file-o, --output (optional): Output directory path-h, --help: Show help for extract commandGlobal Commands:
--help: Show all available commands and global optionsversion: Show binary version informationThe binary is already compiled and located in:
~/.claude/skills/email-extractor/scripts/email-extractor
To rebuild from source (if needed), see the CLAUDE.md file in this skill directory.
When helping with email extraction:
Performance:
When to use default path: Single emails, permanent archives, files organized alongside .eml files
When to use -o flag: Multiple extractions, analysis projects, separating source and processed files, organizing output in specific directories
"Email file not found":
ls -lh /path/to/file.eml
find ~/Downloads -name "*.eml" -type f
"Cannot decode email":
ls -lh file.emlBinary permission issues:
# Make binary executable if needed
chmod +x ~/.claude/skills/email-extractor/scripts/email-extractor
# Verify binary works
~/.claude/skills/email-extractor/scripts/email-extractor --help
This skill integrates with the topic-manager skill:
Trigger Keywords:
Workflow when updating topics with email information:
google-drive-managerpdf-extractor for PDFs and presentationsspeech-to-text for audio/video filesExample Flow:
User: "Update topic 'Q2 Planning' using the email information"
Assistant Process:
1. Search ~/Downloads for .eml file matching "Q2 Planning"
2. Run: email-extractor extract ~/Downloads/q2_planning.eml
3. Review email.md and attachments
4. Upload email.md to topic's Emails folder
5. Process any attachments (extract PDFs, etc.)
6. Update topic with extracted information