handling-attachments
File attachment handling for XMTP agents. Use when sending or receiving images, files, or any encrypted remote attachments. Triggers on file upload, image sending, or remote attachment handling.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- handling-attachments
- license
- MIT
- metadata
- { "author": "xmtp", "version": "1.0.0" }
- description
- File attachment handling for XMTP agents. Use when sending or receiving images, files, or any encrypted remote attachments. Triggers on file upload, image sending, or remote attachment handling.
02 资源文件 3
- 参考文档rules/receive-attachment.md1.2 KB
- 参考文档rules/send-remote-attachment.md1.1 KB
- 参考文档rules/upload-callback.md1.6 KB
03 SKILL.md 正文
XMTP attachments
Handle file attachments using encrypted remote attachments. Files are encrypted locally, uploaded to your storage provider, and sent as a remote attachment message.
When to apply
Reference these guidelines when:
- Sending files or images from an agent
- Receiving and downloading attachments
- Implementing custom upload storage
- Working with encrypted file transfers
Rule categories by priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Send | CRITICAL | send- |
| 2 | Receive | CRITICAL | receive- |
| 3 | Upload | HIGH | upload- |
Quick reference
Send (CRITICAL)
send-remote-attachment- Send encrypted file attachments
Receive (CRITICAL)
receive-attachment- Download and decrypt attachments
Upload (HIGH)
upload-callback- Implement custom upload storage (Pinata, S3, etc.)
Quick start
import { type AttachmentUploadCallback } from "@xmtp/agent-sdk/util";
// Send an attachment
const file = new File(["Hello, World!"], "hello.txt", { type: "text/plain" });
await ctx.conversation.sendRemoteAttachment(file, uploadCallback);
// Receive an attachment
agent.on("attachment", async (ctx) => {
const attachment = await downloadRemoteAttachment(ctx.message.content, agent);
console.log(`Received: ${attachment.filename}`);
});
How to use
Read individual rule files for detailed explanations:
rules/send-remote-attachment.md
rules/receive-attachment.md
rules/upload-callback.md
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.