Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
EmailGen is a Dockerized framework for automating email account creation and testing across multiple email providers. Each provider runs in a Debian 13 Docker container with browser automation capabilities.
All 5 providers are fully implemented with Playwright-based browser automation:
All implemented providers include:
# Navigate to provider directory cd providers/<provider_name> # Copy and configure environment cp .env.example .env # Edit .env with required values # Build and run the container ./run.sh # Results appear in: # - artifacts/ directory (logs, screenshots) # - result.json (copied to provider root)
# Quick test without Docker (requires local Python environment) cd providers/<provider_name> pip3 install -r requirements.txt python3 main.py # Docker-based testing with environment override docker build -t test-provider . docker run --rm --env RUN_ID=test-123 -v "$(pwd)/artifacts:/app/artifacts" test-provider
All providers follow an identical directory structure and execution model:
main.py files produce a uniform result.json output formatartifacts/ directory.env files control runtime behavior (proxies, CAPTCHA API keys, run IDs)Every provider must output this standard format:
{ "provider": "string", "type": "personal|disposable|less_reliable", "account_identifier": "email@domain", "encountered": { "captcha": boolean, "sms_required": boolean, "payment_required": boolean }, "signup_duration_sec": number, "verification_received": boolean, "sending_supported": boolean, "errors": [], "notes": "string" }
All providers use Playwright for automation with this common setup:
The ProtonMail provider includes special CAPTCHA handling:
Standard across all providers:
RUN_ID: Unique identifier for tracking runsHTTP_PROXY/HTTPS_PROXY: Optional proxy configurationCAPTCHA_API_KEY: Third-party CAPTCHA solver credentialsProvider-specific variables should be documented in each provider's README.md.
# View container logs docker logs emailgen-<provider> # Interactive container shell docker run -it --entrypoint /bin/bash <image_tag> # Check artifacts without running full flow ls -la providers/<provider>/artifacts/ # Validate result.json format python3 -m json.tool providers/<provider>/result.json
from playwright.sync_api import sync_playwright import os def setup_browser(): playwright = sync_playwright().start() browser = playwright.chromium.launch( headless=os.getenv("HEADLESS", "true").lower() == "true", args=['--disable-blink-features=AutomationControlled'] # Stealth mode ) context = browser.new_context( viewport={'width': 1920, 'height': 1080}, user_agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36' ) page = context.new_page() return playwright, browser, context, page # Always capture screenshots at key steps page.screenshot(path=f"{ARTIFACTS_DIR}/step_1_signup.png")
import pytesseract from PIL import Image def handle_captcha(page, artifacts_dir): # 1. Capture CAPTCHA screenshot captcha_path = f"{artifacts_dir}/captcha.png" page.screenshot(path=captcha_path) # 2. Try OCR with Tesseract (included in Dockerfile) try: text = pytesseract.image_to_string(Image.open(captcha_path)) if text: return text.strip() except Exception as e: print(f"OCR failed: {e}") # 3. Fall back to API if available api_key = os.getenv("CAPTCHA_API_KEY") if api_key: # Integrate third-party solver pass return None
def wait_for_verification_email(page, timeout=600): """Wait for email with configurable timeout (default 10 min)""" start_time = time.time() while time.time() - start_time < timeout: # Navigate to inbox or refresh page.reload() # Check for verification email if page.locator('text="Verify your email"').count() > 0: page.screenshot(path=f"{ARTIFACTS_DIR}/verification_received.png") return True, time.time() - start_time time.sleep(10) # Poll every 10 seconds return False, None
The repository includes
emailgen.code-workspace with AI-friendly settings:
Cmd+K Cmd+R to run current providerLocated in
.claude/settings.local.json, pre-configured to allow:
When implementing a provider, ensure:
Mailinator: Public inboxes, no authentication
Auto-generated addresses: Don't require account creation