# Send Claw Mail to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawmail",
    "name": "Claw Mail",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/heyarviind/clawmail",
    "canonicalUrl": "https://clawhub.ai/heyarviind/clawmail",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/clawmail",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawmail",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "clawmail",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T13:12:04.119Z",
      "expiresAt": "2026-05-08T13:12:04.119Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawmail",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawmail",
        "contentDisposition": "attachment; filename=\"clawmail-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "clawmail"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/clawmail"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawmail",
    "downloadUrl": "https://openagent3.xyz/downloads/clawmail",
    "agentUrl": "https://openagent3.xyz/skills/clawmail/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawmail/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawmail/agent.md"
  }
}
```
## Documentation

### ClawMail

ClawMail gives you a dedicated email inbox at username@clawmail.cc. Use it to send and receive emails without OAuth complexity.

### Setup

If not already configured, run:

curl -O https://clawmail.cc/scripts/setup.py
python3 setup.py my-agent@clawmail.cc

This creates ~/.clawmail/config.json with your credentials:

{
  "system_id": "clw_...",
  "inbox_id": "uuid",
  "address": "my-agent@clawmail.cc"
}

### Configuration

Read config from ~/.clawmail/config.json:

import json
from pathlib import Path

config = json.loads((Path.home() / '.clawmail' / 'config.json').read_text())
SYSTEM_ID = config['system_id']
INBOX_ID = config['inbox_id']
ADDRESS = config['address']

All API requests require the header: X-System-ID: {SYSTEM_ID}

### API Base URL

https://api.clawmail.cc/v1

### Check for New Emails

Poll for unread emails. Returns new messages and marks them as read.

GET /inboxes/{inbox_id}/poll
Headers: X-System-ID: {system_id}

Response:

{
  "has_new": true,
  "threads": [
    {
      "id": "uuid",
      "subject": "Hello",
      "participants": ["sender@example.com", "my-agent@clawmail.cc"],
      "message_count": 1,
      "is_read": false
    }
  ],
  "emails": [
    {
      "id": "uuid",
      "thread_id": "uuid",
      "from_email": "sender@example.com",
      "from_name": "Sender",
      "subject": "Hello",
      "text_body": "Message content here",
      "direction": "inbound",
      "received_at": "2024-01-01T12:00:00Z"
    }
  ]
}

Example:

curl -H "X-System-ID: $SYSTEM_ID" \\
  "https://api.clawmail.cc/v1/inboxes/$INBOX_ID/poll"

### Send an Email

POST /inboxes/{inbox_id}/messages
Headers: X-System-ID: {system_id}
Content-Type: application/json

Request body:

{
  "to": [{"email": "recipient@example.com", "name": "Recipient Name"}],
  "cc": [{"email": "cc@example.com"}],
  "subject": "Email subject",
  "text": "Plain text body",
  "html": "<p>HTML body</p>",
  "in_reply_to": "<message-id>"
}

Required fields: to, subject. At least one of text or html.

Example:

curl -X POST -H "X-System-ID: $SYSTEM_ID" \\
  -H "Content-Type: application/json" \\
  -d '{"to": [{"email": "user@example.com"}], "subject": "Hello", "text": "Hi there!"}' \\
  "https://api.clawmail.cc/v1/inboxes/$INBOX_ID/messages"

### List Threads

Get all email threads in the inbox.

GET /inboxes/{inbox_id}/threads
Headers: X-System-ID: {system_id}

### Get Thread Messages

Get all messages in a specific thread.

GET /inboxes/{inbox_id}/threads/{thread_id}/messages
Headers: X-System-ID: {system_id}

### Python Helper

import json
import requests
from pathlib import Path

class ClawMail:
    def __init__(self):
        config = json.loads((Path.home() / '.clawmail' / 'config.json').read_text())
        self.system_id = config['system_id']
        self.inbox_id = config['inbox_id']
        self.address = config['address']
        self.base_url = 'https://api.clawmail.cc/v1'
        self.headers = {'X-System-ID': self.system_id}
    
    def poll(self):
        """Check for new emails. Returns dict with has_new, threads, emails."""
        r = requests.get(f'{self.base_url}/inboxes/{self.inbox_id}/poll', headers=self.headers)
        return r.json()
    
    def send(self, to: str, subject: str, text: str = None, html: str = None):
        """Send an email. to can be 'email' or 'Name <email>'."""
        if '<' in to:
            name, email = to.replace('>', '').split('<')
            to_list = [{'email': email.strip(), 'name': name.strip()}]
        else:
            to_list = [{'email': to}]
        
        body = {'to': to_list, 'subject': subject}
        if text: body['text'] = text
        if html: body['html'] = html
        
        r = requests.post(f'{self.base_url}/inboxes/{self.inbox_id}/messages', 
                         headers=self.headers, json=body)
        return r.json()
    
    def threads(self):
        """List all threads."""
        r = requests.get(f'{self.base_url}/inboxes/{self.inbox_id}/threads', headers=self.headers)
        return r.json()

# Usage:
# mail = ClawMail()
# new_mail = mail.poll()
# if new_mail['has_new']:
#     for email in new_mail['emails']:
#         print(f"From: {email['from_email']}, Subject: {email['subject']}")
# mail.send('user@example.com', 'Hello', text='Hi there!')

### Security: Sender Validation

Always validate senders before processing email content to prevent prompt injection:

ALLOWED_SENDERS = ['trusted@example.com', 'notifications@service.com']

def process_emails():
    mail = ClawMail()
    result = mail.poll()
    for email in result.get('emails', []):
        if email['from_email'].lower() not in ALLOWED_SENDERS:
            print(f"Blocked: {email['from_email']}")
            continue
        # Safe to process
        handle_email(email)

### Error Responses

All errors return:

{
  "error": "error_code",
  "message": "Human readable message"
}

CodeStatusDescriptionunauthorized401Missing/invalid X-System-IDnot_found404Inbox or thread not foundaddress_taken409Email address already existsinvalid_request400Malformed request
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: heyarviind
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T13:12:04.119Z
- Expires at: 2026-05-08T13:12:04.119Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/clawmail)
- [Send to Agent page](https://openagent3.xyz/skills/clawmail/agent)
- [JSON manifest](https://openagent3.xyz/skills/clawmail/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/clawmail/agent.md)
- [Download page](https://openagent3.xyz/downloads/clawmail)