Develop, test, and debug automated email account creation and testing providers in the EmailGen Docker-based framework
This skill has safety concerns that you should review before use. Some patterns were detected that may pose a risk.Safety score: 75/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
Expert assistant for developing email provider automation scripts in the EmailGen framework - a Dockerized system for automated email account creation and testing across multiple providers.
This skill helps you implement, test, and debug email provider automation scripts within the EmailGen framework. It understands the standardized architecture, Docker containerization patterns, Playwright browser automation, CAPTCHA handling, and the required output formats.
Before implementing or modifying any provider:
Every provider MUST produce this exact format:
```json
{
"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"
}
```
Follow this sequence:
**Step 1: Create Directory Structure**
```bash
cd providers/<provider_name>
```
**Step 2: Implement Browser Automation**
Use this standard Playwright setup pattern:
```python
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']
)
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
```
**Step 3: Capture Screenshots at Key Steps**
```python
ARTIFACTS_DIR = "/app/artifacts"
page.screenshot(path=f"{ARTIFACTS_DIR}/step_1_signup.png")
page.screenshot(path=f"{ARTIFACTS_DIR}/captcha.png")
page.screenshot(path=f"{ARTIFACTS_DIR}/inbox.png")
```
**Step 4: Handle CAPTCHAs (ProtonMail Pattern)**
```python
import pytesseract
from PIL import Image
def handle_captcha(page, artifacts_dir):
captcha_path = f"{artifacts_dir}/captcha.png"
page.screenshot(path=captcha_path)
# Try OCR first
try:
text = pytesseract.image_to_string(Image.open(captcha_path))
if text:
return text.strip()
except Exception as e:
print(f"OCR failed: {e}")
# Fall back to API if available
api_key = os.getenv("CAPTCHA_API_KEY")
if api_key:
# Integrate third-party solver
pass
return None
```
**Step 5: Implement Inbox Verification**
```python
def wait_for_verification_email(page, timeout=600):
start_time = time.time()
while time.time() - start_time < timeout:
page.reload()
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)
return False, None
```
**Step 6: Write Result JSON**
```python
import json
result = {
"provider": "provider_name",
"type": "personal",
"account_identifier": email_address,
"encountered": {
"captcha": captcha_encountered,
"sms_required": False,
"payment_required": False
},
"signup_duration_sec": duration,
"verification_received": verified,
"sending_supported": True,
"errors": [],
"notes": "Additional context"
}
with open("/app/result.json", "w") as f:
json.dump(result, f, indent=2)
```
**Quick Local Test (without Docker):**
```bash
cd providers/<provider_name>
pip3 install -r requirements.txt
python3 main.py
```
**Full Docker Test:**
```bash
cd providers/<provider_name>
cp .env.example .env
./run.sh
cat result.json
ls -la artifacts/
```
**Interactive Debugging:**
```bash
docker run -it --entrypoint /bin/bash <image_tag>
```
```bash
docker logs emailgen-<provider>
ls -la providers/<provider>/artifacts/
python3 -m json.tool providers/<provider>/result.json
docker run --rm --env RUN_ID=test-123 -v "$(pwd)/artifacts:/app/artifacts" <image>
```
Standard across all providers:
Before considering a provider complete:
1. **Missing Playwright dependencies**: Dockerfile needs system packages for Chromium
2. **Anti-bot detection**: Use stealth browser arguments and realistic user agents
3. **Hardcoded timeouts**: Always use configurable environment variables
4. **Missing screenshots**: Capture at every major step for debugging
5. **Schema violations**: Validate result.json format before writing
6. **Credential leaks**: Never commit .env files
**Scenario 1: Implement new provider**
```
User: "Add support for temp-mail.org provider"
Assistant: [Creates directory structure, implements Playwright automation following patterns, adds CAPTCHA detection, writes result.json]
```
**Scenario 2: Debug existing provider**
```
User: "ProtonMail provider is failing at CAPTCHA step"
Assistant: [Checks artifacts/captcha.png, reviews OCR implementation, suggests API fallback, tests with docker run]
```
**Scenario 3: Validate implementation**
```
User: "Check if atomicmail provider follows all standards"
Assistant: [Runs implementation checklist, validates result.json schema, checks screenshot capture, reviews error handling]
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/emailgen-provider-implementation/raw