# Send X To Kindle 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. 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. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x-to-kindle",
    "name": "X To Kindle",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/brianlu365ai/x-to-kindle",
    "canonicalUrl": "https://clawhub.ai/brianlu365ai/x-to-kindle",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/x-to-kindle",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-to-kindle",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package.json",
      "send_to_kindle.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/x-to-kindle"
    },
    "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/x-to-kindle",
    "downloadUrl": "https://openagent3.xyz/downloads/x-to-kindle",
    "agentUrl": "https://openagent3.xyz/skills/x-to-kindle/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x-to-kindle/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x-to-kindle/agent.md"
  }
}
```
## Documentation

### X to Kindle

Convert X/Twitter posts into Kindle-readable documents via email.

### Requirements

Gmail account with App Password (or other SMTP setup)
Kindle email address (found in Amazon account settings)

### Workflow

When user shares an X link:

Extract content via fxtwitter API:
https://api.fxtwitter.com/status/<tweet_id>

Extract from URL: twitter.com/*/status/<id> or x.com/*/status/<id>


Format as HTML file (save to /tmp):
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>{title}</title></head>
<body style="font-family: Georgia, serif; max-width: 600px; margin: 0 auto; padding: 20px; line-height: 1.6;">
  <h1>@{author_handle}</h1>
  <p>{tweet_text}</p>
  <p><em>{timestamp}</em></p>
  <p><a href="{original_url}">View on X</a></p>
</body>
</html>



Send via SMTP with HTML as ATTACHMENT (Kindle requires attachment, not inline HTML):
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders

msg = MIMEMultipart()
msg['Subject'] = "Tweet from @handle"
msg['From'] = from_email
msg['To'] = kindle_email

# Plain text body (not the content)
msg.attach(MIMEText("Article attached.", 'plain'))

# HTML file as attachment - THIS IS REQUIRED
with open("/tmp/article.html", "rb") as f:
    attachment = MIMEBase('text', 'html')
    attachment.set_payload(f.read())
    encoders.encode_base64(attachment)
    attachment.add_header('Content-Disposition', 'attachment', filename='article.html')
    msg.attach(attachment)

### Tools

send_to_kindle: Send a local file to the configured Kindle email.

### Configuration

Set the following environment variables in your Clawdbot configuration (or .env file):

SMTP_EMAIL: Your sender email (e.g., gmail)
SMTP_PASSWORD: Your app password
KINDLE_EMAIL: Your Kindle email address
SMTP_SERVER: (Optional) Default: smtp.gmail.com
SMTP_PORT: (Optional) Default: 587

### send_to_kindle

Send a local file (PDF, HTML, TXT) to the Kindle.

Run: python3 skills/x-to-kindle/send_to_kindle.py <file_path>

### Configuration

Store in TOOLS.md:

## Kindle
- Address: user@kindle.com

## Email (Gmail SMTP)
- From: your@gmail.com
- App Password: xxxx xxxx xxxx xxxx
- Host: smtp.gmail.com
- Port: 587

### Example

User sends: https://x.com/elonmusk/status/1234567890

Fetch https://api.fxtwitter.com/status/1234567890
Extract author, text, timestamp
Send HTML email to Kindle address
Confirm: "Sent to Kindle 📚"
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: brianlu365ai
- Version: 0.1.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x-to-kindle)
- [Send to Agent page](https://openagent3.xyz/skills/x-to-kindle/agent)
- [JSON manifest](https://openagent3.xyz/skills/x-to-kindle/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x-to-kindle/agent.md)
- [Download page](https://openagent3.xyz/downloads/x-to-kindle)