⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.8.0

Mails for Agent

@digidai⭐ 1 stars

Complete service registrations autonomously by receiving verification codes. Also: send and receive emails, monitor inbox, search by keyword, download attachments, view threads, filter by label, extract structured data, manage mailbox and webhooks.

Use with your AI agent

Open your project in any AI assistant that can read your files. Works with ChatGPT, Claude, Claude Code, Codex, Cursor, Hermes Agent, OpenClaw, Grok Bot, and more.

Your agent needs access to this page’s linked instructions and your project files. Copying does not install or execute anything.

—/10

// RATINGS

⭐GitHub Stars
⭐ 1 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README


Your agent hits "enter verification code" and stops. Not anymore. mails-skills gives any AI agent the ability to receive verification codes and complete service registrations autonomously. One API call: GET /api/code?timeout=60.

What Your Agent Can Do

CapabilityExample
Auto-register for servicesFull flow: fill form, wait for code, verify. Zero human intervention.
Extract verification codes"Sign up on example.com and enter the code"
Receive emails"Check my inbox for new messages"
Send emails"Send a summary report to [email protected]"
Search inbox"Find all emails from GitHub"
Download attachments"Get the PDF from that invoice email"
Conversation threads"Show me the full thread with Alice"
Filter by label"Show me all newsletters" (newsletter, notification, code, personal)
Extract structured data"Extract the order details from that confirmation email" (order, shipping, calendar, receipt)

Quick Start

Option A: Hosted (2 commands)

npm install -g mails-agent    # Install the CLI
mails claim myagent           # Claim [email protected] (free)

Then install the skill:

git clone https://github.com/Digidai/mails-skills && cd mails-skills && ./install.sh

The installer auto-detects your config from mails claim -- no manual input needed.

Option B: Self-hosted

You need: a domain on Cloudflare + a free Resend account.

# 1. Deploy the Worker
git clone https://github.com/Digidai/mails && cd mails/worker
bun install

# 2. Create D1 database
wrangler d1 create mails
# Copy the database_id into wrangler.toml

# 3. Initialize schema
wrangler d1 execute mails --file=schema.sql

# 4. Set secrets
wrangler secret put RESEND_API_KEY
wrangler secret put WEBHOOK_SECRET     # Optional: for webhook signing

# 5. Deploy
wrangler deploy
# Note the Worker URL: https://mails-worker.<subdomain>.workers.dev

# 6. Enable Email Routing in Cloudflare Dashboard
#    Domain > Email > Email Routing > Enable
#    Catch-all > Send to Worker > your-worker

# 7. Add Resend DNS records (SPF + DKIM) in Cloudflare DNS
#    See: https://resend.com/docs/dashboard/domains/introduction

# 8. Create an auth token
wrangler d1 execute mails --command \
  "INSERT INTO auth_tokens (token, mailbox) VALUES ('$(openssl rand -hex 24)', '[email protected]')"

Then install the skill:

git clone https://github.com/Digidai/mails-skills && cd mails-skills && ./install.sh

How It Works

Your Agent (Claude Code / OpenClaw / Cursor / any LLM)
    |
    |  "Check inbox" / "Send email" / "Get verification code"
    v
Skill file (installed locally, teaches the agent the API)
    |
    |  HTTP API calls
    v
mails Worker (Cloudflare Workers + D1 + R2)
    |-- Receive: Cloudflare Email Routing -> Worker -> D1
    |-- Send:    Worker -> Resend API -> SMTP
    |-- Search:  FTS5 full-text search
    |-- Codes:   Auto-extract 4-12 char verification codes
    |-- Files:   Attachments in R2, downloadable via API
    |-- Threads: Conversation threading by subject/references
    |-- Labels:  Auto-categorize (newsletter, notification, code, personal)
    |-- Extract: Structured data extraction (order, shipping, calendar, receipt)
    '-- Hooks:   Webhook POST on every received email

Supported Platforms

PlatformHow it worksInstall
Claude CodeSkill file in ~/.claude/skills/./install.sh (auto-detected)
OpenClawSKILL.md with env vars./install.sh (auto-detected)
CursorRules fileAdd skills/universal/email-api.md to .cursorrules
WindsurfRules fileAdd skills/universal/email-api.md to .windsurfrules
Any agentHTTP API referenceInclude skills/universal/email-api.md in system prompt

Claude Code:

cp skills/claude-code/email.md ~/.claude/skills/email.md
# Edit: replace YOUR_WORKER_URL, YOUR_AUTH_TOKEN, YOUR_MAILBOX

OpenClaw:

cp -r skills/openclaw ~/.openclaw/skills/email
# Add to ~/.zshrc:
export MAILS_API_URL="https://api.mails0.com"   # self-hosted: your https://<worker>.workers.dev
export MAILS_AUTH_TOKEN="your-token"
export MAILS_MAILBOX="[email protected]"

Any other agent:

# Copy skills/universal/email-api.md into your agent's system prompt

Example: Agent Signs Up for a Service

You:   "Sign up for an account on example.com using our email"

Agent: 1. Opens example.com/register
       2. Fills in the form with [email protected]
       3. Submits the form
       4. Calls GET /api/code?timeout=60
       5. Receives { "code": "483920" }
       6. Enters 483920 on the verification page
       7. "Done! Account created successfully."

Non-Interactive Install (CI / Automation)

# Hosted (default)
./install.sh --url https://api.mails0.com --token YOUR_TOKEN --mailbox [email protected]

# Or with environment variables:
MAILS_URL=https://api.mails0.com MAILS_TOKEN=YOUR_TOKEN [email protected] ./install.sh

# Self-hosted: replace the URL with your own Worker, e.g. https://mails-worker.<subdomain>.workers.dev

Captcha Limitation

Most modern SaaS services (Render, Figma, etc.) use captcha challenges that block fully autonomous agent registration. mails-skills handles the email/OTP side, captcha is a browser-layer problem.

Recommended solutions:

  • Steel -- open-source browser API with built-in captcha solving
  • Browserbase -- cloud browsers with captcha solving + Agent Identity
  • CapSolver -- captcha solving API ($0.80/1K solves), browser extension available
  • Web Bot Auth -- emerging IETF protocol for verified bot identity (Cloudflare, AWS, Akamai support)

Troubleshooting

ProblemSolution
python3 not foundbrew install python3 (macOS) or apt install python3 (Linux)
invalid auth tokenRe-run mails claim or check ~/.mails/config.json
Cannot reach Worker URLVerify the URL and that the Worker is deployed
Agent doesn't know about emailCheck skill file exists: ls ~/.claude/skills/email.md
Verification code not foundThe email may lack a parseable code. Read the full email with GET /api/email?id=...
mails claim hangsCheck your internet connection; the hosted service may be temporarily unavailable

Project Structure

skills/
  claude-code/email.md     # Claude Code skill
  openclaw/SKILL.md        # OpenClaw AgentSkills format
  universal/email-api.md   # Universal API reference (Python, JS, cURL)
install.sh                 # Interactive + non-interactive installer

Ecosystem

ProjectInstallDescription
mailsnpm i -g mails-agentCLI + SDK + Worker
mails-mcpnpx mails-agent-mcpMCP Server (10 tools)
mails-python`pip install

// HOW IT'S BUILT

KEY FILES

skills/openclaw/SKILL.mdREADME.md

// REPO STATS

1 stars